Index: cc/trees/layer_tree_host.h |
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h |
index 3fe2abaefb59c688003862bf8e755785c0c64ae6..3a5bee3653c30a899e75aadc3cc5b40dfbcc7faa 100644 |
--- a/cc/trees/layer_tree_host.h |
+++ b/cc/trees/layer_tree_host.h |
@@ -35,7 +35,7 @@ |
#include "cc/output/swap_promise.h" |
#include "cc/resources/resource_format.h" |
#include "cc/resources/scoped_ui_resource.h" |
-#include "cc/surfaces/surface_sequence.h" |
+#include "cc/surfaces/surface_sequence_generator.h" |
#include "cc/trees/compositor_mode.h" |
#include "cc/trees/layer_tree.h" |
#include "cc/trees/layer_tree_host_client.h" |
@@ -77,6 +77,7 @@ class UIResourceRequest; |
struct PendingPageScaleAnimation; |
struct RenderingStats; |
struct ScrollAndScaleSet; |
+class SwapPromiseManager; |
namespace proto { |
class LayerTreeHost; |
@@ -146,10 +147,10 @@ class CC_EXPORT LayerTreeHost : public LayerTreeHostInterface { |
LayerTree* GetLayerTree() override; |
const LayerTree* GetLayerTree() const override; |
TaskRunnerProvider* GetTaskRunnerProvider() const override; |
+ SwapPromiseManager* GetSwapPromiseManager() const override; |
const LayerTreeSettings& GetSettings() const override; |
- void SetSurfaceClientId(uint32_t client_id) override; |
+ SurfaceSequenceGenerator* GetSurfaceSequenceGenerator() override; |
void SetLayerTreeMutator(std::unique_ptr<LayerTreeMutator> mutator) override; |
- void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise) override; |
void SetHasGpuRasterizationTrigger(bool has_trigger) override; |
void SetVisible(bool visible) override; |
bool IsVisible() const override; |
@@ -180,8 +181,6 @@ class CC_EXPORT LayerTreeHost : public LayerTreeHostInterface { |
const MicroBenchmark::DoneCallback& callback) override; |
bool SendMessageToMicroBenchmark(int id, |
std::unique_ptr<base::Value> value) override; |
- void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor) override; |
- void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor) override; |
// LayerTreeHost interface to Proxy. |
void WillBeginMainFrame(); |
@@ -243,13 +242,6 @@ class CC_EXPORT LayerTreeHost : public LayerTreeHostInterface { |
virtual gfx::Size GetUIResourceSize(UIResourceId id) const; |
- void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); |
- std::vector<std::unique_ptr<SwapPromise>> TakeSwapPromises(); |
- |
- size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } |
- |
- SurfaceSequence CreateSurfaceSequence(); |
- |
// Serializes the parts of this LayerTreeHost that is needed for a commit to a |
// protobuf message. Not all members are serialized as they are not helpful |
// for remote usage. |
@@ -368,8 +360,6 @@ class CC_EXPORT LayerTreeHost : public LayerTreeHostInterface { |
void CalculateLCDTextMetricsCallback(Layer* layer); |
- void NotifySwapPromiseMonitorsOfSetNeedsCommit(); |
- |
void SetPropertyTreesNeedRebuild(); |
const CompositorMode compositor_mode_; |
@@ -382,6 +372,8 @@ class CC_EXPORT LayerTreeHost : public LayerTreeHostInterface { |
std::unique_ptr<RenderingStatsInstrumentation> |
rendering_stats_instrumentation_; |
+ std::unique_ptr<SwapPromiseManager> swap_promise_manager_; |
+ |
// |current_output_surface_| can't be updated until we've successfully |
// initialized a new output surface. |new_output_surface_| contains the |
// new output surface that is currently being initialized. If initialization |
@@ -414,11 +406,7 @@ class CC_EXPORT LayerTreeHost : public LayerTreeHostInterface { |
std::unique_ptr<EnginePictureCache> engine_picture_cache_; |
std::unique_ptr<ClientPictureCache> client_picture_cache_; |
- std::vector<std::unique_ptr<SwapPromise>> swap_promise_list_; |
- std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
- |
- uint32_t surface_client_id_; |
- uint32_t next_surface_sequence_; |
+ SurfaceSequenceGenerator surface_sequence_generator_; |
uint32_t num_consecutive_frames_suitable_for_gpu_ = 0; |
DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |