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

Unified Diff: ui/compositor/layer_unittest.cc

Issue 2027953002: Revert of Clear ui::Layer damaged_region_ after commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/layer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_unittest.cc
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index 0ce23bf8fe85563baa2227481d652cbdfb142e42..f24ad4659b42b8c3078d943566fed31b3cbc8fc9 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -926,29 +926,6 @@
WaitForDraw();
}
-// Checks that the damage rect for a TextureLayer is empty after a commit.
-TEST_F(LayerWithNullDelegateTest, EmptyDamagedRect) {
- std::unique_ptr<Layer> root(CreateLayer(LAYER_SOLID_COLOR));
- cc::TextureMailbox mailbox(gpu::Mailbox::Generate(), gpu::SyncToken(), 0);
- bool callback_run = false;
- root->SetTextureMailbox(mailbox, cc::SingleReleaseCallback::Create(base::Bind(
- ReturnMailbox, &callback_run)),
- gfx::Size(10, 10));
- compositor()->SetRootLayer(root.get());
-
- root->SetBounds(gfx::Rect(0, 0, 10, 10));
- root->SetVisible(true);
- WaitForCommit();
-
- gfx::Rect damaged_rect(0, 0, 5, 5);
- root->SchedulePaint(damaged_rect);
- EXPECT_EQ(damaged_rect, root->damaged_region_for_testing().bounds());
- WaitForCommit();
- EXPECT_TRUE(root->damaged_region_for_testing().IsEmpty());
-
- compositor()->SetRootLayer(nullptr);
-}
-
void ExpectRgba(int x, int y, SkColor expected_color, SkColor actual_color) {
EXPECT_EQ(expected_color, actual_color)
<< "Pixel error at x=" << x << " y=" << y << "; "
« no previous file with comments | « ui/compositor/layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698