Bug 44573 - [chromium] Implement clipping for composited layers
Summary: [chromium] Implement clipping for composited layers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Vangelis Kokkevis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-24 18:55 PDT by Vangelis Kokkevis
Modified: 2010-08-26 11:09 PDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (14.66 KB, patch)
2010-08-24 19:20 PDT, Vangelis Kokkevis
no flags Details | Formatted Diff | Diff
Proposed patch - removed temporary stencil clipping debug code (14.63 KB, patch)
2010-08-25 10:55 PDT, Vangelis Kokkevis
kbr: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vangelis Kokkevis 2010-08-24 18:55:00 PDT
The accelerated compositor in chromium doesn't yet handle layers that clip their descendants.
Comment 1 Vangelis Kokkevis 2010-08-24 19:20:03 PDT
Created attachment 65359 [details]
Proposed patch
Comment 2 Vangelis Kokkevis 2010-08-25 10:55:44 PDT
Created attachment 65436 [details]
Proposed patch - removed temporary stencil clipping debug code
Comment 3 Kenneth Russell 2010-08-25 12:24:09 PDT
Comment on attachment 65436 [details]
Proposed patch - removed temporary stencil clipping debug code

Generally looks good. There's one piece of complexity below I'd ask you to rethink, but you can fix the issues below before commit.

WebCore/platform/graphics/chromium/LayerChromium.cpp:456
 +      GLC(glUniform4f(sv->borderShaderColorLocation(), 0, 1 , 0, 0.7));
It's probably worth a comment that the color values don't matter here since the color mask is set to all false at this point.

WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:506
 +              // will allow us up to 255 nested clipping layers which is hopefuly enough.
hopefully

WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:554
 +              ASSERT(!currentStencilValue);
Because of this ASSERT, it feels to me like there must be some simpler logic just involving a test of "--currentStencilValue == 0" or similar, and getting rid of mustDisableStencil and stencilTestEnabledForSubtree. I'm not 100% sure of this though and don't want you to risk breaking your current logic if it's well tested, so feel free to just consider this for the future.
Comment 4 Vangelis Kokkevis 2010-08-26 11:09:38 PDT
Committed r66114: <http://trac.webkit.org/changeset/66114>