Summary: | [Texmap] Hierarchy of layers with opacity may result in wrong blending. | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Bruno Abinader (history only) <bruno.abinader> | ||||||||||||||||||||||
Component: | Layout and Rendering | Assignee: | Noam Rosenthal <noam> | ||||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||||
Severity: | Normal | CC: | allan.jensen, buildbot, commit-queue, helder.correia, igor.oliveira, jturcotte, mrobinson, noam, rafael.lobo, rniwa, tonikitoo | ||||||||||||||||||||||
Priority: | P2 | ||||||||||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||||||
Bug Depends on: | 114278 | ||||||||||||||||||||||||
Bug Blocks: | 50418, 112446, 114290 | ||||||||||||||||||||||||
Attachments: |
|
Description
Bruno Abinader (history only)
2013-04-01 16:44:50 PDT
Created attachment 196039 [details]
Expected result
Expected result as obtained from Chrome.
Created attachment 196040 [details]
Actual result
Actual (buggy) result from both Qt and EFL builds (might also be happening on other AC-enabled ports).
I found out yesterday two things: 1. If we change both location and size of the tileRect passed to paintWithIntermediateSurface to be IntPoint(0,0) and maxTextureSize, respectively, the texture layers are properly rendered but with messy opacity blending. 2. When using "-webkit-transform-style: preserve-3d;" on all composited layers, the issue disappears. My guess is that this makes shouldBlend() return false, thus forcing codepath to not enter paintUsingOverlapRegions(). Yes, the bug is probably in the overlap region calculation then. Created attachment 196637 [details]
Much simplified test case
(In reply to comment #5) > Created an attachment (id=196637) [details] > Much simplified test case No'am, I haven't noticed any issues with your testcase, at least not on EFL port. I have a fix for the surface positioning issue (see below), however opacity blending results are still wrong. diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp index 5911513..70c98be 100644 --- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp +++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp @@ -412,7 +412,10 @@ void TextureMapperLayer::paintWithIntermediateSurface(const TextureMapperPaintOp mainSurface = replicaSurface; } - commitSurface(options, mainSurface, rect, options.opacity); + // Offset needs to be reset when committing to surface. + TextureMapperPaintOptions surfaceOptions(options); + surfaceOptions.offset = IntSize(); + commitSurface(surfaceOptions, mainSurface, rect, options.opacity); } void TextureMapperLayer::paintRecursive(const TextureMapperPaintOptions& options) Can you please test this on your environment to see if it works? I'll attach it as a patch to make it easy to apply. Created attachment 197035 [details]
Exploratory patch
When committing the surface, resetting the offset value makes the painted surfaces being correctly positioned. However, the opacity blending still have incorrect values when compared to non-composited result.
Comment on attachment 197035 [details]
Exploratory patch
As Noam commented on IRC, this fix is wrong (only affects the provided test-case).
Created attachment 197136 [details]
Patch
Comment on attachment 197136 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=197136&action=review > Source/WebCore/platform/graphics/texmap/TextureMapperGL.h:100 > + enum MirrorMode { > + ShouldNotMirror, > + ShouldMirror > + }; Could you add a comment about what MirrorMode represents? Created attachment 197141 [details]
Patch
Comment on attachment 197141 [details] Patch Attachment 197141 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/17690016 New failing tests: compositing/overlap-blending/nested-overlap.html Created attachment 197174 [details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.2
Created attachment 197220 [details]
Patch
Created attachment 197221 [details]
Patch
Comment on attachment 197221 [details] Patch Clearing flags on attachment: 197221 Committed r148090: <http://trac.webkit.org/changeset/148090> All reviewed patches have been landed. Closing bug. |