RESOLVED FIXED 80471
[chromium] wrong transform causing incorrect culling
https://bugs.webkit.org/show_bug.cgi?id=80471
Summary [chromium] wrong transform causing incorrect culling
Shawn Singh
Reported 2012-03-06 18:48:17 PST
To reproduce: 1. run chromium with --enable-partial-swap on osx (should probably repro on cros and linux osmesa, too) 2. visit www.apple.com/iphone Things disappear awkwardly. Its likely this is either a culling or damage tracking issue. I also visualized paint and damage rects, and the rects go a little crazy. Because of that, its reasonable to assume that its a damage tracking bug (or two). If it becomes clear that its a culling issue I'll hand it off to Dana.
Attachments
Patch (7.18 KB, patch)
2012-03-13 13:03 PDT, Shawn Singh
no flags
Patch for landing (6.93 KB, patch)
2012-03-13 13:49 PDT, Shawn Singh
no flags
Shawn Singh
Comment 1 2012-03-13 12:54:28 PDT
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.
Shawn Singh
Comment 2 2012-03-13 13:03:11 PDT
Created attachment 131699 [details] Patch This patch also shuffles code around so that the fix can be more easily tested
Dana Jansens
Comment 3 2012-03-13 13:11:07 PDT
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?
James Robinson
Comment 4 2012-03-13 13:17:17 PDT
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
Shawn Singh
Comment 5 2012-03-13 13:49:00 PDT
Created attachment 131707 [details] Patch for landing
Shawn Singh
Comment 6 2012-03-13 13:50:05 PDT
Cool - thanks to both of you for the quick review =)
WebKit Review Bot
Comment 7 2012-03-13 16:28:53 PDT
Comment on attachment 131707 [details] Patch for landing Clearing flags on attachment: 131707 Committed r110635: <http://trac.webkit.org/changeset/110635>
WebKit Review Bot
Comment 8 2012-03-13 16:28:58 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.