OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_LAYERS_PICTURE_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE; | 130 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE; |
131 | 131 |
132 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE; | 132 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE; |
133 | 133 |
134 // Functions used by tile manager. | 134 // Functions used by tile manager. |
135 void DidUnregisterLayer(); | 135 void DidUnregisterLayer(); |
136 PictureLayerImpl* GetTwinLayer() { return twin_layer_; } | 136 PictureLayerImpl* GetTwinLayer() { return twin_layer_; } |
137 WhichTree GetTree() const; | 137 WhichTree GetTree() const; |
138 bool IsOnActiveOrPendingTree() const; | 138 bool IsOnActiveOrPendingTree() const; |
139 bool AllTilesRequiredForActivationAreReadyToDraw() const; | 139 bool AllTilesRequiredForActivationAreReadyToDraw() const; |
| 140 bool LayerRegisteredInTileManager() const { |
| 141 return !layer_needs_to_register_itself_; |
| 142 } |
| 143 |
| 144 void SetLayerNeedsToRegisterItselfForTesting(bool needs_to_register) { |
| 145 layer_needs_to_register_itself_ = needs_to_register; |
| 146 } |
140 | 147 |
141 protected: | 148 protected: |
142 friend class LayerRasterTileIterator; | 149 friend class LayerRasterTileIterator; |
143 | 150 |
144 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); | 151 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); |
145 PictureLayerTiling* AddTiling(float contents_scale); | 152 PictureLayerTiling* AddTiling(float contents_scale); |
146 void RemoveTiling(float contents_scale); | 153 void RemoveTiling(float contents_scale); |
147 void RemoveAllTilings(); | 154 void RemoveAllTilings(); |
148 void SyncFromActiveLayer(const PictureLayerImpl* other); | 155 void SyncFromActiveLayer(const PictureLayerImpl* other); |
149 void ManageTilings(bool animating_transform_to_screen, | 156 void ManageTilings(bool animating_transform_to_screen, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 gfx::Size viewport_size_for_tile_priority_; | 222 gfx::Size viewport_size_for_tile_priority_; |
216 gfx::Transform screen_space_transform_for_tile_priority_; | 223 gfx::Transform screen_space_transform_for_tile_priority_; |
217 | 224 |
218 friend class PictureLayer; | 225 friend class PictureLayer; |
219 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 226 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
220 }; | 227 }; |
221 | 228 |
222 } // namespace cc | 229 } // namespace cc |
223 | 230 |
224 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 231 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |