[Chromium] REGRESSION(r110596) CCQuadCullerTest.verifyCullChildLinesUpTopLeft fails...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Mar 2012 20:06:19 +0000 (20:06 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Mar 2012 20:06:19 +0000 (20:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81083

Patch by Dana Jansens <danakj@chromium.org> on 2012-03-15
Reviewed by Adrienne Walker.

Source/WebCore:

The surface pointer on the occlusion tracker stack is uninitialized, and
can be non-null, but the layer's target surface is null, causing asserts
to fail. Fixes the TestCCOcclusionTrackerImpl to initialize the stack's
surface to be null.

* platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
(WebCore::::enterTargetRenderSurface):
(WebCore::::unoccludedContentRect):
* platform/graphics/chromium/cc/CCOcclusionTracker.h:
(WebCore::CCOcclusionTrackerBase::StackObject::StackObject):

Source/WebKit/chromium:

* tests/CCQuadCullerTest.cpp:
(WebCore::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110878 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp
Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/CCQuadCullerTest.cpp

index eeb508a9d1a84c768097f7dc18b6db394da9afad..3f751ace56f2ab19e7873c8580a93f784e42c42e 100644 (file)
@@ -1,3 +1,21 @@
+2012-03-15  Dana Jansens  <danakj@chromium.org>
+
+        [Chromium] REGRESSION(r110596) CCQuadCullerTest.verifyCullChildLinesUpTopLeft fails on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=81083
+
+        Reviewed by Adrienne Walker.
+
+        The surface pointer on the occlusion tracker stack is uninitialized, and
+        can be non-null, but the layer's target surface is null, causing asserts
+        to fail. Fixes the TestCCOcclusionTrackerImpl to initialize the stack's
+        surface to be null.
+
+        * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
+        (WebCore::::enterTargetRenderSurface):
+        (WebCore::::unoccludedContentRect):
+        * platform/graphics/chromium/cc/CCOcclusionTracker.h:
+        (WebCore::CCOcclusionTrackerBase::StackObject::StackObject):
+
 2012-03-15  David Levin  <levin@chromium.org>
 
         Various autoresize fixes.
index b2dfcb5b680cc57048d57a9f123010b10c446c59..1b4f891cca1a87796a5e7081411840e111131b90 100644 (file)
@@ -64,8 +64,7 @@ void CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::enterTargetRenderSurf
     const RenderSurfaceType* oldAncestorThatMovesPixels = !oldTarget ? 0 : oldTarget->nearestAncestorThatMovesPixels();
     const RenderSurfaceType* newAncestorThatMovesPixels = newTarget->nearestAncestorThatMovesPixels();
 
-    m_stack.append(StackObject());
-    m_stack.last().surface = newTarget;
+    m_stack.append(StackObject(newTarget));
 
     // We copy the screen occlusion into the new RenderSurface subtree, but we never copy in the
     // target occlusion, since we are looking at a new RenderSurface target.
@@ -311,6 +310,8 @@ IntRect CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::unoccludedContentR
     if (contentRect.isEmpty())
         return contentRect;
 
+    ASSERT(layer->targetRenderSurface() == m_stack.last().surface);
+
     // We want to return a rect that contains all the visible parts of |contentRect| in both screen space and in the target surface.
     // So we find the visible parts of |contentRect| in each space, and take the intersection.
 
index 19fc2c1dd0dac8255b5642824327803b12aeee34..f7ad6529c0c4f975633169ca1e29de5394ad6445 100644 (file)
@@ -86,6 +86,8 @@ public:
 
 protected:
     struct StackObject {
+        StackObject() : surface(0) { }
+        StackObject(const RenderSurfaceType* surface) : surface(surface) { }
         const RenderSurfaceType* surface;
         Region occlusionInScreen;
         Region occlusionInTarget;
index f59cd65249db20ce62a4500ed3cc3d410dff8719..2e18778f5f75a540283c56e1b4eb7dcb5de98df7 100644 (file)
@@ -1,3 +1,13 @@
+2012-03-15  Dana Jansens  <danakj@chromium.org>
+
+        [Chromium] REGRESSION(r110596) CCQuadCullerTest.verifyCullChildLinesUpTopLeft fails on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=81083
+
+        Reviewed by Adrienne Walker.
+
+        * tests/CCQuadCullerTest.cpp:
+        (WebCore::TEST):
+
 2012-03-15  David Levin  <levin@chromium.org>
 
         Various autoresize fixes.
index 8a1041a87e44806b3c6c774ac002cef19a9646c3..fa69441f7c735dfb2622ad1f5f42e8d9d0f1c7fd 100644 (file)
@@ -110,8 +110,7 @@ TEST(CCQuadCullerTest, verifyNoCulling)
     EXPECT_NEAR(overdraw.m_pixelsCulled, 0, 1);
 }
 
-// Fails on Windows https://bugs.webkit.org/show_bug.cgi?id=81083
-TEST(CCQuadCullerTest, FAILS_verifyCullChildLinesUpTopLeft)
+TEST(CCQuadCullerTest, verifyCullChildLinesUpTopLeft)
 {
     DECLARE_AND_INITIALIZE_TEST_QUADS