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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 void RemoveTiling(float contents_scale); | 161 void RemoveTiling(float contents_scale); |
162 void RemoveAllTilings(); | 162 void RemoveAllTilings(); |
163 void SyncFromActiveLayer(const PictureLayerImpl* other); | 163 void SyncFromActiveLayer(const PictureLayerImpl* other); |
164 void AddTilingsForRasterScale(); | 164 void AddTilingsForRasterScale(); |
165 void UpdateTilePriorities(const Occlusion& occlusion_in_content_space); | 165 void UpdateTilePriorities(const Occlusion& occlusion_in_content_space); |
166 virtual bool ShouldAdjustRasterScale() const; | 166 virtual bool ShouldAdjustRasterScale() const; |
167 virtual void RecalculateRasterScales(); | 167 virtual void RecalculateRasterScales(); |
168 void CleanUpTilingsOnActiveLayer( | 168 void CleanUpTilingsOnActiveLayer( |
169 std::vector<PictureLayerTiling*> used_tilings); | 169 std::vector<PictureLayerTiling*> used_tilings); |
170 float MinimumContentsScale() const; | 170 float MinimumContentsScale() const; |
171 float SnappedContentsScale(float new_contents_scale); | |
172 void ResetRasterScale(); | 171 void ResetRasterScale(); |
173 gfx::Rect GetViewportForTilePriorityInContentSpace() const; | 172 gfx::Rect GetViewportForTilePriorityInContentSpace() const; |
174 PictureLayerImpl* GetRecycledTwinLayer() const; | 173 PictureLayerImpl* GetRecycledTwinLayer() const; |
175 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source); | 174 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source); |
176 | 175 |
177 void DoPostCommitInitializationIfNeeded() { | 176 void DoPostCommitInitializationIfNeeded() { |
178 if (needs_post_commit_initialization_) | 177 if (needs_post_commit_initialization_) |
179 DoPostCommitInitialization(); | 178 DoPostCommitInitialization(); |
180 } | 179 } |
181 void DoPostCommitInitialization(); | 180 void DoPostCommitInitialization(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // frame that has a valid viewport for prioritizing tiles. | 231 // frame that has a valid viewport for prioritizing tiles. |
233 gfx::Rect visible_rect_for_tile_priority_; | 232 gfx::Rect visible_rect_for_tile_priority_; |
234 | 233 |
235 friend class PictureLayer; | 234 friend class PictureLayer; |
236 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 235 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
237 }; | 236 }; |
238 | 237 |
239 } // namespace cc | 238 } // namespace cc |
240 | 239 |
241 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 240 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |