| 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_INTERFACE_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_INTERFACE_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_INTERFACE_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_INTERFACE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/debug/micro_benchmark.h" | 10 #include "cc/debug/micro_benchmark.h" |
| 11 #include "cc/input/top_controls_state.h" | 11 #include "cc/input/top_controls_state.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class TimeTicks; | 14 class TimeTicks; |
| 15 } // namespace base | 15 } // namespace base |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class Rect; | 18 class Rect; |
| 19 } // namespace gfx | 19 } // namespace gfx |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| 22 class InputHandler; | 22 class InputHandler; |
| 23 class LayerTree; | 23 class LayerTree; |
| 24 class LayerTreeDebugState; | 24 class LayerTreeDebugState; |
| 25 class LayerTreeMutator; | 25 class LayerTreeMutator; |
| 26 class LayerTreeSettings; | 26 class LayerTreeSettings; |
| 27 class OutputSurface; | 27 class OutputSurface; |
| 28 class SwapPromiseMonitor; | 28 class SwapPromiseMonitor; |
| 29 class TaskRunnerProvider; | 29 class TaskRunnerProvider; |
| 30 class UIResourceManager; |
| 30 | 31 |
| 31 // TODO(khushalsagar): Will be renamed to LayerTreeHost. | 32 // TODO(khushalsagar): Will be renamed to LayerTreeHost. |
| 32 class CC_EXPORT LayerTreeHostInterface { | 33 class CC_EXPORT LayerTreeHostInterface { |
| 33 public: | 34 public: |
| 34 virtual ~LayerTreeHostInterface() {} | 35 virtual ~LayerTreeHostInterface() {} |
| 35 | 36 |
| 36 // Returns the process global unique identifier for this LayerTreeHost. | 37 // Returns the process global unique identifier for this LayerTreeHost. |
| 37 virtual int GetId() const = 0; | 38 virtual int GetId() const = 0; |
| 38 | 39 |
| 39 // The current source frame number. This is incremented for each main frame | 40 // The current source frame number. This is incremented for each main frame |
| 40 // update(commit) pushed to the compositor thread. | 41 // update(commit) pushed to the compositor thread. |
| 41 virtual int SourceFrameNumber() const = 0; | 42 virtual int SourceFrameNumber() const = 0; |
| 42 | 43 |
| 43 // Returns the LayerTree that holds the main frame state pushed to the | 44 // Returns the LayerTree that holds the main frame state pushed to the |
| 44 // LayerTreeImpl on commit. | 45 // LayerTreeImpl on commit. |
| 45 virtual LayerTree* GetLayerTree() = 0; | 46 virtual LayerTree* GetLayerTree() = 0; |
| 46 virtual const LayerTree* GetLayerTree() const = 0; | 47 virtual const LayerTree* GetLayerTree() const = 0; |
| 47 | 48 |
| 49 // Returns the UIResourceManager used to create UIResources for |
| 50 // UIResourceLayers pushed to the LayerTree. |
| 51 virtual UIResourceManager* GetUIResourceManager() const = 0; |
| 52 |
| 48 // Returns the TaskRunnerProvider used to access the main and compositor | 53 // Returns the TaskRunnerProvider used to access the main and compositor |
| 49 // thread task runners. | 54 // thread task runners. |
| 50 virtual TaskRunnerProvider* GetTaskRunnerProvider() const = 0; | 55 virtual TaskRunnerProvider* GetTaskRunnerProvider() const = 0; |
| 51 | 56 |
| 52 // Returns the settings used by this host. | 57 // Returns the settings used by this host. |
| 53 virtual const LayerTreeSettings& GetSettings() const = 0; | 58 virtual const LayerTreeSettings& GetSettings() const = 0; |
| 54 | 59 |
| 55 // Sets the client id used to generate the SurfaceId that uniquely identifies | 60 // Sets the client id used to generate the SurfaceId that uniquely identifies |
| 56 // the Surfaces produced by this compositor. | 61 // the Surfaces produced by this compositor. |
| 57 virtual void SetSurfaceClientId(uint32_t client_id) = 0; | 62 virtual void SetSurfaceClientId(uint32_t client_id) = 0; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // InsertSwapPromiseMonitor() to register itself with LayerTreeHost. | 182 // InsertSwapPromiseMonitor() to register itself with LayerTreeHost. |
| 178 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor() | 183 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor() |
| 179 // to unregister itself. | 184 // to unregister itself. |
| 180 virtual void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor) = 0; | 185 virtual void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor) = 0; |
| 181 virtual void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor) = 0; | 186 virtual void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor) = 0; |
| 182 }; | 187 }; |
| 183 | 188 |
| 184 } // namespace cc | 189 } // namespace cc |
| 185 | 190 |
| 186 #endif // CC_TREES_LAYER_TREE_HOST_INTERFACE_H_ | 191 #endif // CC_TREES_LAYER_TREE_HOST_INTERFACE_H_ |
| OLD | NEW |