Wrong results with UNPACK_FLIP_Y_WEBGL and createImageBitmap imageOrientation
Categories
(Core :: Graphics: CanvasWebGL, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox93 | --- | fixed |
People
(Reporter: the.spite, Assigned: angus.sawyer)
References
Details
(Keywords: dev-doc-complete, Whiteboard: gfx-noted)
Attachments
(3 files, 4 obsolete files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Firefox for Android Steps to reproduce: When using texImage2D/texSubImage2D providing an ImageBitmap, the combinations of UNPACK_FLIP_Y_WEBGL and imageOrientation specified on createImageBitmap are inconsistent. Here's a test case with all combinations: https://www.clicktorelease.com/tmp/texImage2D/ Code is here: https://github.com/spite/texImage2D Actual results: "ImageBitmap, UNPACK_FLIP_Y_WEBGL false, imageOrientation flipY" should be upright, it's upside down. "ImageBitmap, UNPACK_FLIP_Y_WEBGL true, imageOrientation default" should be upside down, it's upright. Expected results: The combination of flipY on texture and imagebitmap should yield correct results.
Comment 1•7 years ago
|
||
Note that this is in the context of trying to integrate ImageBitmap support into the popular Three.js library. Support for the imageOrientation ImageBitmap creation option is needed in order to do this -- because it's using WebGL under the scenes.
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Comment 2•6 years ago
|
||
I can confirm this problem and it prevents us from using createImageBitmap.
Comment 3•5 years ago
|
||
We do not support createImageBitmap options yet...
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
Assignee | ||
Comment 7•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
Add optional options Dictionary. Later patches will add
implementation of imageOrientation: none|flipY.
Updated•5 years ago
|
Comment 9•5 years ago
|
||
We need to be sure we aren't running too far ahead of where the spec is:
https://github.com/whatwg/html/pull/4248
Comment 10•5 years ago
|
||
Presumably this blocks 1442632 because that will need ImageBitmapOptions too?
That said, I'd like to understand whether our plan is to implement all the currently-specified options, or only some of them, or something else?
Hmm. The spec already has an ImageBitmapOptions argument for createImageBitmap. That PR adds a new API for creating options objects that lets one easily detect which dictionary members on ImageBitmapOptions are supported, but doesn't affect the createImageBitmap() behavior, right?
I guess if https://github.com/whatwg/html/pull/4248#issuecomment-449221598 (and hence making ImageBitmapOptions an interface) is still on the table then we need to worry about that, but given that Chrome is shipping ImageBitmapOptions as a dictionary already that would still need to be supported not matter what, right?
Assignee | ||
Comment 11•5 years ago
|
||
Add optional options Dictionary. Later patches will add
implementation of imageOrientation: none|flipY.
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Pushed by nbeleuzu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/41c6b7e917fd add bindings for options to createImageBitmap and support flipY r=bzbarsky,aosmond
Comment 14•5 years ago
|
||
Backed out changeset 41c6b7e917fd (Bug 1367251) for mochitest failures at test_conformance__textures__image_bitmap_from_blob__tex-2d-luminance-luminance-unsigned_byte.html and assertion failures.
Backout: https://hg.mozilla.org/integration/autoland/rev/8cf479c7b975a0750943d622f42e7cdff42f2ffe
Failure log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=270004120&repo=autoland&lineNumber=3124
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=270004426&repo=autoland&lineNumber=12859
Assignee | ||
Comment 15•5 years ago
|
||
The test failures are tests that previously were not attempted because createImageBitmap() didn't accept the options dictionary.
The failing tests are because the permultiplyAlpha option has not yet been implemented.
What is the best way forward? Either temporarily expect the failures or add the premultiplyAlpha support?
Comment 16•5 years ago
|
||
The best way forward is to add expectations for the behavior we plan to have (in this case, expect the failures).
Comment 17•5 years ago
|
||
Angus, are generally you aiming to get this fixed to pass the tests and into the tree, or should I try to find someone else?
Also, what about the second (so far unreviewed?) changeset?
Assignee | ||
Comment 18•5 years ago
|
||
Boris, I am looking at skipping the tests and also working on adding the missing options.
I'll look at the other changeset tomorrow.
Updated•5 years ago
|
Comment 20•5 years ago
|
||
Is this ready to land?
Assignee | ||
Comment 21•5 years ago
|
||
waiting for re-review.
Comment 22•5 years ago
|
||
From jgilbert?
Updated•5 years ago
|
Comment 23•5 years ago
|
||
Angus is this ready to land?
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 24•4 years ago
|
||
Jeff, what's missing in the patch for it to land? This is causing pain for people trying to use the API with the new options, see https://github.com/mrdoob/three.js/commit/70aed3c8092392b73083e1d403ab9a90e4caa975 etc.
Comment 25•4 years ago
|
||
Would like to add that we're also having to blanket ban ImageBitmap when running on Firefox in PlayCanvas. Fix would be much appreciated!
Updated•4 years ago
|
Assignee | ||
Comment 26•4 years ago
|
||
Reinstate Khronos WebGL tests for createImageBitmap options parameter
Updated•4 years ago
|
Updated•4 years ago
|
Comment 27•4 years ago
|
||
This failed to land for incorrect reviewer(s).
https://lando.services.mozilla.com/D82359/
Comment 28•4 years ago
|
||
Pushed by dluca@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a55cda2431fc ignore gl.UNPACK_FLIP_Y_WEBGL & UNPACK_PREMULTIPLY_ALPHA for textures uploading ImageBitmap data as per spec. r=jgilbert https://hg.mozilla.org/integration/autoland/rev/a76c2c98b33c add bindings for options to createImageBitmap and support flipY r=bzbarsky,aosmond,baku https://hg.mozilla.org/integration/autoland/rev/871379f9b194 Revert changeset b1cdccfb383d - now-working-test. r=jgilbert
Comment 29•4 years ago
|
||
Backed out 3 changesets (bug 1367251) for Mda failures in /test_background_video_tainted_by_createimagebitmap.html. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=309844982&repo=autoland&lineNumber=2134
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=871379f9b19435ec2f5697ac18de46a5acc7369f
Backout:
https://hg.mozilla.org/integration/autoland/rev/324b5c008634f57345f7ce7c67a245264a6d4444
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 30•3 years ago
|
||
Hi Jeff or Angus: Wondering if we might see some activity on this again soon? Still P2? FWIW, we also need the options parameter for some work we are doing at Adobe and it's blocking our team from implementing more optimal solution on Firefox.
Assignee | ||
Comment 31•3 years ago
|
||
Hi,
I have just pushed a rebase diff for the first patch for this. It needs reviewing by Jeff.
I'll push the rebase second part that adds the options parameter itself shortly.
Assignee | ||
Comment 32•3 years ago
|
||
Now waiting for review of both patches. Passes tests cleanly in WPT and Khronos WebGL tests. Remaining options (colour space and resizing still need completing)
Updated•3 years ago
|
Comment 34•3 years ago
|
||
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7b52784ddd18 ignore gl.UNPACK_FLIP_Y_WEBGL & UNPACK_PREMULTIPLY_ALPHA for textures uploading ImageBitmap data as per spec. r=jgilbert https://hg.mozilla.org/integration/autoland/rev/426b58b5faa1 add bindings for options to createImageBitmap and support flipY r=bzbarsky,aosmond,baku https://hg.mozilla.org/integration/autoland/rev/c153c24e5559 Revert changeset b1cdccfb383d - now-working-test. r=jgilbert
Comment 35•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7b52784ddd18
https://hg.mozilla.org/mozilla-central/rev/426b58b5faa1
https://hg.mozilla.org/mozilla-central/rev/c153c24e5559
Description
•