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

Unified Diff: cc/trees/swap_promise_monitor.cc

Issue 2323423002: cc: Add SwapPromiseManager and SurfaceSequenceGenerator. (Closed)
Patch Set: rebase 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/trees/swap_promise_monitor.cc
diff --git a/cc/trees/swap_promise_monitor.cc b/cc/trees/swap_promise_monitor.cc
index 56956bf29ac556d243445328f5851e3a6e777679..6a7492aedab8a45aebfa8f7c0f2804cc069c4984 100644
--- a/cc/trees/swap_promise_monitor.cc
+++ b/cc/trees/swap_promise_monitor.cc
@@ -3,27 +3,27 @@
// found in the LICENSE file.
#include "base/logging.h"
-#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_host_impl.h"
+#include "cc/trees/swap_promise_manager.h"
#include "cc/trees/swap_promise_monitor.h"
namespace cc {
-SwapPromiseMonitor::SwapPromiseMonitor(LayerTreeHostInterface* layer_tree_host,
+SwapPromiseMonitor::SwapPromiseMonitor(SwapPromiseManager* swap_promise_manager,
LayerTreeHostImpl* layer_tree_host_impl)
- : layer_tree_host_(layer_tree_host),
+ : swap_promise_manager_(swap_promise_manager),
layer_tree_host_impl_(layer_tree_host_impl) {
- DCHECK((layer_tree_host && !layer_tree_host_impl) ||
- (!layer_tree_host && layer_tree_host_impl));
- if (layer_tree_host_)
- layer_tree_host_->InsertSwapPromiseMonitor(this);
+ DCHECK((swap_promise_manager && !layer_tree_host_impl) ||
+ (!swap_promise_manager && layer_tree_host_impl));
+ if (swap_promise_manager)
+ swap_promise_manager->InsertSwapPromiseMonitor(this);
if (layer_tree_host_impl_)
layer_tree_host_impl_->InsertSwapPromiseMonitor(this);
}
SwapPromiseMonitor::~SwapPromiseMonitor() {
- if (layer_tree_host_)
- layer_tree_host_->RemoveSwapPromiseMonitor(this);
+ if (swap_promise_manager_)
+ swap_promise_manager_->RemoveSwapPromiseMonitor(this);
if (layer_tree_host_impl_)
layer_tree_host_impl_->RemoveSwapPromiseMonitor(this);
}

Powered by Google App Engine
This is Rietveld 408576698