Closed Bug 819846 Opened 12 years ago Closed 9 years ago

CanvasLayerOGL treats WebGL buffers as alpha- premultiplied even when they are not

Categories

(Core :: Graphics: CanvasWebGL, defect)

x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: karlt, Unassigned)

References

Details

Detected by content/canvas/test/reftest/webgl-color-alpha-test.html?colorVal=0.5&alphaVal=0.5&alpha from bug 782860.

The readback case could be easily fixed by using gfxUtils::PremultiplyImageSurface as BasicCanvasLayer does.

The BindTex2DOffscreen path wants a different ShaderProgramOGL, which may also be a better solution for the readback path.

Or if non-premultiplied WebGL buffers are not something we need to optimize, then the readback path could be used.
OS: Linux → All
Yep, this is a problem.
This bug is a bit old (pre-layers refactoring era) and we have code in CompositorOGL to handle non-premultiplied surfaces now. Can we close?
Flags: needinfo?(jgilbert)
Should be able to. We have reftests for this now, too.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(jgilbert)
Resolution: --- → FIXED
We had reftests before too, but I don't know whether these are the same bug or not
https://hg.mozilla.org/mozilla-central/annotate/70e1d04f9487/dom/canvas/test/reftest/reftest.list#l53
The reftests are newish as of Wed, 14 Jan 2015. What you see there looks like failure for Linux+e10s and D3D9 for non-premult alpha.
You need to log in before you can comment on or make changes to this bug.