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

Unified Diff: cc/trees/layer_tree_host_interface.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/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..2b5db0788a47fb98e290536db15077ba8ce5a064 100644
--- a/cc/trees/layer_tree_host_interface.h
+++ b/cc/trees/layer_tree_host_interface.h
@@ -25,7 +25,7 @@ class LayerTreeDebugState;
class LayerTreeMutator;
class LayerTreeSettings;
class OutputSurface;
-class SwapPromiseMonitor;
+class SwapPromiseManager;
class TaskRunnerProvider;
class UIResourceManager;
@@ -54,22 +54,24 @@ class CC_EXPORT LayerTreeHostInterface {
// thread task runners.
virtual TaskRunnerProvider* GetTaskRunnerProvider() const = 0;
+ // Returns the SwapPromiseManager used to queue SwapPromises to track the
+ // frame stages (commit, activation, SwapBuffers) performed by this
+ // LayerTreeHost. For a detailed explaination on how to use SwapPromises, see
+ // cc/output/swap_promise.h
+ virtual SwapPromiseManager* GetSwapPromiseManager() const = 0;
+
// Returns the settings used by this host.
virtual const LayerTreeSettings& GetSettings() const = 0;
- // Sets the client id used to generate the SurfaceId that uniquely identifies
- // the Surfaces produced by this compositor.
- virtual void SetSurfaceClientId(uint32_t client_id) = 0;
+ // Returns the SurfaceSequenceGenerator used to generate SurfaceSequences for
+ // Surfaces using CompositorFrames produced by this LayerTreeHost.
+ virtual SurfaceSequenceGenerator* GetSurfaceSequenceGenerator() = 0;
// Sets the LayerTreeMutator interface used to directly mutate the compositor
// state on the compositor thread. (Compositor-Worker)
virtual void SetLayerTreeMutator(
std::unique_ptr<LayerTreeMutator> mutator) = 0;
- // Call this function when you expect there to be a swap buffer.
- // See swap_promise.h for how to use SwapPromise.
- virtual void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise) = 0;
-
// Sets whether the content is suitable to use Gpu Rasterization.
virtual void SetHasGpuRasterizationTrigger(bool has_trigger) = 0;
@@ -174,16 +176,6 @@ class CC_EXPORT LayerTreeHostInterface {
virtual bool SendMessageToMicroBenchmark(
int id,
std::unique_ptr<base::Value> value) = 0;
-
- // 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;
};
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698