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

Unified Diff: cc/trees/layer_tree_impl_unittest.cc

Issue 2716733007: cc: Rename LayerImpl::render_surface to GetRenderSurface (Closed)
Patch Set: Created 3 years, 10 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_impl.cc ('k') | cc/trees/occlusion_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl_unittest.cc
diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc
index 0b13432bd1d03a77264d3fb14b318534fafffdbb..81d2800c9867fc8244d20c99741e9de1903af8b4 100644
--- a/cc/trees/layer_tree_impl_unittest.cc
+++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -136,7 +136,7 @@ TEST_F(LayerTreeImplTest, HitTestingForSingleLayer) {
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root_layer()->render_surface()->layer_list().size());
+ ASSERT_EQ(1u, root_layer()->GetRenderSurface()->layer_list().size());
// Hit testing for a point outside the layer should return a null pointer.
gfx::PointF test_point(101.f, 101.f);
@@ -205,7 +205,7 @@ TEST_F(LayerTreeImplTest, HitTestingForSingleLayerAndHud) {
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(2u, root_layer()->render_surface()->layer_list().size());
+ ASSERT_EQ(2u, root_layer()->GetRenderSurface()->layer_list().size());
// Hit testing for a point inside HUD, but outside root should return null
gfx::PointF test_point(101.f, 101.f);
@@ -257,7 +257,7 @@ TEST_F(LayerTreeImplTest, HitTestingForUninvertibleTransform) {
skip_verify_visible_rect_calculations);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root_layer()->render_surface()->layer_list().size());
+ ASSERT_EQ(1u, root_layer()->GetRenderSurface()->layer_list().size());
ASSERT_FALSE(root_layer()->ScreenSpaceTransform().IsInvertible());
// Hit testing any point should not hit the layer. If the invertible matrix is
@@ -312,7 +312,7 @@ TEST_F(LayerTreeImplTest, HitTestingForSinglePositionedLayer) {
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root_layer()->render_surface()->layer_list().size());
+ ASSERT_EQ(1u, root_layer()->GetRenderSurface()->layer_list().size());
// Hit testing for a point outside the layer should return a null pointer.
gfx::PointF test_point(49.f, 49.f);
@@ -357,7 +357,7 @@ TEST_F(LayerTreeImplTest, HitTestingForSingleRotatedLayer) {
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root_layer()->render_surface()->layer_list().size());
+ ASSERT_EQ(1u, root_layer()->GetRenderSurface()->layer_list().size());
// Hit testing for points outside the layer.
// These corners would have been inside the un-transformed layer, but they
@@ -529,7 +529,7 @@ TEST_F(LayerTreeImplTest, HitTestingForSinglePerspectiveLayer) {
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root_layer()->render_surface()->layer_list().size());
+ ASSERT_EQ(1u, root_layer()->GetRenderSurface()->layer_list().size());
// Hit testing for points outside the layer.
// These corners would have been inside the un-transformed layer, but they
@@ -587,8 +587,8 @@ TEST_F(LayerTreeImplTest, HitTestingForSimpleClippedLayer) {
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root_layer()->render_surface()->layer_list().size());
- ASSERT_EQ(456, root_layer()->render_surface()->layer_list().at(0)->id());
+ ASSERT_EQ(1u, root_layer()->GetRenderSurface()->layer_list().size());
+ ASSERT_EQ(456, root_layer()->GetRenderSurface()->layer_list().at(0)->id());
// 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
@@ -766,8 +766,8 @@ TEST_F(LayerTreeImplTest, HitTestingForNonClippingIntermediateLayer) {
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root_layer()->render_surface()->layer_list().size());
- ASSERT_EQ(456, root_layer()->render_surface()->layer_list().at(0)->id());
+ ASSERT_EQ(1u, root_layer()->GetRenderSurface()->layer_list().size());
+ ASSERT_EQ(456, root_layer()->GetRenderSurface()->layer_list().at(0)->id());
// Hit testing for a point outside the layer should return a null pointer.
gfx::PointF test_point(69.f, 69.f);
@@ -847,7 +847,7 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayers) {
ASSERT_TRUE(grand_child1);
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- RenderSurfaceImpl* root_render_surface = root->render_surface();
+ RenderSurfaceImpl* root_render_surface = root->GetRenderSurface();
ASSERT_EQ(4u, root_render_surface->layer_list().size());
ASSERT_EQ(1, root_render_surface->layer_list().at(0)->id()); // root layer
ASSERT_EQ(2, root_render_surface->layer_list().at(1)->id()); // child1
@@ -1194,17 +1194,17 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayerLists) {
ASSERT_TRUE(child1);
ASSERT_TRUE(child2);
ASSERT_TRUE(grand_child1);
- ASSERT_TRUE(child1->render_surface());
- ASSERT_TRUE(child2->render_surface());
- ASSERT_TRUE(grand_child1->render_surface());
+ ASSERT_TRUE(child1->GetRenderSurface());
+ ASSERT_TRUE(child2->GetRenderSurface());
+ ASSERT_TRUE(grand_child1->GetRenderSurface());
ASSERT_EQ(4u, RenderSurfaceLayerList().size());
// The root surface has the root layer, and child1's and child2's render
// surfaces.
- ASSERT_EQ(3u, root->render_surface()->layer_list().size());
+ ASSERT_EQ(3u, root->GetRenderSurface()->layer_list().size());
// The child1 surface has the child1 layer and grand_child1's render surface.
- ASSERT_EQ(2u, child1->render_surface()->layer_list().size());
- ASSERT_EQ(1u, child2->render_surface()->layer_list().size());
- ASSERT_EQ(1u, grand_child1->render_surface()->layer_list().size());
+ ASSERT_EQ(2u, child1->GetRenderSurface()->layer_list().size());
+ ASSERT_EQ(1u, child2->GetRenderSurface()->layer_list().size());
+ ASSERT_EQ(1u, grand_child1->GetRenderSurface()->layer_list().size());
ASSERT_EQ(1, RenderSurfaceLayerList().at(0)->id()); // root layer
ASSERT_EQ(2, RenderSurfaceLayerList()[1]->id()); // child1
ASSERT_EQ(4, RenderSurfaceLayerList().at(2)->id()); // grand_child1
@@ -1270,7 +1270,7 @@ TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerRegionsForSingleLayer) {
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root->render_surface()->layer_list().size());
+ ASSERT_EQ(1u, root->GetRenderSurface()->layer_list().size());
// Hit checking for any point should return a null pointer for a layer without
// any touch event handler regions.
@@ -1354,7 +1354,7 @@ TEST_F(LayerTreeImplTest,
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root->render_surface()->layer_list().size());
+ ASSERT_EQ(1u, root->GetRenderSurface()->layer_list().size());
ASSERT_FALSE(root->ScreenSpaceTransform().IsInvertible());
// Hit checking any point should not hit the touch handler region on the
@@ -1421,7 +1421,7 @@ TEST_F(LayerTreeImplTest,
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root->render_surface()->layer_list().size());
+ ASSERT_EQ(1u, root->GetRenderSurface()->layer_list().size());
// Hit checking for a point outside the layer should return a null pointer.
gfx::PointF test_point(49.f, 49.f);
@@ -1506,7 +1506,7 @@ TEST_F(LayerTreeImplTest,
// its layout size is 50x50, positioned at 25x25.
LayerImpl* test_layer = root->test_properties()->children[0];
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root->render_surface()->layer_list().size());
+ ASSERT_EQ(1u, root->GetRenderSurface()->layer_list().size());
// Check whether the child layer fits into the root after scaled.
EXPECT_EQ(gfx::Rect(test_layer->bounds()), test_layer->visible_layer_rect());
@@ -1633,8 +1633,8 @@ TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerRegionsForSimpleClippedLayer) {
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root->render_surface()->layer_list().size());
- ASSERT_EQ(456, root->render_surface()->layer_list().at(0)->id());
+ ASSERT_EQ(1u, root->GetRenderSurface()->layer_list().size());
+ ASSERT_EQ(456, root->GetRenderSurface()->layer_list().at(0)->id());
// 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
@@ -1786,9 +1786,9 @@ TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerOverlappingRegions) {
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(2u, root->render_surface()->layer_list().size());
- ASSERT_EQ(123, root->render_surface()->layer_list().at(0)->id());
- ASSERT_EQ(1234, root->render_surface()->layer_list().at(1)->id());
+ ASSERT_EQ(2u, root->GetRenderSurface()->layer_list().size());
+ ASSERT_EQ(123, root->GetRenderSurface()->layer_list().at(0)->id());
+ ASSERT_EQ(1234, root->GetRenderSurface()->layer_list().at(1)->id());
gfx::PointF test_point(35.f, 35.f);
LayerImpl* result_layer =
@@ -1844,7 +1844,7 @@ TEST_F(LayerTreeImplTest, HitTestingTouchHandlerRegionsForLayerThatIsNotDrawn) {
// As test_layer doesn't draw content, the layer list of root's render surface
// should contain only the root layer.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root->render_surface()->layer_list().size());
+ ASSERT_EQ(1u, root->GetRenderSurface()->layer_list().size());
// Hit testing for a point outside the test layer should return null pointer.
// We also implicitly check that the updated screen space transform of a layer
@@ -1902,7 +1902,7 @@ TEST_F(LayerTreeImplTest, SelectionBoundsForSingleLayer) {
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
- ASSERT_EQ(1u, root->render_surface()->layer_list().size());
+ ASSERT_EQ(1u, root->GetRenderSurface()->layer_list().size());
LayerSelection input;
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/occlusion_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698