Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(794)

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 12760011: cc: Chromify LayerTreeHostCommon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 922a1f88796e5f9dade817c86e7ddc493dfce32e..0ede36450fb679f5ca6ce1d207020e411b5c79f2 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -60,7 +60,7 @@ void executeCalculateDrawProperties(Layer* rootLayer, float deviceScaleFactor =
// We are probably not testing what is intended if the rootLayer bounds are empty.
DCHECK(!rootLayer->bounds().IsEmpty());
- LayerTreeHostCommon::calculateDrawProperties(rootLayer, deviceViewportSize, deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, canUseLCDText, dummyRenderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(rootLayer, deviceViewportSize, deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, canUseLCDText, &dummyRenderSurfaceLayerList);
}
void executeCalculateDrawProperties(LayerImpl* rootLayer, float deviceScaleFactor = 1, float pageScaleFactor = 1, bool canUseLCDText = false)
@@ -72,7 +72,7 @@ void executeCalculateDrawProperties(LayerImpl* rootLayer, float deviceScaleFacto
// We are probably not testing what is intended if the rootLayer bounds are empty.
DCHECK(!rootLayer->bounds().IsEmpty());
- LayerTreeHostCommon::calculateDrawProperties(rootLayer, deviceViewportSize, deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, canUseLCDText, dummyRenderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(rootLayer, deviceViewportSize, deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, canUseLCDText, &dummyRenderSurfaceLayerList, false);
}
scoped_ptr<LayerImpl> createTreeForFixedPositionTests(LayerTreeHostImpl* hostImpl)
@@ -890,7 +890,7 @@ TEST(LayerTreeHostCommonTest, verifyRenderSurfaceListForRenderSurfaceWithClipped
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
// The child layer's content is entirely outside the parent's clip rect, so the intermediate
// render surface should not be listed here, even if it was forced to be created. Render surfaces without children or visible
@@ -917,7 +917,7 @@ TEST(LayerTreeHostCommonTest, verifyRenderSurfaceListForTransparentChild)
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
// Since the layer is transparent, renderSurface1->render_surface() should not have gotten added anywhere.
// Also, the drawable content rect should not have been extended by the children.
@@ -949,7 +949,7 @@ TEST(LayerTreeHostCommonTest, verifyForceRenderSurface)
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
// The root layer always creates a renderSurface
EXPECT_TRUE(parent->render_surface());
@@ -958,7 +958,7 @@ TEST(LayerTreeHostCommonTest, verifyForceRenderSurface)
renderSurfaceLayerList.clear();
renderSurface1->SetForceRenderSurface(false);
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_TRUE(parent->render_surface());
EXPECT_FALSE(renderSurface1->render_surface());
EXPECT_EQ(1U, renderSurfaceLayerList.size());
@@ -1573,7 +1573,7 @@ TEST(LayerTreeHostCommonTest, verifyClipRectCullsRenderSurfaces)
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
ASSERT_EQ(2U, renderSurfaceLayerList.size());
EXPECT_EQ(parent->id(), renderSurfaceLayerList[0]->id());
@@ -1620,7 +1620,7 @@ TEST(LayerTreeHostCommonTest, verifyClipRectCullsSurfaceWithoutVisibleContent)
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
// Without an animation, we should cull child and grandChild from the renderSurfaceLayerList.
ASSERT_EQ(1U, renderSurfaceLayerList.size());
@@ -1634,7 +1634,7 @@ TEST(LayerTreeHostCommonTest, verifyClipRectCullsSurfaceWithoutVisibleContent)
grandChild->ClearRenderSurface();
renderSurfaceLayerList.clear();
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
// With an animating transform, we should keep child and grandChild in the renderSurfaceLayerList.
ASSERT_EQ(3U, renderSurfaceLayerList.size());
@@ -1686,7 +1686,7 @@ TEST(LayerTreeHostCommonTest, verifyIsClippedIsSetCorrectly)
// Case 1: nothing is clipped except the root renderSurface.
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
ASSERT_TRUE(root->render_surface());
ASSERT_TRUE(child2->render_surface());
@@ -1707,7 +1707,7 @@ TEST(LayerTreeHostCommonTest, verifyIsClippedIsSetCorrectly)
// that clip.
renderSurfaceLayerList.clear();
parent->SetMasksToBounds(true);
- LayerTreeHostCommon::calculateDrawProperties(root.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
ASSERT_TRUE(root->render_surface());
ASSERT_TRUE(child2->render_surface());
@@ -1727,7 +1727,7 @@ TEST(LayerTreeHostCommonTest, verifyIsClippedIsSetCorrectly)
renderSurfaceLayerList.clear();
parent->SetMasksToBounds(false);
child2->SetMasksToBounds(true);
- LayerTreeHostCommon::calculateDrawProperties(root.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
ASSERT_TRUE(root->render_surface());
ASSERT_TRUE(child2->render_surface());
@@ -1786,7 +1786,7 @@ TEST(LayerTreeHostCommonTest, verifydrawable_content_rectForLayers)
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_RECT_EQ(gfx::Rect(gfx::Point(5, 5), gfx::Size(10, 10)), grandChild1->drawable_content_rect());
EXPECT_RECT_EQ(gfx::Rect(gfx::Point(15, 15), gfx::Size(5, 5)), grandChild3->drawable_content_rect());
@@ -1856,7 +1856,7 @@ TEST(LayerTreeHostCommonTest, verifyClipRectIsPropagatedCorrectlyToSurfaces)
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
ASSERT_TRUE(grandChild1->render_surface());
ASSERT_TRUE(grandChild2->render_surface());
@@ -2020,18 +2020,18 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectForIdentityTransform)
// Case 1: Layer is contained within the surface.
gfx::Rect layerContentRect = gfx::Rect(gfx::Point(10, 10), gfx::Size(30, 30));
gfx::Rect expected = gfx::Rect(gfx::Point(10, 10), gfx::Size(30, 30));
- gfx::Rect actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ gfx::Rect actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
// Case 2: Layer is outside the surface rect.
layerContentRect = gfx::Rect(gfx::Point(120, 120), gfx::Size(30, 30));
- actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_TRUE(actual.IsEmpty());
// Case 3: Layer is partially overlapping the surface rect.
layerContentRect = gfx::Rect(gfx::Point(80, 80), gfx::Size(30, 30));
expected = gfx::Rect(gfx::Point(80, 80), gfx::Size(20, 20));
- actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
}
@@ -2047,20 +2047,20 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectForTranslations)
layerToSurfaceTransform.MakeIdentity();
layerToSurfaceTransform.Translate(10, 10);
gfx::Rect expected = gfx::Rect(gfx::Point(0, 0), gfx::Size(30, 30));
- gfx::Rect actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ gfx::Rect actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
// Case 2: Layer is outside the surface rect.
layerToSurfaceTransform.MakeIdentity();
layerToSurfaceTransform.Translate(120, 120);
- actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_TRUE(actual.IsEmpty());
// Case 3: Layer is partially overlapping the surface rect.
layerToSurfaceTransform.MakeIdentity();
layerToSurfaceTransform.Translate(80, 80);
expected = gfx::Rect(gfx::Point(0, 0), gfx::Size(20, 20));
- actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
}
@@ -2078,14 +2078,14 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectFor2DRotations)
layerToSurfaceTransform.Translate(50, 50);
layerToSurfaceTransform.Rotate(45);
gfx::Rect expected = gfx::Rect(gfx::Point(0, 0), gfx::Size(30, 30));
- gfx::Rect actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ gfx::Rect actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
// Case 2: Layer is outside the surface rect.
layerToSurfaceTransform.MakeIdentity();
layerToSurfaceTransform.Translate(-50, 0);
layerToSurfaceTransform.Rotate(45);
- actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_TRUE(actual.IsEmpty());
// Case 3: The layer is rotated about its top-left corner. In surface space, the layer
@@ -2096,7 +2096,7 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectFor2DRotations)
layerToSurfaceTransform.MakeIdentity();
layerToSurfaceTransform.Rotate(45);
expected = gfx::Rect(gfx::Point(0, 0), gfx::Size(30, 30));
- actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
// Case 4: The layer is rotated about its top-left corner, and translated upwards. In
@@ -2108,7 +2108,7 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectFor2DRotations)
layerToSurfaceTransform.Translate(0, -sqrt(2.0) * 15);
layerToSurfaceTransform.Rotate(45);
expected = gfx::Rect(gfx::Point(15, 0), gfx::Size(15, 30)); // right half of layer bounds.
- actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
}
@@ -2124,7 +2124,7 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectFor3dOrthographicTransform)
layerToSurfaceTransform.MakeIdentity();
layerToSurfaceTransform.RotateAboutYAxis(45);
gfx::Rect expected = gfx::Rect(gfx::Point(0, 0), gfx::Size(100, 100));
- gfx::Rect actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ gfx::Rect actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
// Case 2: Orthographic projection of a layer rotated about y-axis by 45 degrees, but
@@ -2135,7 +2135,7 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectFor3dOrthographicTransform)
layerToSurfaceTransform.Translate(-halfWidthOfRotatedLayer, 0);
layerToSurfaceTransform.RotateAboutYAxis(45); // rotates about the left edge of the layer
expected = gfx::Rect(gfx::Point(50, 0), gfx::Size(50, 100)); // right half of the layer.
- actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
}
@@ -2162,7 +2162,7 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectFor3dPerspectiveTransform)
layerToSurfaceTransform.Translate3d(0, 0, -27);
gfx::Rect expected = gfx::Rect(gfx::Point(-50, -50), gfx::Size(200, 200));
- gfx::Rect actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ gfx::Rect actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
// Case 2: same projection as before, except that the layer is also translated to the
@@ -2175,7 +2175,7 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectFor3dPerspectiveTransform)
//
layerToSurfaceTransform.Translate3d(-200, 0, 0);
expected = gfx::Rect(gfx::Point(50, -50), gfx::Size(100, 200)); // The right half of the layer's bounding rect.
- actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
}
@@ -2198,7 +2198,7 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectFor3dOrthographicIsNotClippedBehi
layerToSurfaceTransform.Translate(-50, 0);
gfx::Rect expected = gfx::Rect(gfx::Point(0, 0), gfx::Size(100, 100));
- gfx::Rect actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ gfx::Rect actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
}
@@ -2231,7 +2231,7 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectFor3dPerspectiveWhenClippedByW)
int expectedXPosition = 0;
int expectedWidth = 10;
- gfx::Rect actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ gfx::Rect actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_EQ(expectedXPosition, actual.x());
EXPECT_EQ(expectedWidth, actual.width());
}
@@ -2264,7 +2264,7 @@ TEST(LayerTreeHostCommonTest, verifyVisibleRectForPerspectiveUnprojection)
// clipped. But, the net result of rounding visible region to an axis-aligned rect is
// that the entire layer should still be considered visible.
gfx::Rect expected = gfx::Rect(gfx::Point(-10, -10), gfx::Size(20, 20));
- gfx::Rect actual = LayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ gfx::Rect actual = LayerTreeHostCommon::CalculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
EXPECT_RECT_EQ(expected, actual);
}
@@ -2692,7 +2692,7 @@ TEST(LayerTreeHostCommonTest, verifyBackFaceCullingWithoutPreserves3d)
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
// Verify which renderSurfaces were created.
EXPECT_FALSE(frontFacingChild->render_surface());
@@ -2791,7 +2791,7 @@ TEST(LayerTreeHostCommonTest, verifyBackFaceCullingWithPreserves3d)
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
// Verify which renderSurfaces were created.
EXPECT_FALSE(frontFacingChild->render_surface());
@@ -2871,7 +2871,7 @@ TEST(LayerTreeHostCommonTest, verifyBackFaceCullingWithAnimatingTransforms)
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_FALSE(child->render_surface());
EXPECT_TRUE(animatingSurface->render_surface());
@@ -2937,7 +2937,7 @@ TEST(LayerTreeHostCommonTest, verifyBackFaceCullingWithPreserves3dForFlatteningS
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
// Verify which renderSurfaces were created.
EXPECT_TRUE(frontFacingSurface->render_surface());
@@ -2966,11 +2966,11 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForEmptyLayerList)
std::vector<LayerImpl*> renderSurfaceLayerList;
gfx::Point testPoint(0, 0);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(10, 20);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
}
@@ -2989,7 +2989,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleLayer)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -2997,21 +2997,21 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleLayer)
// Hit testing for a point outside the layer should return a null pointer.
gfx::Point testPoint(101, 101);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(-1, -1);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit testing for a point inside should return the root layer.
testPoint = gfx::Point(1, 1);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
testPoint = gfx::Point(99, 99);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
}
@@ -3040,7 +3040,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleLayerAndHud)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), hudBounds, 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), hudBounds, 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -3048,21 +3048,21 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleLayerAndHud)
// Hit testing for a point inside HUD, but outside root should return null
gfx::Point testPoint(101, 101);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(-1, -1);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit testing for a point inside should return the root layer, never the HUD layer.
testPoint = gfx::Point(1, 1);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
testPoint = gfx::Point(99, 99);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
}
@@ -3089,7 +3089,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForUninvertibleTransform)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -3100,31 +3100,31 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForUninvertibleTransform)
// accidentally ignored and treated like an identity, then the hit testing will
// incorrectly hit the layer when it shouldn't.
gfx::Point testPoint(1, 1);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(10, 10);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(10, 30);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(50, 50);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(67, 48);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(99, 99);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(-1, -1);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
}
@@ -3143,7 +3143,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSinglePositionedLayer)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -3151,22 +3151,22 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSinglePositionedLayer)
// Hit testing for a point outside the layer should return a null pointer.
gfx::Point testPoint(49, 49);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Even though the layer exists at (101, 101), it should not be visible there since the root renderSurface would clamp it.
testPoint = gfx::Point(101, 101);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit testing for a point inside should return the root layer.
testPoint = gfx::Point(51, 51);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
testPoint = gfx::Point(99, 99);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
}
@@ -3190,7 +3190,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleRotatedLayer)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -3199,26 +3199,26 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleRotatedLayer)
// Hit testing for points outside the layer.
// These corners would have been inside the un-transformed layer, but they should not hit the correctly transformed layer.
gfx::Point testPoint(99, 99);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(1, 1);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit testing for a point inside should return the root layer.
testPoint = gfx::Point(1, 50);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
// Hit testing the corners that would overlap the unclipped layer, but are outside the clipped region.
testPoint = gfx::Point(50, -1);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_FALSE(resultLayer);
testPoint = gfx::Point(-1, 50);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_FALSE(resultLayer);
}
@@ -3246,7 +3246,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSinglePerspectiveLayer)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -3255,21 +3255,21 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSinglePerspectiveLayer)
// Hit testing for points outside the layer.
// These corners would have been inside the un-transformed layer, but they should not hit the correctly transformed layer.
gfx::Point testPoint(24, 24);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(76, 76);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit testing for a point inside should return the root layer.
testPoint = gfx::Point(26, 26);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
testPoint = gfx::Point(74, 74);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
}
@@ -3311,7 +3311,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleLayerWithScaledContents)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
// The visibleContentRect for testLayer is actually 100x100, even though its layout size is 50x50, positioned at 25x25.
@@ -3322,25 +3322,25 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleLayerWithScaledContents)
// Hit testing for a point outside the layer should return a null pointer (the root layer does not draw content, so it will not be hit tested either).
gfx::Point testPoint(101, 101);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(24, 24);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(76, 76);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit testing for a point inside should return the test layer.
testPoint = gfx::Point(26, 26);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
testPoint = gfx::Point(74, 74);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
}
@@ -3375,7 +3375,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSimpleClippedLayer)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -3385,22 +3385,22 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSimpleClippedLayer)
// Hit testing for a point outside the layer should return a null pointer.
// Despite the child layer being very large, it should be clipped to the root layer's bounds.
gfx::Point testPoint(24, 24);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Even though the layer exists at (101, 101), it should not be visible there since the clippingLayer would clamp it.
testPoint = gfx::Point(76, 76);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit testing for a point inside should return the child layer.
testPoint = gfx::Point(26, 26);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(456, resultLayer->id());
testPoint = gfx::Point(74, 74);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(456, resultLayer->id());
}
@@ -3465,7 +3465,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForMultiClippedRotatedLayer)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
// The grandChild is expected to create a renderSurface because it masksToBounds and is not axis aligned.
@@ -3477,12 +3477,12 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForMultiClippedRotatedLayer)
// (11, 89) is close to the the bottom left corner within the clip, but it is not inside the layer.
gfx::Point testPoint(11, 89);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Closer inwards from the bottom left will overlap the layer.
testPoint = gfx::Point(25, 75);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(2468, resultLayer->id());
@@ -3491,24 +3491,24 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForMultiClippedRotatedLayer)
// visibleContentRect without considering how parent may clip the layer, then hit
// testing would accidentally think that the point successfully hits the layer.
testPoint = gfx::Point(4, 50);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// (11, 50) is inside the layer and within the clipped area.
testPoint = gfx::Point(11, 50);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(2468, resultLayer->id());
// Around the middle, just to the right and up, would have hit the layer except that
// that area should be clipped away by the parent.
testPoint = gfx::Point(51, 51);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Around the middle, just to the left and down, should successfully hit the layer.
testPoint = gfx::Point(49, 51);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(2468, resultLayer->id());
}
@@ -3547,7 +3547,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForNonClippingIntermediateLayer)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -3556,21 +3556,21 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForNonClippingIntermediateLayer)
// Hit testing for a point outside the layer should return a null pointer.
gfx::Point testPoint(69, 69);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(91, 91);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit testing for a point inside should return the child layer.
testPoint = gfx::Point(71, 71);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(456, resultLayer->id());
testPoint = gfx::Point(89, 89);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(456, resultLayer->id());
}
@@ -3627,7 +3627,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForMultipleLayers)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_TRUE(child1);
@@ -3642,37 +3642,37 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForMultipleLayers)
// Nothing overlaps the rootLayer at (1, 1), so hit testing there should find the root layer.
gfx::Point testPoint = gfx::Point(1, 1);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(1, resultLayer->id());
// At (15, 15), child1 and root are the only layers. child1 is expected to be on top.
testPoint = gfx::Point(15, 15);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(2, resultLayer->id());
// At (51, 20), child1 and child2 overlap. child2 is expected to be on top.
testPoint = gfx::Point(51, 20);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(3, resultLayer->id());
// At (80, 51), child2 and grandChild1 overlap. child2 is expected to be on top.
testPoint = gfx::Point(80, 51);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(3, resultLayer->id());
// At (51, 51), all layers overlap each other. child2 is expected to be on top of all other layers.
testPoint = gfx::Point(51, 51);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(3, resultLayer->id());
// At (20, 51), child1 and grandChild1 overlap. grandChild1 is expected to be on top.
testPoint = gfx::Point(20, 51);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(4, resultLayer->id());
}
@@ -3735,7 +3735,7 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForMultipleLayerLists)
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_TRUE(child1);
@@ -3756,37 +3756,37 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForMultipleLayerLists)
// Nothing overlaps the rootLayer at (1, 1), so hit testing there should find the root layer.
gfx::Point testPoint = gfx::Point(1, 1);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(1, resultLayer->id());
// At (15, 15), child1 and root are the only layers. child1 is expected to be on top.
testPoint = gfx::Point(15, 15);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(2, resultLayer->id());
// At (51, 20), child1 and child2 overlap. child2 is expected to be on top.
testPoint = gfx::Point(51, 20);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(3, resultLayer->id());
// At (80, 51), child2 and grandChild1 overlap. child2 is expected to be on top.
testPoint = gfx::Point(80, 51);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(3, resultLayer->id());
// At (51, 51), all layers overlap each other. child2 is expected to be on top of all other layers.
testPoint = gfx::Point(51, 51);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(3, resultLayer->id());
// At (20, 51), child1 and grandChild1 overlap. grandChild1 is expected to be on top.
testPoint = gfx::Point(20, 51);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPoint(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(4, resultLayer->id());
}
@@ -3797,11 +3797,11 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForEmptyLayerL
std::vector<LayerImpl*> renderSurfaceLayerList;
gfx::Point testPoint(0, 0);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(10, 20);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
}
@@ -3821,7 +3821,7 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForSingleLayer
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -3829,36 +3829,36 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForSingleLayer
// Hit checking for any point should return a null pointer for a layer without any touch event handler regions.
gfx::Point testPoint(11, 11);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
root->SetTouchEventHandlerRegion(touchHandlerRegion);
// Hit checking for a point outside the layer should return a null pointer.
testPoint = gfx::Point(101, 101);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(-1, -1);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit checking for a point inside the layer, but outside the touch handler region should return a null pointer.
testPoint = gfx::Point(1, 1);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(99, 99);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit checking for a point inside the touch event handler region should return the root layer.
testPoint = gfx::Point(11, 11);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
testPoint = gfx::Point(59, 59);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
}
@@ -3887,7 +3887,7 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForUninvertibl
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -3898,31 +3898,31 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForUninvertibl
// accidentally ignored and treated like an identity, then the hit testing will
// incorrectly hit the layer when it shouldn't.
gfx::Point testPoint(1, 1);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(10, 10);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(10, 30);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(50, 50);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(67, 48);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(99, 99);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(-1, -1);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
}
@@ -3943,7 +3943,7 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForSinglePosit
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -3951,27 +3951,27 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForSinglePosit
// Hit checking for a point outside the layer should return a null pointer.
gfx::Point testPoint(49, 49);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Even though the layer has a touch handler region containing (101, 101), it should not be visible there since the root renderSurface would clamp it.
testPoint = gfx::Point(101, 101);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit checking for a point inside the layer, but outside the touch handler region should return a null pointer.
testPoint = gfx::Point(51, 51);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit checking for a point inside the touch event handler region should return the root layer.
testPoint = gfx::Point(61, 61);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
testPoint = gfx::Point(99, 99);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
}
@@ -4015,7 +4015,7 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForSingleLayer
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
// The visibleContentRect for testLayer is actually 100x100, even though its layout size is 50x50, positioned at 25x25.
@@ -4026,34 +4026,34 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForSingleLayer
// Hit checking for a point outside the layer should return a null pointer (the root layer does not draw content, so it will not be tested either).
gfx::Point testPoint(76, 76);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit checking for a point inside the layer, but outside the touch handler region should return a null pointer.
testPoint = gfx::Point(26, 26);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(34, 34);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(65, 65);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(74, 74);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit checking for a point inside the touch event handler region should return the root layer.
testPoint = gfx::Point(35, 35);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
testPoint = gfx::Point(64, 64);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
}
@@ -4091,7 +4091,7 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForSingleLayer
pageScaleTransform.Scale(pageScaleFactor, pageScaleFactor);
root->SetImplTransform(pageScaleTransform); // Applying the pageScaleFactor through implTransform.
gfx::Size scaledBoundsForRoot = gfx::ToCeiledSize(gfx::ScaleSize(root->bounds(), deviceScaleFactor * pageScaleFactor));
- LayerTreeHostCommon::calculateDrawProperties(root.get(), scaledBoundsForRoot, deviceScaleFactor, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), scaledBoundsForRoot, deviceScaleFactor, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
// The visibleContentRect for testLayer is actually 100x100, even though its layout size is 50x50, positioned at 25x25.
@@ -4105,40 +4105,40 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForSingleLayer
// Hit checking for a point outside the layer should return a null pointer (the root layer does not draw content, so it will not be tested either).
gfx::PointF testPoint(76, 76);
testPoint = gfx::ScalePoint(testPoint, deviceScaleFactor * pageScaleFactor);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit checking for a point inside the layer, but outside the touch handler region should return a null pointer.
testPoint = gfx::Point(26, 26);
testPoint = gfx::ScalePoint(testPoint, deviceScaleFactor * pageScaleFactor);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(34, 34);
testPoint = gfx::ScalePoint(testPoint, deviceScaleFactor * pageScaleFactor);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(65, 65);
testPoint = gfx::ScalePoint(testPoint, deviceScaleFactor * pageScaleFactor);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(74, 74);
testPoint = gfx::ScalePoint(testPoint, deviceScaleFactor * pageScaleFactor);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit checking for a point inside the touch event handler region should return the root layer.
testPoint = gfx::Point(35, 35);
testPoint = gfx::ScalePoint(testPoint, deviceScaleFactor * pageScaleFactor);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
testPoint = gfx::Point(64, 64);
testPoint = gfx::ScalePoint(testPoint, deviceScaleFactor * pageScaleFactor);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(12345, resultLayer->id());
}
@@ -4175,7 +4175,7 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForSimpleClipp
std::vector<LayerImpl*> renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList, false);
+ LayerTreeHostCommon::CalculateDrawProperties(root.get(), root->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList, false);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, renderSurfaceLayerList.size());
@@ -4185,26 +4185,26 @@ TEST(LayerTreeHostCommonTest, verifyHitCheckingTouchHandlerRegionsForSimpleClipp
// Hit checking for a point outside the layer should return a null pointer.
// Despite the child layer being very large, it should be clipped to the root layer's bounds.
gfx::Point testPoint(24, 24);
- LayerImpl* resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ LayerImpl* resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit checking for a point inside the layer, but outside the touch handler region should return a null pointer.
testPoint = gfx::Point(35, 35);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
testPoint = gfx::Point(74, 74);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
EXPECT_FALSE(resultLayer);
// Hit checking for a point inside the touch event handler region should return the root layer.
testPoint = gfx::Point(25, 25);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(456, resultLayer->id());
testPoint = gfx::Point(34, 34);
- resultLayer = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
+ resultLayer = LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(testPoint, renderSurfaceLayerList);
ASSERT_TRUE(resultLayer);
EXPECT_EQ(456, resultLayer->id());
}
@@ -4270,7 +4270,7 @@ TEST(LayerTreeHostCommonTest, verifyLayerTransformsInHighDPI)
const double deviceScaleFactor = 2.5;
const double pageScaleFactor = 1;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor, parent);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor, child);
@@ -4365,7 +4365,7 @@ TEST(LayerTreeHostCommonTest, verifySurfaceLayerTransformsInHighDPI)
pageScaleTransform.Scale(pageScaleFactor, pageScaleFactor);
parent->SetImplTransform(pageScaleTransform);
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor, parent);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor, perspectiveSurface);
@@ -4424,7 +4424,7 @@ TEST(LayerTreeHostCommonTest, verifyLayerTransformsInHighDPIAccurateScaleZeroChi
const float deviceScaleFactor = 1.7f;
const float pageScaleFactor = 1;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor, parent);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor, child);
@@ -4529,7 +4529,7 @@ TEST(LayerTreeHostCommonTest, verifyContentsScale)
pageScaleMatrix.Scale(pageScaleFactor, pageScaleFactor);
parent->SetSublayerTransform(pageScaleMatrix);
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * initialParentScale, parent);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor * initialParentScale * initialChildScale, childScale);
@@ -4560,7 +4560,7 @@ TEST(LayerTreeHostCommonTest, verifyContentsScale)
parent->SetSublayerTransform(pageScaleMatrix);
renderSurfaceLayerList.clear();
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * initialParentScale, parent);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor * initialParentScale * initialChildScale, childScale);
@@ -4575,7 +4575,7 @@ TEST(LayerTreeHostCommonTest, verifyContentsScale)
childEmpty->SetTransform(childScaleMatrix);
renderSurfaceLayerList.clear();
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * initialParentScale, parent);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor, childScale);
@@ -4592,7 +4592,7 @@ TEST(LayerTreeHostCommonTest, verifyContentsScale)
parent->SetSublayerTransform(pageScaleMatrix);
renderSurfaceLayerList.clear();
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * initialParentScale, parent);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor, childScale);
@@ -4637,7 +4637,7 @@ TEST(LayerTreeHostCommonTest, verifySmallContentsScale)
pageScaleMatrix.Scale(pageScaleFactor, pageScaleFactor);
parent->SetSublayerTransform(pageScaleMatrix);
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * initialParentScale, parent);
// The child's scale is < 1, so we should not save and use that scale factor.
@@ -4650,7 +4650,7 @@ TEST(LayerTreeHostCommonTest, verifySmallContentsScale)
childScale->SetTransform(childScaleMatrix);
renderSurfaceLayerList.clear();
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * initialParentScale, parent);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor * initialParentScale * finalChildScale, childScale);
@@ -4734,7 +4734,7 @@ TEST(LayerTreeHostCommonTest, verifyContentsScaleForSurfaces)
pageScaleMatrix.Scale(pageScaleFactor, pageScaleFactor);
parent->SetSublayerTransform(pageScaleMatrix);
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, pageScaleFactor, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * initialParentScale, parent);
EXPECT_CONTENTS_SCALE_EQ(deviceScaleFactor * pageScaleFactor * initialParentScale * initialChildScale, surfaceScale);
@@ -4828,7 +4828,7 @@ TEST(LayerTreeHostCommonTest, verifyContentsScaleForAnimatingLayer)
std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
int dummyMaxTextureSize = 512;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(initialParentScale, parent);
// The layers with animating transforms should not compute a contentsScale other than 1 until they finish animating.
@@ -4837,7 +4837,7 @@ TEST(LayerTreeHostCommonTest, verifyContentsScaleForAnimatingLayer)
// Remove the animation, now it can save a raster scale.
childScale->layer_animation_controller()->RemoveAnimation(animationId);
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
EXPECT_CONTENTS_SCALE_EQ(initialParentScale, parent);
// The layers with animating transforms should not compute a contentsScale other than 1 until they finish animating.
@@ -4874,7 +4874,7 @@ TEST(LayerTreeHostCommonTest, verifyRenderSurfaceTransformsInHighDPI)
int dummyMaxTextureSize = 512;
const double deviceScaleFactor = 1.5;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
// We should have two render surfaces. The root's render surface and child's
// render surface (it needs one because it has a replica layer).
@@ -4952,7 +4952,7 @@ TEST(LayerTreeHostCommonTest, verifyRenderSurfaceTransformsInHighDPIAccurateScal
int dummyMaxTextureSize = 512;
const float deviceScaleFactor = 1.7f;
- LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
+ LayerTreeHostCommon::CalculateDrawProperties(parent.get(), parent->bounds(), deviceScaleFactor, 1, dummyMaxTextureSize, false, &renderSurfaceLayerList);
// We should have two render surfaces. The root's render surface and child's
// render surface (it needs one because it has a replica layer).
@@ -4996,12 +4996,12 @@ TEST(LayerTreeHostCommonTest, verifySubtreeSearch)
root->AddChild(child.get());
int nonexistentId = -1;
- EXPECT_EQ(root, LayerTreeHostCommon::findLayerInSubtree(root.get(), root->id()));
- EXPECT_EQ(child, LayerTreeHostCommon::findLayerInSubtree(root.get(), child->id()));
- EXPECT_EQ(grandChild, LayerTreeHostCommon::findLayerInSubtree(root.get(), grandChild->id()));
- EXPECT_EQ(maskLayer, LayerTreeHostCommon::findLayerInSubtree(root.get(), maskLayer->id()));
- EXPECT_EQ(replicaLayer, LayerTreeHostCommon::findLayerInSubtree(root.get(), replicaLayer->id()));
- EXPECT_EQ(0, LayerTreeHostCommon::findLayerInSubtree(root.get(), nonexistentId));
+ EXPECT_EQ(root, LayerTreeHostCommon::FindLayerInSubtree(root.get(), root->id()));
+ EXPECT_EQ(child, LayerTreeHostCommon::FindLayerInSubtree(root.get(), child->id()));
+ EXPECT_EQ(grandChild, LayerTreeHostCommon::FindLayerInSubtree(root.get(), grandChild->id()));
+ EXPECT_EQ(maskLayer, LayerTreeHostCommon::FindLayerInSubtree(root.get(), maskLayer->id()));
+ EXPECT_EQ(replicaLayer, LayerTreeHostCommon::FindLayerInSubtree(root.get(), replicaLayer->id()));
+ EXPECT_EQ(0, LayerTreeHostCommon::FindLayerInSubtree(root.get(), nonexistentId));
}
TEST(LayerTreeHostCommonTest, verifyTransparentChildRenderSurfaceCreation)
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698