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

Unified Diff: cc/trees/layer_tree_host_unittest_damage.cc

Issue 2632463005: cc: Ensure that large damage doesn't register as "frame has no damage" (Closed)
Patch Set: update Created 3 years, 11 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_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_video.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_damage.cc
diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc
index 33ff66f3e7a296faa9f7af2cb2a3a2288c642775..2da4c5a2edf3b3f6d186aafc0a69c521fc8fd3a5 100644
--- a/cc/trees/layer_tree_host_unittest_damage.cc
+++ b/cc/trees/layer_tree_host_unittest_damage.cc
@@ -56,8 +56,9 @@ class LayerTreeHostDamageTestSetNeedsRedraw
RenderSurfaceImpl* root_surface =
impl->active_tree()->root_layer_for_testing()->render_surface();
- gfx::Rect root_damage =
- root_surface->damage_tracker()->current_damage_rect();
+ gfx::Rect root_damage;
+ EXPECT_TRUE(
+ root_surface->damage_tracker()->GetDamageRectIfValid(&root_damage));
switch (draw_count_) {
case 0:
@@ -118,8 +119,9 @@ class LayerTreeHostDamageTestSetViewportSize
RenderSurfaceImpl* root_surface =
impl->active_tree()->root_layer_for_testing()->render_surface();
- gfx::Rect root_damage =
- root_surface->damage_tracker()->current_damage_rect();
+ gfx::Rect root_damage;
+ EXPECT_TRUE(
+ root_surface->damage_tracker()->GetDamageRectIfValid(&root_damage));
switch (draw_count_) {
case 0:
@@ -259,8 +261,9 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest {
RenderSurfaceImpl* root_surface =
host_impl->active_tree()->root_layer_for_testing()->render_surface();
- gfx::Rect root_damage =
- root_surface->damage_tracker()->current_damage_rect();
+ gfx::Rect root_damage;
+ EXPECT_TRUE(
+ root_surface->damage_tracker()->GetDamageRectIfValid(&root_damage));
root_damage.Intersect(root_surface->content_rect());
int source_frame = host_impl->active_tree()->source_frame_number();
@@ -384,8 +387,9 @@ class LayerTreeHostDamageTestScrollbarDoesDamage
EXPECT_EQ(DRAW_SUCCESS, draw_result);
RenderSurfaceImpl* root_surface =
host_impl->active_tree()->root_layer_for_testing()->render_surface();
- gfx::Rect root_damage =
- root_surface->damage_tracker()->current_damage_rect();
+ gfx::Rect root_damage;
+ EXPECT_TRUE(
+ root_surface->damage_tracker()->GetDamageRectIfValid(&root_damage));
root_damage.Intersect(root_surface->content_rect());
switch (num_draws_) {
case 0:
@@ -468,8 +472,9 @@ class LayerTreeHostDamageTestScrollbarCommitDoesNoDamage
EXPECT_EQ(DRAW_SUCCESS, draw_result);
RenderSurfaceImpl* root_surface =
host_impl->active_tree()->root_layer_for_testing()->render_surface();
- gfx::Rect root_damage =
- root_surface->damage_tracker()->current_damage_rect();
+ gfx::Rect root_damage;
+ EXPECT_TRUE(
+ root_surface->damage_tracker()->GetDamageRectIfValid(&root_damage));
root_damage.Intersect(root_surface->content_rect());
int frame = host_impl->active_tree()->source_frame_number();
switch (num_draws_) {
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698