Index: cc/surfaces/surface_aggregator_unittest.cc |
diff --git a/cc/surfaces/surface_aggregator_unittest.cc b/cc/surfaces/surface_aggregator_unittest.cc |
index 38af83b5fc137776e9fe2ada07c2f55ba97f9d22..e9549923b8723aabe012c86e89aff8882088ed5b 100644 |
--- a/cc/surfaces/surface_aggregator_unittest.cc |
+++ b/cc/surfaces/surface_aggregator_unittest.cc |
@@ -1467,6 +1467,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
->shared_quad_state_list.front() |
->quad_to_target_transform.Translate(0, 10); |
root_frame.render_pass_list[0]->damage_rect = gfx::Rect(5, 5, 10, 10); |
+ root_frame.render_pass_list[0]->cache_render_surface = true; |
root_frame.render_pass_list[1]->damage_rect = gfx::Rect(5, 5, 100, 100); |
support_->SubmitCompositorFrame(root_local_surface_id_, |
@@ -1480,6 +1481,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
ASSERT_EQ(2u, aggregated_pass_list.size()); |
+ // First aggregation shold be true. |
+ EXPECT_TRUE(aggregated_pass_list[0]->has_damage_from_contributing_content); |
// Damage rect for first aggregation should contain entire root surface. |
EXPECT_TRUE( |
aggregated_pass_list[1]->damage_rect.Contains(gfx::Rect(SurfaceSize()))); |
@@ -1507,6 +1510,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
ASSERT_EQ(2u, aggregated_pass_list.size()); |
+ // True for new frame. |
+ EXPECT_TRUE(aggregated_pass_list[0]->has_damage_from_contributing_content); |
// Outer surface didn't change, so transformed inner damage rect should be |
// used. |
EXPECT_EQ(gfx::Rect(10, 20, 10, 10).ToString(), |
@@ -1536,6 +1541,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
->shared_quad_state_list.front() |
->quad_to_target_transform.Translate(0, 10); |
root_frame.render_pass_list[0]->damage_rect = gfx::Rect(1, 1, 1, 1); |
+ root_frame.render_pass_list[0]->cache_render_surface = true; |
support_->SubmitCompositorFrame(root_local_surface_id_, |
std::move(root_frame)); |
@@ -1549,6 +1555,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
ASSERT_EQ(2u, aggregated_pass_list.size()); |
+ // False when the child frame has no change. |
+ EXPECT_FALSE(aggregated_pass_list[0]->has_damage_from_contributing_content); |
// The root surface was enqueued without being aggregated once, so it should |
// be treated as completely damaged. |
EXPECT_TRUE(aggregated_pass_list[1]->damage_rect.Contains( |
@@ -1566,6 +1574,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
ASSERT_EQ(2u, aggregated_pass_list.size()); |
+ // False when the child frame has no change. |
+ EXPECT_FALSE(aggregated_pass_list[0]->has_damage_from_contributing_content); |
EXPECT_TRUE(aggregated_pass_list[1]->damage_rect.IsEmpty()); |
} |