| Index: components/viz/service/display/surface_aggregator_unittest.cc
|
| diff --git a/components/viz/service/display/surface_aggregator_unittest.cc b/components/viz/service/display/surface_aggregator_unittest.cc
|
| index 9c1446127f158074cb91401952af1a2a3b08554a..3576ec302bcc07abb314394f162c604cda297849 100644
|
| --- a/components/viz/service/display/surface_aggregator_unittest.cc
|
| +++ b/components/viz/service/display/surface_aggregator_unittest.cc
|
| @@ -1605,6 +1605,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_,
|
| @@ -1617,6 +1618,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())));
|
| @@ -1643,6 +1646,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(),
|
| @@ -1672,6 +1677,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));
|
| @@ -1685,6 +1691,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(
|
| @@ -1702,6 +1710,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());
|
| }
|
|
|
|
|