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" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // LayerTreeHostInProcess::CreateThreaded/CreateSingleThread to get either. | 39 // LayerTreeHostInProcess::CreateThreaded/CreateSingleThread to get either. |
40 class CC_EXPORT LayerTreeHost { | 40 class CC_EXPORT LayerTreeHost { |
41 public: | 41 public: |
42 virtual ~LayerTreeHost() {} | 42 virtual ~LayerTreeHost() {} |
43 | 43 |
44 // Returns the process global unique identifier for this LayerTreeHost. | 44 // Returns the process global unique identifier for this LayerTreeHost. |
45 virtual int GetId() const = 0; | 45 virtual int GetId() const = 0; |
46 | 46 |
47 // The current source frame number. This is incremented for each main frame | 47 // The current source frame number. This is incremented for each main frame |
48 // update(commit) pushed to the compositor thread. | 48 // update(commit) pushed to the compositor thread. |
| 49 // TODO(eseckler): Consider replacing this with BeginFrame sequence numbers. |
49 virtual int SourceFrameNumber() const = 0; | 50 virtual int SourceFrameNumber() const = 0; |
50 | 51 |
51 // Returns the LayerTree that holds the main frame state pushed to the | 52 // Returns the LayerTree that holds the main frame state pushed to the |
52 // LayerTreeImpl on commit. | 53 // LayerTreeImpl on commit. |
53 virtual LayerTree* GetLayerTree() = 0; | 54 virtual LayerTree* GetLayerTree() = 0; |
54 virtual const LayerTree* GetLayerTree() const = 0; | 55 virtual const LayerTree* GetLayerTree() const = 0; |
55 | 56 |
56 // Returns the UIResourceManager used to create UIResources for | 57 // Returns the UIResourceManager used to create UIResources for |
57 // UIResourceLayers pushed to the LayerTree. | 58 // UIResourceLayers pushed to the LayerTree. |
58 virtual UIResourceManager* GetUIResourceManager() const = 0; | 59 virtual UIResourceManager* GetUIResourceManager() const = 0; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 virtual void SetNextCommitWaitsForActivation() = 0; | 199 virtual void SetNextCommitWaitsForActivation() = 0; |
199 | 200 |
200 // The LayerTreeHost tracks whether the content is suitable for Gpu raster. | 201 // The LayerTreeHost tracks whether the content is suitable for Gpu raster. |
201 // Calling this will reset it back to not suitable state. | 202 // Calling this will reset it back to not suitable state. |
202 virtual void ResetGpuRasterizationTracking() = 0; | 203 virtual void ResetGpuRasterizationTracking() = 0; |
203 }; | 204 }; |
204 | 205 |
205 } // namespace cc | 206 } // namespace cc |
206 | 207 |
207 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 208 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |