| Index: cc/layer_tree_host_unittest.cc
|
| diff --git a/cc/layer_tree_host_unittest.cc b/cc/layer_tree_host_unittest.cc
|
| index 7add7caf714d43f12eb9a779f7ad4971d7ad5b73..ce076e8251125522ee7049d78c838bbc338ba696 100644
|
| --- a/cc/layer_tree_host_unittest.cc
|
| +++ b/cc/layer_tree_host_unittest.cc
|
| @@ -1627,25 +1627,29 @@ public:
|
| {
|
| // Gain access to internals of the OcclusionTracker.
|
| const TestOcclusionTracker* testOcclusion = static_cast<const TestOcclusionTracker*>(occlusion);
|
| - m_occludedScreenSpace = testOcclusion ? testOcclusion->occlusionInScreenSpace() : Region();
|
| + if (!testOcclusion) {
|
| + m_occlusion.Clear();
|
| + return;
|
| + }
|
| + m_occlusion = UnionRegions(testOcclusion->occlusionFromInsideTarget(), testOcclusion->occlusionFromOutsideTarget());
|
| }
|
|
|
| virtual bool drawsContent() const OVERRIDE { return true; }
|
|
|
| - const Region& occludedScreenSpace() const { return m_occludedScreenSpace; }
|
| - void clearOccludedScreenSpace() { m_occludedScreenSpace.Clear(); }
|
| + const Region& occlusion() const { return m_occlusion; }
|
| + void clearOcclusion() { m_occlusion.Clear(); }
|
|
|
| private:
|
| TestLayer() : Layer() { }
|
| virtual ~TestLayer() { }
|
|
|
| - Region m_occludedScreenSpace;
|
| + Region m_occlusion;
|
| };
|
|
|
| static void setTestLayerPropertiesForTesting(TestLayer* layer, Layer* parent, const gfx::Transform& transform, const gfx::PointF& anchor, const gfx::PointF& position, const gfx::Size& bounds, bool opaque)
|
| {
|
| setLayerPropertiesForTesting(layer, parent, transform, anchor, position, bounds, opaque);
|
| - layer->clearOccludedScreenSpace();
|
| + layer->clearOcclusion();
|
| }
|
|
|
| class LayerTreeHostTestLayerOcclusion : public LayerTreeHostTest {
|
| @@ -1661,20 +1665,17 @@ public:
|
| scoped_refptr<TestLayer> mask = TestLayer::create();
|
|
|
| gfx::Transform identityMatrix;
|
| - gfx::Transform childTransform;
|
| - childTransform.Translate(250, 250);
|
| - childTransform.Rotate(90);
|
| - childTransform.Translate(-250, -250);
|
|
|
| child->setMasksToBounds(true);
|
| + child->setForceRenderSurface(true);
|
|
|
| // See LayerTreeHostCommonTest.layerAddsSelfToOccludedRegionWithRotatedSurface for a nice visual of these layers and how they end up
|
| // positioned on the screen.
|
|
|
| - // The child layer is rotated and the grandChild is opaque, but clipped to the child and rootLayer
|
| + // The child layer is a surface and the grandChild is opaque, but clipped to the child and rootLayer
|
| setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, gfx::PointF(0, 0), gfx::PointF(0, 0), gfx::Size(200, 200), true);
|
| - setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, gfx::PointF(0, 0), gfx::PointF(30, 30), gfx::Size(500, 500), false);
|
| - setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| + setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), false);
|
| + setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(-10, -10), gfx::Size(20, 500), true);
|
|
|
| m_layerTreeHost->setRootLayer(rootLayer);
|
| m_layerTreeHost->setViewportSize(rootLayer->bounds(), rootLayer->bounds());
|
| @@ -1683,61 +1684,45 @@ public:
|
| m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
|
| m_layerTreeHost->commitComplete();
|
|
|
| - EXPECT_EQ(gfx::Rect().ToString(), grandChild->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(30, 40, 170, 160).ToString(), child->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(30, 40, 170, 160).ToString(), rootLayer->occludedScreenSpace().ToString());
|
| + EXPECT_EQ(gfx::Rect().ToString(), grandChild->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(0, 0, 10, 190).ToString(), child->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(10, 10, 10, 190).ToString(), rootLayer->occlusion().ToString());
|
|
|
| // If the child layer is opaque, then it adds to the occlusion seen by the rootLayer.
|
| setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, gfx::PointF(0, 0), gfx::PointF(0, 0), gfx::Size(200, 200), true);
|
| - setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, gfx::PointF(0, 0), gfx::PointF(30, 30), gfx::Size(500, 500), true);
|
| - setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| + setLayerPropertiesForTesting(child.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| + setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(-10, -10), gfx::Size(20, 500), true);
|
|
|
| m_layerTreeHost->setRootLayer(rootLayer);
|
| m_layerTreeHost->setViewportSize(rootLayer->bounds(), rootLayer->bounds());
|
| m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
|
| m_layerTreeHost->commitComplete();
|
|
|
| - EXPECT_EQ(gfx::Rect().ToString(), grandChild->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(30, 40, 170, 160).ToString(), child->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(30, 30, 170, 170).ToString(), rootLayer->occludedScreenSpace().ToString());
|
| + EXPECT_EQ(gfx::Rect().ToString(), grandChild->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(0, 0, 10, 190).ToString(), child->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(10, 10, 190, 190).ToString(), rootLayer->occlusion().ToString());
|
|
|
| // Add a second child to the root layer and the regions should merge
|
| setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, gfx::PointF(0, 0), gfx::PointF(0, 0), gfx::Size(200, 200), true);
|
| - setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(70, 20), gfx::Size(500, 500), true);
|
| - setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, gfx::PointF(0, 0), gfx::PointF(30, 30), gfx::Size(500, 500), true);
|
| - setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| -
|
| - m_layerTreeHost->setRootLayer(rootLayer);
|
| - m_layerTreeHost->setViewportSize(rootLayer->bounds(), rootLayer->bounds());
|
| - m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
|
| - m_layerTreeHost->commitComplete();
|
| -
|
| - EXPECT_EQ(gfx::Rect().ToString(), grandChild->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(30, 40, 170, 160).ToString(), child->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(30, 30, 170, 170).ToString(), child2->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(UnionRegions(gfx::Rect(30, 30, 170, 170), gfx::Rect(70, 20, 130, 180)).ToString(), rootLayer->occludedScreenSpace().ToString());
|
| -
|
| - // Move the second child to be sure.
|
| - setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, gfx::PointF(0, 0), gfx::PointF(0, 0), gfx::Size(200, 200), true);
|
| - setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 70), gfx::Size(500, 500), true);
|
| - setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, gfx::PointF(0, 0), gfx::PointF(30, 30), gfx::Size(500, 500), true);
|
| - setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| + setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), false);
|
| + setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(-10, -10), gfx::Size(20, 500), true);
|
| + setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(20, 10), gfx::Size(10, 500), true);
|
|
|
| m_layerTreeHost->setRootLayer(rootLayer);
|
| m_layerTreeHost->setViewportSize(rootLayer->bounds(), rootLayer->bounds());
|
| m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
|
| m_layerTreeHost->commitComplete();
|
|
|
| - EXPECT_EQ(gfx::Rect().ToString(), grandChild->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(30, 40, 170, 160).ToString(), child->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(30, 30, 170, 170).ToString(), child2->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(UnionRegions(gfx::Rect(10, 70, 190, 130), gfx::Rect(30, 30, 170, 170)).ToString(), rootLayer->occludedScreenSpace().ToString());
|
| + EXPECT_EQ(gfx::Rect().ToString(), child2->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(10, 0, 10, 190).ToString(), grandChild->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(0, 0, 20, 190).ToString(), child->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(10, 10, 20, 190).ToString(), rootLayer->occlusion().ToString());
|
|
|
| // If the child layer has a mask on it, then it shouldn't contribute to occlusion on stuff below it
|
| setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, gfx::PointF(0, 0), gfx::PointF(0, 0), gfx::Size(200, 200), true);
|
| - setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 70), gfx::Size(500, 500), true);
|
| - setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, gfx::PointF(0, 0), gfx::PointF(30, 30), gfx::Size(500, 500), true);
|
| - setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| + setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| + setLayerPropertiesForTesting(child.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(20, 20), gfx::Size(500, 500), true);
|
| + setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(-10, -10), gfx::Size(500, 500), true);
|
|
|
| child->setMaskLayer(mask.get());
|
|
|
| @@ -1746,16 +1731,16 @@ public:
|
| m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
|
| m_layerTreeHost->commitComplete();
|
|
|
| - EXPECT_EQ(gfx::Rect().ToString(), grandChild->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(30, 40, 170, 160).ToString(), child->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect().ToString(), child2->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(10, 70, 190, 130).ToString(), rootLayer->occludedScreenSpace().ToString());
|
| + EXPECT_EQ(gfx::Rect().ToString(), grandChild->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(0, 0, 180, 180).ToString(), child->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect().ToString(), child2->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(10, 10, 190, 190).ToString(), rootLayer->occlusion().ToString());
|
|
|
| // If the child layer with a mask is below child2, then child2 should contribute to occlusion on everything, and child shouldn't contribute to the rootLayer
|
| setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, gfx::PointF(0, 0), gfx::PointF(0, 0), gfx::Size(200, 200), true);
|
| - setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, gfx::PointF(0, 0), gfx::PointF(30, 30), gfx::Size(500, 500), true);
|
| - setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| - setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 70), gfx::Size(500, 500), true);
|
| + setLayerPropertiesForTesting(child.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| + setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(-10, -10), gfx::Size(20, 500), true);
|
| + setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(20, 10), gfx::Size(10, 500), true);
|
|
|
| child->setMaskLayer(mask.get());
|
|
|
| @@ -1764,16 +1749,16 @@ public:
|
| m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
|
| m_layerTreeHost->commitComplete();
|
|
|
| - EXPECT_EQ(gfx::Rect().ToString(), child2->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(10, 70, 190, 130).ToString(), grandChild->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(UnionRegions(gfx::Rect(30, 40, 170, 160), gfx::Rect(10, 70, 190, 130)).ToString(), child->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(10, 70, 190, 130), rootLayer->occludedScreenSpace());
|
| + EXPECT_EQ(gfx::Rect().ToString(), child2->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(10, 0, 10, 190).ToString(), grandChild->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(0, 0, 20, 190).ToString(), child->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(20, 10, 10, 190), rootLayer->occlusion());
|
|
|
| // If the child layer has a non-opaque drawOpacity, then it shouldn't contribute to occlusion on stuff below it
|
| setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, gfx::PointF(0, 0), gfx::PointF(0, 0), gfx::Size(200, 200), true);
|
| - setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 70), gfx::Size(500, 500), true);
|
| - setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, gfx::PointF(0, 0), gfx::PointF(30, 30), gfx::Size(500, 500), true);
|
| - setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| + setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(20, 10), gfx::Size(10, 500), true);
|
| + setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| + setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(-10, -10), gfx::Size(20, 500), true);
|
|
|
| child->setMaskLayer(0);
|
| child->setOpacity(0.5);
|
| @@ -1783,16 +1768,16 @@ public:
|
| m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
|
| m_layerTreeHost->commitComplete();
|
|
|
| - EXPECT_EQ(gfx::Rect().ToString(), grandChild->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(30, 40, 170, 160).ToString(), child->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect().ToString(), child2->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(10, 70, 190, 130).ToString(), rootLayer->occludedScreenSpace().ToString());
|
| + EXPECT_EQ(gfx::Rect().ToString(), grandChild->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(0, 0, 10, 190).ToString(), child->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect().ToString(), child2->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(20, 10, 10, 190).ToString(), rootLayer->occlusion().ToString());
|
|
|
| // If the child layer with non-opaque drawOpacity is below child2, then child2 should contribute to occlusion on everything, and child shouldn't contribute to the rootLayer
|
| setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, gfx::PointF(0, 0), gfx::PointF(0, 0), gfx::Size(200, 200), true);
|
| - setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, gfx::PointF(0, 0), gfx::PointF(30, 30), gfx::Size(500, 500), true);
|
| - setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| - setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 70), gfx::Size(500, 500), true);
|
| + setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(10, 10), gfx::Size(500, 500), true);
|
| + setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(-10, -10), gfx::Size(20, 500), true);
|
| + setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, gfx::PointF(0, 0), gfx::PointF(20, 10), gfx::Size(10, 500), true);
|
|
|
| child->setMaskLayer(0);
|
| child->setOpacity(0.5);
|
| @@ -1802,10 +1787,10 @@ public:
|
| m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
|
| m_layerTreeHost->commitComplete();
|
|
|
| - EXPECT_EQ(gfx::Rect().ToString(), child2->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(10, 70, 190, 130).ToString(), grandChild->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(UnionRegions(gfx::Rect(30, 40, 170, 160), gfx::Rect(10, 70, 190, 130)).ToString(), child->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(10, 70, 190, 130).ToString(), rootLayer->occludedScreenSpace().ToString());
|
| + EXPECT_EQ(gfx::Rect().ToString(), child2->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(10, 0, 10, 190).ToString(), grandChild->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(0, 0, 20, 190).ToString(), child->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(20, 10, 10, 190).ToString(), rootLayer->occlusion().ToString());
|
|
|
| // Kill the layerTreeHost immediately.
|
| m_layerTreeHost->setRootLayer(0);
|
| @@ -1861,10 +1846,10 @@ public:
|
| m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
|
| m_layerTreeHost->commitComplete();
|
|
|
| - EXPECT_EQ(gfx::Rect().ToString(), child2->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(10, 70, 190, 130).ToString(), grandChild->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(UnionRegions(gfx::Rect(30, 40, 170, 30), gfx::Rect(10, 70, 190, 130)).ToString(), child->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(10, 70, 190, 130).ToString(), rootLayer->occludedScreenSpace().ToString());
|
| + EXPECT_EQ(gfx::Rect().ToString(), child2->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(40, 330, 130, 190).ToString(), grandChild->occlusion().ToString());
|
| + EXPECT_EQ(UnionRegions(gfx::Rect(10, 330, 160, 170), gfx::Rect(40, 500, 130, 20)).ToString(), child->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(10, 70, 190, 130).ToString(), rootLayer->occlusion().ToString());
|
|
|
| // If the child layer has a filter that moves pixels/changes alpha, and is below child2, then child should not inherit occlusion from outside its subtree,
|
| // and should not contribute to the rootLayer
|
| @@ -1884,10 +1869,10 @@ public:
|
| m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
|
| m_layerTreeHost->commitComplete();
|
|
|
| - EXPECT_EQ(gfx::Rect().ToString(), child2->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect().ToString(), grandChild->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(30, 40, 170, 160).ToString(), child->occludedScreenSpace().ToString());
|
| - EXPECT_EQ(gfx::Rect(10, 70, 190, 130).ToString(), rootLayer->occludedScreenSpace().ToString());
|
| + EXPECT_EQ(gfx::Rect().ToString(), child2->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect().ToString(), grandChild->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(10, 330, 160, 170).ToString(), child->occlusion().ToString());
|
| + EXPECT_EQ(gfx::Rect(10, 70, 190, 130).ToString(), rootLayer->occlusion().ToString());
|
|
|
| // Kill the layerTreeHost immediately.
|
| m_layerTreeHost->setRootLayer(0);
|
| @@ -1943,8 +1928,8 @@ public:
|
| m_layerTreeHost->commitComplete();
|
|
|
| for (int i = 0; i < numSurfaces-1; ++i) {
|
| - gfx::Rect expectedOcclusion(i+1, i+1, 200-i-1, 200-i-1);
|
| - EXPECT_EQ(expectedOcclusion.ToString(), layers[i]->occludedScreenSpace().ToString());
|
| + gfx::Rect expectedOcclusion(1, 1, 200-i-1, 200-i-1);
|
| + EXPECT_EQ(expectedOcclusion.ToString(), layers[i]->occlusion().ToString());
|
| }
|
|
|
| // Kill the layerTreeHost immediately.
|
|
|