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

Unified Diff: cc/layers/surface_layer.cc

Issue 2323423002: cc: Add SwapPromiseManager and SurfaceSequenceGenerator. (Closed)
Patch Set: keep LTH in Layer. Created 4 years, 3 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
Index: cc/layers/surface_layer.cc
diff --git a/cc/layers/surface_layer.cc b/cc/layers/surface_layer.cc
index 989f90cb9b0c7038b26499e1d8deea12a6330d24..c2a42f275c555a59a5e37876a47c9f21e7a685a1 100644
--- a/cc/layers/surface_layer.cc
+++ b/cc/layers/surface_layer.cc
@@ -11,6 +11,8 @@
#include "cc/layers/surface_layer_impl.h"
#include "cc/output/swap_promise.h"
#include "cc/trees/layer_tree_host.h"
+#include "cc/trees/surface_sequence_generator.h"
+#include "cc/trees/swap_promise_manager.h"
namespace cc {
@@ -104,7 +106,9 @@ void SurfaceLayer::PushPropertiesTo(LayerImpl* layer) {
void SurfaceLayer::CreateNewDestroySequence() {
DCHECK(destroy_sequence_.is_null());
if (layer_tree_host()) {
- destroy_sequence_ = layer_tree_host()->CreateSurfaceSequence();
+ destroy_sequence_ = layer_tree_host()
+ ->GetSurfaceSequenceGenerator()
+ ->CreateSurfaceSequence();
require_callback_.Run(surface_id_, destroy_sequence_);
}
}
@@ -115,7 +119,8 @@ void SurfaceLayer::SatisfyDestroySequence() {
DCHECK(!destroy_sequence_.is_null());
std::unique_ptr<SatisfySwapPromise> satisfy(
new SatisfySwapPromise(destroy_sequence_, satisfy_callback_));
- layer_tree_host()->QueueSwapPromise(std::move(satisfy));
+ layer_tree_host()->GetSwapPromiseManager()->QueueSwapPromise(
+ std::move(satisfy));
destroy_sequence_ = SurfaceSequence();
}

Powered by Google App Engine
This is Rietveld 408576698