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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 // When the main thread informs the impl thread that it is ready to commit, | 193 // When the main thread informs the impl thread that it is ready to commit, |
194 // generally it would remain blocked till the main thread state is copied to | 194 // generally it would remain blocked till the main thread state is copied to |
195 // the pending tree. Calling this would ensure that the main thread remains | 195 // the pending tree. Calling this would ensure that the main thread remains |
196 // blocked till the pending tree is activated. | 196 // blocked till the pending tree is activated. |
197 virtual void SetNextCommitWaitsForActivation() = 0; | 197 virtual void SetNextCommitWaitsForActivation() = 0; |
198 | 198 |
199 // The LayerTreeHost tracks whether the content is suitable for Gpu raster. | 199 // The LayerTreeHost tracks whether the content is suitable for Gpu raster. |
200 // Calling this will reset it back to not suitable state. | 200 // Calling this will reset it back to not suitable state. |
201 virtual void ResetGpuRasterizationTracking() = 0; | 201 virtual void ResetGpuRasterizationTracking() = 0; |
| 202 |
| 203 protected: |
| 204 // Used to generate a unique identifier for a LayerTreeHost. |
| 205 static int GenerateHostId(); |
202 }; | 206 }; |
203 | 207 |
204 } // namespace cc | 208 } // namespace cc |
205 | 209 |
206 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 210 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |