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

Unified Diff: cc/trees/swap_promise_monitor.h

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.h
diff --git a/cc/trees/swap_promise_monitor.h b/cc/trees/swap_promise_monitor.h
index ce3cbcdf2a13fe265ad29ef9f6f2073dcfab1e68..550176438e9867243a858a31af7a8dcb92f8e580 100644
--- a/cc/trees/swap_promise_monitor.h
+++ b/cc/trees/swap_promise_monitor.h
@@ -9,25 +9,25 @@
namespace cc {
-class LayerTreeHostInterface;
+class SwapPromiseManager;
class LayerTreeHostImpl;
// A SwapPromiseMonitor is used to monitor compositor state change that
// should be associated with a SwapPromise, e.g. SetNeedsCommit() is
// called on main thread or SetNeedsRedraw() is called on impl thread.
-// Creating a SwapPromiseMonitor will insert itself into a LayerTreeHost
+// Creating a SwapPromiseMonitor will insert itself into a SwapPromiseManager
// or LayerTreeHostImpl. You must provide a pointer to the appropriate
// structure to the monitor (and only one of the two). Notification of
// compositor state change will be sent through OnSetNeedsCommitOnMain()
// or OnSetNeedsRedrawOnImpl(). When SwapPromiseMonitor is destroyed, it
-// will unregister itself from LayerTreeHost or LayerTreeHostImpl.
+// will unregister itself from SwapPromiseManager or LayerTreeHostImpl.
class CC_EXPORT SwapPromiseMonitor {
public:
- // If the monitor lives on the main thread, pass in layer_tree_host
- // and set layer_tree_host_impl to nullptr.
+ // If the monitor lives on the main thread, pass in swap_promise_manager tied
+ // to the LayerTreeHost and set layer_tree_host_impl to nullptr.
// If the monitor lives on the impl thread, pass in layer_tree_host_impl
// and set layer_tree_host to nullptr.
- SwapPromiseMonitor(LayerTreeHostInterface* layer_tree_host,
+ SwapPromiseMonitor(SwapPromiseManager* swap_promise_managaer,
LayerTreeHostImpl* layer_tree_host_impl);
virtual ~SwapPromiseMonitor();
@@ -36,7 +36,7 @@ class CC_EXPORT SwapPromiseMonitor {
virtual void OnForwardScrollUpdateToMainThreadOnImpl() = 0;
protected:
- LayerTreeHostInterface* layer_tree_host_;
+ SwapPromiseManager* swap_promise_manager_;
LayerTreeHostImpl* layer_tree_host_impl_;
};

Powered by Google App Engine
This is Rietveld 408576698