Repository navigation
Conversation
| <script type=idl> | ||
| dictionary GPUImageCopyExternalImage { | ||
| required (ImageBitmap or HTMLCanvasElement or OffscreenCanvas) source; | ||
| boolean originBottomLeft = false; |
There was a problem hiding this comment.
I haven't followed all the technical detail on why it's needed, but if it is needed, why are we not making it a proper enum (even if with only 2 variants)? If I see originBottomLeft = true, it's non-ambiguous. But seeing originBottomLeft = false may be.
There was a problem hiding this comment.
This is closed now, but for future reference in case we revisit this:
I considered making this an enum but there are really only two options (the GL way, and the normal way). Other places (webgl, imagebitmap) call this "flip y", which is something you do in an operation, not something you tag an image with. (Internally in Chromium we also have topleft/bottomleft origins.) Maybe "flip y" would make the most sense though since this is really part of the operation and not the tagging. (If it were tagging it would be in GPUImageCopyTextureTagged, not GPUImageCopyExternalImage.)
Initially I was going to make it origin: "top-left" but we already have a field called origin.
|
Resolution: No need to do this |
Note that importExternalTexture is not made configurable.
GPUExternalTextures #1670), then in the non-zero-copy case, it can still improve performance for the same reason, so we could add it.Fixes #2110
Preview | Diff