OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
11 #include "cc/debug/micro_benchmark.h" | 11 #include "cc/debug/micro_benchmark.h" |
12 #include "cc/input/top_controls_state.h" | 12 #include "cc/input/top_controls_state.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 class TimeTicks; | 15 class TimeTicks; |
16 } // namespace base | 16 } // namespace base |
17 | 17 |
18 namespace gfx { | 18 namespace gfx { |
19 class Rect; | 19 class Rect; |
20 } // namespace gfx | 20 } // namespace gfx |
21 | 21 |
22 namespace cc { | 22 namespace cc { |
| 23 class FrameSinkId; |
23 class InputHandler; | 24 class InputHandler; |
24 class LayerTree; | 25 class LayerTree; |
25 class LayerTreeDebugState; | 26 class LayerTreeDebugState; |
26 class LayerTreeMutator; | 27 class LayerTreeMutator; |
27 class LayerTreeSettings; | 28 class LayerTreeSettings; |
28 class CompositorFrameSink; | 29 class CompositorFrameSink; |
29 class SurfaceSequenceGenerator; | 30 class SurfaceSequenceGenerator; |
30 class SwapPromise; | 31 class SwapPromise; |
31 class SwapPromiseManager; | 32 class SwapPromiseManager; |
32 class TaskRunnerProvider; | 33 class TaskRunnerProvider; |
(...skipping 25 matching lines...) Expand all Loading... |
58 | 59 |
59 // Returns the TaskRunnerProvider used to access the main and compositor | 60 // Returns the TaskRunnerProvider used to access the main and compositor |
60 // thread task runners. | 61 // thread task runners. |
61 virtual TaskRunnerProvider* GetTaskRunnerProvider() const = 0; | 62 virtual TaskRunnerProvider* GetTaskRunnerProvider() const = 0; |
62 | 63 |
63 // Returns the settings used by this host. | 64 // Returns the settings used by this host. |
64 virtual const LayerTreeSettings& GetSettings() const = 0; | 65 virtual const LayerTreeSettings& GetSettings() const = 0; |
65 | 66 |
66 // Sets the client id used to generate the SurfaceId that uniquely identifies | 67 // Sets the client id used to generate the SurfaceId that uniquely identifies |
67 // the Surfaces produced by this compositor. | 68 // the Surfaces produced by this compositor. |
68 virtual void SetSurfaceClientId(uint32_t client_id) = 0; | 69 virtual void SetFrameSinkId(const FrameSinkId& frame_sink_id) = 0; |
69 | 70 |
70 // Sets the LayerTreeMutator interface used to directly mutate the compositor | 71 // Sets the LayerTreeMutator interface used to directly mutate the compositor |
71 // state on the compositor thread. (Compositor-Worker) | 72 // state on the compositor thread. (Compositor-Worker) |
72 virtual void SetLayerTreeMutator( | 73 virtual void SetLayerTreeMutator( |
73 std::unique_ptr<LayerTreeMutator> mutator) = 0; | 74 std::unique_ptr<LayerTreeMutator> mutator) = 0; |
74 | 75 |
75 // Call this function when you expect there to be a swap buffer. | 76 // Call this function when you expect there to be a swap buffer. |
76 // See swap_promise.h for how to use SwapPromise. | 77 // See swap_promise.h for how to use SwapPromise. |
77 virtual void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise) = 0; | 78 virtual void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise) = 0; |
78 | 79 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 virtual void SetNextCommitWaitsForActivation() = 0; | 198 virtual void SetNextCommitWaitsForActivation() = 0; |
198 | 199 |
199 // The LayerTreeHost tracks whether the content is suitable for Gpu raster. | 200 // The LayerTreeHost tracks whether the content is suitable for Gpu raster. |
200 // Calling this will reset it back to not suitable state. | 201 // Calling this will reset it back to not suitable state. |
201 virtual void ResetGpuRasterizationTracking() = 0; | 202 virtual void ResetGpuRasterizationTracking() = 0; |
202 }; | 203 }; |
203 | 204 |
204 } // namespace cc | 205 } // namespace cc |
205 | 206 |
206 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 207 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |