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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 virtual ~PictureLayerImpl(); | 85 virtual ~PictureLayerImpl(); |
86 | 86 |
87 // LayerImpl overrides. | 87 // LayerImpl overrides. |
88 virtual const char* LayerTypeAsString() const OVERRIDE; | 88 virtual const char* LayerTypeAsString() const OVERRIDE; |
89 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) | 89 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) |
90 OVERRIDE; | 90 OVERRIDE; |
91 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; | 91 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; |
92 virtual void AppendQuads(QuadSink* quad_sink, | 92 virtual void AppendQuads(QuadSink* quad_sink, |
93 AppendQuadsData* append_quads_data) OVERRIDE; | 93 AppendQuadsData* append_quads_data) OVERRIDE; |
94 virtual void UpdateTilePriorities() OVERRIDE; | 94 virtual void UpdateTilePriorities() OVERRIDE; |
95 virtual void NotifyTileStateChanged(const Tile* tile) OVERRIDE; | 95 virtual void NotifyTileInitialized(const Tile* tile) OVERRIDE; |
96 virtual void DidBecomeActive() OVERRIDE; | 96 virtual void DidBecomeActive() OVERRIDE; |
97 virtual void DidBeginTracing() OVERRIDE; | 97 virtual void DidBeginTracing() OVERRIDE; |
98 virtual void ReleaseResources() OVERRIDE; | 98 virtual void ReleaseResources() OVERRIDE; |
99 virtual void CalculateContentsScale(float ideal_contents_scale, | 99 virtual void CalculateContentsScale(float ideal_contents_scale, |
100 float device_scale_factor, | 100 float device_scale_factor, |
101 float page_scale_factor, | 101 float page_scale_factor, |
102 float maximum_animation_contents_scale, | 102 float maximum_animation_contents_scale, |
103 bool animating_transform_to_screen, | 103 bool animating_transform_to_screen, |
104 float* contents_scale_x, | 104 float* contents_scale_x, |
105 float* contents_scale_y, | 105 float* contents_scale_y, |
(...skipping 23 matching lines...) Expand all Loading... |
129 | 129 |
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; | |
140 | 139 |
141 protected: | 140 protected: |
142 friend class LayerRasterTileIterator; | 141 friend class LayerRasterTileIterator; |
143 | 142 |
144 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); | 143 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); |
145 PictureLayerTiling* AddTiling(float contents_scale); | 144 PictureLayerTiling* AddTiling(float contents_scale); |
146 void RemoveTiling(float contents_scale); | 145 void RemoveTiling(float contents_scale); |
147 void RemoveAllTilings(); | 146 void RemoveAllTilings(); |
148 void SyncFromActiveLayer(const PictureLayerImpl* other); | 147 void SyncFromActiveLayer(const PictureLayerImpl* other); |
149 void ManageTilings(bool animating_transform_to_screen, | 148 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_; | 214 gfx::Size viewport_size_for_tile_priority_; |
216 gfx::Transform screen_space_transform_for_tile_priority_; | 215 gfx::Transform screen_space_transform_for_tile_priority_; |
217 | 216 |
218 friend class PictureLayer; | 217 friend class PictureLayer; |
219 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 218 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
220 }; | 219 }; |
221 | 220 |
222 } // namespace cc | 221 } // namespace cc |
223 | 222 |
224 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 223 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |