Log Message
[chromium] Do not clip root layer's subtree to viewport https://bugs.webkit.org/show_bug.cgi?id=95235
Reviewed by Adrienne Walker. Source/WebCore: The root layer's renderSurface already correctly clips everything to the viewport's bounds. There are some useful reasons that we should not cause the root layer itself to clip the subtree any further, in particular so that surfaces can remain more cacheable, and to make root layer semantics more homogeneous. Existing tests updated, and otherwise this change is already covered by layout and unit tests. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsInternal): Source/WebKit/chromium: Existing tests updated, and otherwise this change is already covered by layout and unit tests. * tests/CCLayerTreeHostCommonTest.cpp: * tests/CCOcclusionTrackerTest.cpp: (WebKitTests::CCOcclusionTrackerTestChildInRotatedChild::runMyTest): (WebKitTests::CCOcclusionTrackerTestVisitTargetTwoTimes::runMyTest): (WebKitTests::CCOcclusionTrackerTestSurfaceWithTwoOpaqueChildren::runMyTest): (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblings::runMyTest): (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms::runMyTest): (WebKitTests::CCOcclusionTrackerTestFilters::runMyTest): (WebKitTests::CCOcclusionTrackerTestReplicaWithClipping::runMyTest): (WebKitTests::CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect::runMyTest): (WebKitTests::CCOcclusionTrackerTestSurfaceOcclusionTranslatesWithClipping::runMyTest): (WebKitTests::CCOcclusionTrackerTestSurfaceChildOfClippingSurface::runMyTest):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (127016 => 127017)
--- trunk/Source/WebCore/ChangeLog 2012-08-29 17:38:47 UTC (rev 127016)
+++ trunk/Source/WebCore/ChangeLog 2012-08-29 17:40:40 UTC (rev 127017)
@@ -1,3 +1,22 @@
+2012-08-28 Shawn Singh <[email protected]>
+
+ [chromium] Do not clip root layer's subtree to viewport
+ https://bugs.webkit.org/show_bug.cgi?id=95235
+
+ Reviewed by Adrienne Walker.
+
+ The root layer's renderSurface already correctly clips everything
+ to the viewport's bounds. There are some useful reasons that we
+ should not cause the root layer itself to clip the subtree any
+ further, in particular so that surfaces can remain more cacheable,
+ and to make root layer semantics more homogeneous.
+
+ Existing tests updated, and otherwise this change is already
+ covered by layout and unit tests.
+
+ * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
+ (WebCore::calculateDrawTransformsInternal):
+
2012-08-28 David Hyatt <[email protected]>
[New Multicolumn] Implement column contents painting.
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (127016 => 127017)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-08-29 17:38:47 UTC (rev 127016)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-08-29 17:40:40 UTC (rev 127017)
@@ -613,15 +613,12 @@
// Layers that are not their own renderTarget will render into the target of their nearest ancestor.
layer->setRenderTarget(layer->parent()->renderTarget());
} else {
- // FIXME: This root layer special case code should eventually go away. But before that is truly possible,
- // tests (or code) related to CCOcclusionTracker need to be adjusted so that they do not require
- // the rootLayer to clip; the root layer's RenderSurface would already clip and should be enough.
+ // FIXME: This root layer special case code should eventually go away. https://bugs.webkit.org/show_bug.cgi?id=92290
ASSERT(!layer->parent());
ASSERT(layer->renderSurface());
ASSERT(ancestorClipsSubtree);
layer->renderSurface()->setClipRect(clipRectFromAncestor);
- subtreeShouldBeClipped = true;
- clipRectForSubtree = clipRectFromAncestor;
+ subtreeShouldBeClipped = false;
}
}
Modified: trunk/Source/WebKit/chromium/ChangeLog (127016 => 127017)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-08-29 17:38:47 UTC (rev 127016)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-08-29 17:40:40 UTC (rev 127017)
@@ -1,3 +1,26 @@
+2012-08-28 Shawn Singh <[email protected]>
+
+ [chromium] Do not clip root layer's subtree to viewport
+ https://bugs.webkit.org/show_bug.cgi?id=95235
+
+ Reviewed by Adrienne Walker.
+
+ Existing tests updated, and otherwise this change is already
+ covered by layout and unit tests.
+
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebKitTests::CCOcclusionTrackerTestChildInRotatedChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestVisitTargetTwoTimes::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceWithTwoOpaqueChildren::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblings::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestFilters::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestReplicaWithClipping::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceOcclusionTranslatesWithClipping::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceChildOfClippingSurface::runMyTest):
+
2012-08-29 Julien Chaffraix <[email protected]>
[Chromium] CCLayerTreeHostTestScrollChildLayer makes the wrong assumptions
Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (127016 => 127017)
--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-08-29 17:38:47 UTC (rev 127016)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-08-29 17:40:40 UTC (rev 127017)
@@ -672,6 +672,7 @@
setLayerPropertiesForTesting(child.get(), identityMatrix, identityMatrix, FloatPoint::zero(), FloatPoint(30, 30), IntSize(10, 10), false);
parent->addChild(renderSurface1);
+ parent->setMasksToBounds(true);
renderSurface1->addChild(child);
renderSurface1->setForceRenderSurface(true);
Modified: trunk/Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp (127016 => 127017)
--- trunk/Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp 2012-08-29 17:38:47 UTC (rev 127016)
+++ trunk/Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp 2012-08-29 17:40:40 UTC (rev 127017)
@@ -606,6 +606,7 @@
childTransform.translate(-250, -250);
typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ parent->setMasksToBounds(true);
typename Types::LayerType* child = this->createLayer(parent, childTransform, FloatPoint(30, 30), IntSize(500, 500));
child->setMasksToBounds(true);
typename Types::ContentLayerType* layer = this->createDrawingLayer(child, this->identityMatrix, FloatPoint(10, 10), IntSize(500, 500), true);
@@ -685,6 +686,7 @@
childTransform.translate(-250, -250);
typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ parent->setMasksToBounds(true);
typename Types::LayerType* child = this->createLayer(parent, childTransform, FloatPoint(30, 30), IntSize(500, 500));
child->setMasksToBounds(true);
typename Types::ContentLayerType* layer = this->createDrawingLayer(child, this->identityMatrix, FloatPoint(10, 10), IntSize(500, 500), true);
@@ -862,6 +864,7 @@
childTransform.translate(-250, -250);
typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ parent->setMasksToBounds(true);
typename Types::LayerType* child = this->createLayer(parent, childTransform, FloatPoint(30, 30), IntSize(500, 500));
child->setMasksToBounds(true);
typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child, this->identityMatrix, FloatPoint(10, 10), IntSize(500, 500), true);
@@ -950,6 +953,7 @@
childTransform.translate(-250, -250);
typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ parent->setMasksToBounds(true);
typename Types::LayerType* child1 = this->createSurface(parent, childTransform, FloatPoint(30, 30), IntSize(10, 10));
typename Types::LayerType* child2 = this->createSurface(parent, childTransform, FloatPoint(20, 40), IntSize(10, 10));
typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child1, this->identityMatrix, FloatPoint(-10, -10), IntSize(510, 510), true);
@@ -1064,6 +1068,7 @@
child2Transform.translate(-250, -250);
typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ parent->setMasksToBounds(true);
typename Types::LayerType* child1 = this->createSurface(parent, child1Transform, FloatPoint(30, 20), IntSize(10, 10));
typename Types::LayerType* child2 = this->createDrawingSurface(parent, child2Transform, FloatPoint(20, 40), IntSize(10, 10), false);
typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child1, this->identityMatrix, FloatPoint(-10, -20), IntSize(510, 510), true);
@@ -1166,6 +1171,7 @@
layerTransform.translate(-250, -250);
typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ parent->setMasksToBounds(true);
typename Types::ContentLayerType* blurLayer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), IntSize(500, 500), true);
typename Types::ContentLayerType* opaqueLayer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), IntSize(500, 500), true);
typename Types::ContentLayerType* opacityLayer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), IntSize(500, 500), true);
@@ -1275,6 +1281,7 @@
void runMyTest()
{
typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 170));
+ parent->setMasksToBounds(true);
typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 100), IntSize(50, 50), true);
this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(50, 50), IntSize());
this->calcDrawEtc(parent);
@@ -1955,6 +1962,7 @@
transform.translate(-50, -50);
typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ parent->setMasksToBounds(true);
typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, transform, FloatPoint(0, 0), IntSize(100, 100), true);
parent->setPreserves3D(true);
layer->setPreserves3D(true);
@@ -2221,6 +2229,7 @@
void runMyTest()
{
typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ parent->setMasksToBounds(true);
typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(500, 300), false);
surface->setOpaqueContentsRect(IntRect(0, 0, 400, 200));
this->calcDrawEtc(parent);
@@ -2462,6 +2471,7 @@
// This test verifies that the surface cliprect does not end up empty and clip away the entire unoccluded rect.
typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(80, 200));
+ parent->setMasksToBounds(true);
typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100), true);
typename Types::LayerType* surfaceChild = this->createDrawingSurface(surface, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100), false);
typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 50), true);
_______________________________________________ webkit-changes mailing list [email protected] http://lists.webkit.org/mailman/listinfo/webkit-changes
