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

Side by Side Diff: cc/trees/damage_tracker_unittest.cc

Issue 2851193002: cc: Rename LayerImpl::is_drawn_render_surface_layer_list_member (Closed)
Patch Set: Rebase Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « cc/trees/damage_tracker.cc ('k') | cc/trees/debug_rect_history.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/damage_tracker.h" 5 #include "cc/trees/damage_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/base/filter_operation.h" 9 #include "cc/base/filter_operation.h"
10 #include "cc/base/filter_operations.h" 10 #include "cc/base/filter_operations.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 }; 173 };
174 174
175 TEST_F(DamageTrackerTest, SanityCheckTestTreeWithOneSurface) { 175 TEST_F(DamageTrackerTest, SanityCheckTestTreeWithOneSurface) {
176 // Sanity check that the simple test tree will actually produce the expected 176 // Sanity check that the simple test tree will actually produce the expected
177 // render surfaces. 177 // render surfaces.
178 178
179 LayerImpl* root = CreateAndSetUpTestTreeWithOneSurface(); 179 LayerImpl* root = CreateAndSetUpTestTreeWithOneSurface();
180 LayerImpl* child = root->test_properties()->children[0]; 180 LayerImpl* child = root->test_properties()->children[0];
181 181
182 EXPECT_EQ(2, root->GetRenderSurface()->num_contributors()); 182 EXPECT_EQ(2, root->GetRenderSurface()->num_contributors());
183 EXPECT_TRUE(root->is_drawn_render_surface_layer_list_member()); 183 EXPECT_TRUE(root->contributes_to_drawn_render_surface());
184 EXPECT_TRUE(child->is_drawn_render_surface_layer_list_member()); 184 EXPECT_TRUE(child->contributes_to_drawn_render_surface());
185 185
186 gfx::Rect root_damage_rect; 186 gfx::Rect root_damage_rect;
187 EXPECT_TRUE(root->GetRenderSurface()->damage_tracker()->GetDamageRectIfValid( 187 EXPECT_TRUE(root->GetRenderSurface()->damage_tracker()->GetDamageRectIfValid(
188 &root_damage_rect)); 188 &root_damage_rect));
189 189
190 EXPECT_EQ(gfx::Rect(500, 500).ToString(), root_damage_rect.ToString()); 190 EXPECT_EQ(gfx::Rect(500, 500).ToString(), root_damage_rect.ToString());
191 } 191 }
192 192
193 TEST_F(DamageTrackerTest, SanityCheckTestTreeWithTwoSurfaces) { 193 TEST_F(DamageTrackerTest, SanityCheckTestTreeWithTwoSurfaces) {
194 // Sanity check that the complex test tree will actually produce the expected 194 // Sanity check that the complex test tree will actually produce the expected
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 ASSERT_TRUE(root->GetRenderSurface()->damage_tracker()->GetDamageRectIfValid( 1646 ASSERT_TRUE(root->GetRenderSurface()->damage_tracker()->GetDamageRectIfValid(
1647 &damage_rect)); 1647 &damage_rect));
1648 EXPECT_TRUE(damage_rect.Contains(root->GetRenderSurface()->content_rect())); 1648 EXPECT_TRUE(damage_rect.Contains(root->GetRenderSurface()->content_rect()));
1649 EXPECT_TRUE(damage_rect.Contains( 1649 EXPECT_TRUE(damage_rect.Contains(
1650 gfx::ToEnclosingRect(child1->GetRenderSurface()->DrawableContentRect()))); 1650 gfx::ToEnclosingRect(child1->GetRenderSurface()->DrawableContentRect())));
1651 EXPECT_EQ(damage_rect, root->GetRenderSurface()->GetDamageRect()); 1651 EXPECT_EQ(damage_rect, root->GetRenderSurface()->GetDamageRect());
1652 } 1652 }
1653 1653
1654 } // namespace 1654 } // namespace
1655 } // namespace cc 1655 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/damage_tracker.cc ('k') | cc/trees/debug_rect_history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698