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

Unified Diff: cc/surfaces/surface_factory_unittest.cc

Issue 666163006: Allow layers to signal that additional sequences are needed before surface destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
Index: cc/surfaces/surface_factory_unittest.cc
diff --git a/cc/surfaces/surface_factory_unittest.cc b/cc/surfaces/surface_factory_unittest.cc
index e36636c5f1c28438777e7c536bae4c5b887be2df..ed26fa823c863a699447b1d2aa397fa8ef1ff2c3 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -381,9 +381,9 @@ TEST_F(SurfaceFactoryTest, DestroySequence) {
factory_.Create(id2, gfx::Size(5, 5));
// Check that waiting before the sequence is satisfied works.
- std::set<SurfaceSequence> sequence;
- sequence.insert(SurfaceSequence(0, 4));
- factory_.DestroyOnSequence(id2, sequence);
+ manager_.GetSurfaceForId(id2)->destruction_dependencies().insert(
+ SurfaceSequence(0, 4));
+ factory_.Destroy(id2);
scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
@@ -396,10 +396,10 @@ TEST_F(SurfaceFactoryTest, DestroySequence) {
// Check that waiting after the sequence is satisfied works.
factory_.Create(id2, gfx::Size(5, 5));
- sequence.clear();
- sequence.insert(SurfaceSequence(0, 6));
DCHECK(manager_.GetSurfaceForId(id2));
- factory_.DestroyOnSequence(id2, sequence);
+ manager_.GetSurfaceForId(id2)->destruction_dependencies().insert(
+ SurfaceSequence(0, 6));
+ factory_.Destroy(id2);
DCHECK(!manager_.GetSurfaceForId(id2));
}

Powered by Google App Engine
This is Rietveld 408576698