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

Unified Diff: ui/compositor/layer_unittest.cc

Issue 2822143003: Remove ForceReclaimResources (Closed)
Patch Set: Rebase. Created 3 years, 8 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 | « content/test/layouttest_support.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 0783ff05ba7638b7d8d2c56af285a0dfeb53479b..640ff21d46d986bb81d12e406ab5b095607b0480 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -1139,8 +1139,14 @@ TEST_F(LayerWithNullDelegateTest, EmptyDamagedRect) {
WaitForCommit();
EXPECT_TRUE(root->damaged_region_for_testing().IsEmpty());
- compositor()->SetRootLayer(nullptr);
- root.reset();
+ // The texture mailbox has a reference from an in-flight texture layer.
ericrk 2017/04/24 22:24:08 Thanks for the fix!
+ // We clear the texture mailbox from the root layer and draw a new frame
+ // to ensure that the texture mailbox is released. We then draw a second
+ // frame to ensure that the mailbox's release callback has time to run.
danakj 2017/04/25 14:20:42 Oh but you could also do fwiw.. make a RunLoop, a
kylechar 2017/04/25 16:25:01 How does this look?
+ root->SetShowSolidColorContent();
+ compositor()->ScheduleDraw();
+ WaitForCommit();
+ compositor()->ScheduleDraw();
WaitForCommit();
}
« no previous file with comments | « content/test/layouttest_support.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698