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

Unified Diff: cc/trees/layer_tree_host_interface.h

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/trees/layer_tree_host_interface.h
diff --git a/cc/trees/layer_tree_host_interface.h b/cc/trees/layer_tree_host_interface.h
index 860031c791c714d7a690d5614e6bb80ff0f67b32..3b755cf2d315288a76191210273f2e7d317a2314 100644
--- a/cc/trees/layer_tree_host_interface.h
+++ b/cc/trees/layer_tree_host_interface.h
@@ -70,6 +70,10 @@ class CC_EXPORT LayerTreeHostInterface {
// See swap_promise.h for how to use SwapPromise.
virtual void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise) = 0;
+ // Returns the SwapPromiseManager used to create SwapPromiseMonitors for this
+ // host.
+ virtual SwapPromiseManager* GetSwapPromiseManager() const = 0;
+
// Sets whether the content is suitable to use Gpu Rasterization.
virtual void SetHasGpuRasterizationTrigger(bool has_trigger) = 0;
@@ -177,13 +181,7 @@ class CC_EXPORT LayerTreeHostInterface {
// Methods used internally in cc. These are not intended to be a part of the
// public API for use by the embedder ----------------------
-
- // When a SwapPromiseMonitor is created on the main thread, it calls
- // InsertSwapPromiseMonitor() to register itself with LayerTreeHost.
- // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor()
- // to unregister itself.
- virtual void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor) = 0;
- virtual void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor) = 0;
+ virtual SurfaceSequenceGenerator* GetSurfaceSequenceGenerator() = 0;
};
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698