Summary: | [chromium] wrong transform causing incorrect culling | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Shawn Singh <shawnsingh> | ||||||
Component: | Layout and Rendering | Assignee: | Shawn Singh <shawnsingh> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | backer, cc-bugs, danakj, enne, jamesr, nduca, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Shawn Singh
2012-03-06 18:48:17 PST
Figured out the problem: in CCRenderPass, where the quad was being created for a RenderSurface, the quadTransforms was being initialized by the surface's drawTransform. I believe this should actually be the originTransform instead, following the same pattern as other layers. Without culling/damage tracking, it did not affect rendering because renderSurfaces draw themselves separately using the drawTransform, and they never used the quadTransform. With both culling and damage tracking, however, things go wrong. Culling (correctly) uses the quadTransform to determine the quad in target surface space; and, because the quadTransform was wrong, the quad becomes shifted incorrectly. Therefore, when intersecting the damageRect, incorrect regions get culled. Patch coming in just a moment. Created attachment 131699 [details]
Patch
This patch also shuffles code around so that the fix can be more easily tested
Comment on attachment 131699 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=131699&action=review +1 > Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h:41 > #include "cc/CCLayerQuad.h" > +#include "cc/CCRenderPass.h" Can this file forward-declare class CCSharedQuadState, and the .cpp includes CCSharedQuadState.h? Comment on attachment 131699 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=131699&action=review R=me. I like the forward decl idea as well. > Source/WebKit/chromium/tests/CCRenderSurfaceTest.cpp:105 > + // for reference, remove before committing > + // return CCSharedQuadState::create(originTransform(), drawTransform(), contentRect(), clipRect(), drawOpacity(), isOpaque); don't forget to do this Created attachment 131707 [details]
Patch for landing
Cool - thanks to both of you for the quick review =) Comment on attachment 131707 [details] Patch for landing Clearing flags on attachment: 131707 Committed r110635: <http://trac.webkit.org/changeset/110635> All reviewed patches have been landed. Closing bug. |