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

Unified Diff: cc/trees/layer_tree_host_unittest_damage.cc

Issue 85143002: Dirty rects always contain full tiles with delegated rendering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build break Created 7 years 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/test/fake_content_layer.cc ('k') | no next file » | 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 58644e63b50e1c077d8f794ff39e2b54ac9645cd..7f008b46808a1370f53501e1d179b73e22bdf25c 100644
--- a/cc/trees/layer_tree_host_unittest_damage.cc
+++ b/cc/trees/layer_tree_host_unittest_damage.cc
@@ -363,18 +363,24 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest {
child_damage_rect_ = gfx::RectF(10, 11, 12, 13);
break;
case 3:
- if (!delegating_renderer() &&
- !host_impl->settings().impl_side_painting) {
- // The update rect in the child should be damaged.
- // TODO(danakj): Remove this when impl side painting is always on.
- EXPECT_EQ(gfx::RectF(100+10, 100+11, 12, 13).ToString(),
- root_damage.ToString());
- } else {
+ // The update rect in the child should be damaged and the damaged area
+ // should match the invalidation.
+ EXPECT_EQ(gfx::RectF(100+10, 100+11, 12, 13).ToString(),
+ root_damage.ToString());
+
+ // TODO(danakj): Remove this when impl side painting is always on.
+ if (delegating_renderer() ||
+ host_impl->settings().impl_side_painting) {
// When using a delegating renderer, or using impl side painting, the
// entire child is considered damaged as we need to replace its
- // resources with newly created ones.
- EXPECT_EQ(gfx::RectF(child_->position(), child_->bounds()).ToString(),
- root_damage.ToString());
+ // resources with newly created ones. The damaged area is kept as it
+ // is, but entire child is painted.
+
+ // The paint rect should match the layer bounds.
+ gfx::RectF paint_rect = child_->LastPaintRect();
+ paint_rect.set_origin(child_->position());
+ EXPECT_EQ(gfx::RectF(100, 100, 30, 30).ToString(),
+ paint_rect.ToString());
}
EXPECT_FALSE(frame_data->has_no_damage);
« no previous file with comments | « cc/test/fake_content_layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698