Index: cc/trees/damage_tracker_unittest.cc |
diff --git a/cc/trees/damage_tracker_unittest.cc b/cc/trees/damage_tracker_unittest.cc |
index b6a44094dc69c5ef0c0e4f1edff4f5fac7e68dc1..f243564ad69be328d991f949a781ea405a58c693 100644 |
--- a/cc/trees/damage_tracker_unittest.cc |
+++ b/cc/trees/damage_tracker_unittest.cc |
@@ -130,7 +130,7 @@ class DamageTrackerTest : public testing::Test { |
// ForceRenderSurface may be redundant here. |
child1->SetOpacity(0.5f); |
child1->SetDrawsContent(false); |
- child1->SetForceRenderSurface(true); |
+ child1->CreateRenderSurface(); |
child2->SetPosition(gfx::PointF(11.f, 11.f)); |
child2->SetBounds(gfx::Size(18, 18)); |
@@ -141,6 +141,7 @@ class DamageTrackerTest : public testing::Test { |
grand_child1->SetBounds(gfx::Size(6, 8)); |
grand_child1->SetContentBounds(gfx::Size(6, 8)); |
grand_child1->SetDrawsContent(true); |
+ grand_child1->CreateRenderSurface(); |
grand_child2->SetPosition(gfx::PointF(190.f, 190.f)); |
grand_child2->SetBounds(gfx::Size(6, 8)); |
@@ -543,6 +544,7 @@ TEST_F(DamageTrackerTest, VerifyDamageForImageFilter) { |
// Setting the filter will damage the whole surface. |
ClearDamageForAllSurfaces(root.get()); |
child->SetFilters(filters); |
+ child->CreateRenderSurface(); |
EmulateDrawingOneFrame(root.get()); |
root_damage_rect = |
root->render_surface()->damage_tracker()->current_damage_rect(); |
@@ -927,7 +929,7 @@ TEST_F(DamageTrackerTest, VerifyDamageForAddingAndRemovingRenderSurfaces) { |
// exposed. |
ClearDamageForAllSurfaces(root.get()); |
child1->SetOpacity(1.f); |
- child1->SetForceRenderSurface(false); |
+ child1->ClearRenderSurface(); |
EmulateDrawingOneFrame(root.get()); |
// Sanity check that there is only one surface now. |
@@ -953,7 +955,8 @@ TEST_F(DamageTrackerTest, VerifyDamageForAddingAndRemovingRenderSurfaces) { |
// Then change the tree so that the render surface is added back. |
ClearDamageForAllSurfaces(root.get()); |
child1->SetOpacity(0.5f); |
- child1->SetForceRenderSurface(true); |
+ child1->CreateRenderSurface(); |
+ |
EmulateDrawingOneFrame(root.get()); |
// Sanity check that there is a new surface now. |
@@ -1112,7 +1115,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplica) { |
ASSERT_EQ(old_content_rect.height(), |
child1->render_surface()->content_rect().height()); |
- EXPECT_FALSE(grand_child1->render_surface()); |
child_damage_rect = |
child1->render_surface()->damage_tracker()->current_damage_rect(); |
root_damage_rect = |
@@ -1153,13 +1155,11 @@ TEST_F(DamageTrackerTest, VerifyDamageForMask) { |
grand_child->SetBounds(gfx::Size(2, 2)); |
grand_child->SetContentBounds(gfx::Size(2, 2)); |
grand_child->SetDrawsContent(true); |
+ child->CreateRenderSurface(); |
child->AddChild(grand_child.Pass()); |
} |
EmulateDrawingOneFrame(root.get()); |
awoloszyn
2014/08/25 21:03:44
This test will be subsumed by the main-thread Rend
|
- // Sanity check that a new surface was created for the child. |
- ASSERT_TRUE(child->render_surface()); |
- |
// CASE 1: the update_rect on a mask layer should damage the entire target |
// surface. |
ClearDamageForAllSurfaces(root.get()); |