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

RESOLVED FIXED

Status

()

RESOLVED FIXED
6 years ago
3 years ago

People

(Reporter: karlt, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86_64
All
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
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.
(Reporter)

Updated

6 years ago
OS: Linux → All
Yep, this is a problem.
Duplicate of this bug: 934259
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
Last Resolved: 3 years ago
Flags: needinfo?(jgilbert)
Resolution: --- → FIXED
(Reporter)

Comment 5

3 years ago
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.