| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // PictureLayerTilingClient overrides. | 117 // PictureLayerTilingClient overrides. |
| 118 virtual scoped_refptr<Tile> CreateTile( | 118 virtual scoped_refptr<Tile> CreateTile( |
| 119 PictureLayerTiling* tiling, | 119 PictureLayerTiling* tiling, |
| 120 const gfx::Rect& content_rect) OVERRIDE; | 120 const gfx::Rect& content_rect) OVERRIDE; |
| 121 virtual PicturePileImpl* GetPile() OVERRIDE; | 121 virtual PicturePileImpl* GetPile() OVERRIDE; |
| 122 virtual gfx::Size CalculateTileSize( | 122 virtual gfx::Size CalculateTileSize( |
| 123 const gfx::Size& content_bounds) const OVERRIDE; | 123 const gfx::Size& content_bounds) const OVERRIDE; |
| 124 virtual const Region* GetInvalidation() OVERRIDE; | 124 virtual const Region* GetInvalidation() OVERRIDE; |
| 125 virtual const PictureLayerTiling* GetTwinTiling( | 125 virtual const PictureLayerTiling* GetTwinTiling( |
| 126 const PictureLayerTiling* tiling) const OVERRIDE; | 126 const PictureLayerTiling* tiling) const OVERRIDE; |
| 127 virtual PictureLayerTiling* GetRecycledTwinTiling( |
| 128 const PictureLayerTiling* tiling) OVERRIDE; |
| 127 virtual size_t GetMaxTilesForInterestArea() const OVERRIDE; | 129 virtual size_t GetMaxTilesForInterestArea() const OVERRIDE; |
| 128 virtual float GetSkewportTargetTimeInSeconds() const OVERRIDE; | 130 virtual float GetSkewportTargetTimeInSeconds() const OVERRIDE; |
| 129 virtual int GetSkewportExtrapolationLimitInContentPixels() const OVERRIDE; | 131 virtual int GetSkewportExtrapolationLimitInContentPixels() const OVERRIDE; |
| 130 virtual WhichTree GetTree() const OVERRIDE; | 132 virtual WhichTree GetTree() const OVERRIDE; |
| 131 | 133 |
| 132 // PushPropertiesTo active tree => pending tree. | 134 // PushPropertiesTo active tree => pending tree. |
| 133 void SyncTiling(const PictureLayerTiling* tiling); | 135 void SyncTiling(const PictureLayerTiling* tiling); |
| 134 | 136 |
| 135 // Mask-related functions | 137 // Mask-related functions |
| 136 void SetIsMask(bool is_mask); | 138 void SetIsMask(bool is_mask); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 166 float SnappedContentsScale(float new_contents_scale); | 168 float SnappedContentsScale(float new_contents_scale); |
| 167 void ResetRasterScale(); | 169 void ResetRasterScale(); |
| 168 void MarkVisibleResourcesAsRequired() const; | 170 void MarkVisibleResourcesAsRequired() const; |
| 169 bool MarkVisibleTilesAsRequired( | 171 bool MarkVisibleTilesAsRequired( |
| 170 PictureLayerTiling* tiling, | 172 PictureLayerTiling* tiling, |
| 171 const PictureLayerTiling* optional_twin_tiling, | 173 const PictureLayerTiling* optional_twin_tiling, |
| 172 float contents_scale, | 174 float contents_scale, |
| 173 const gfx::Rect& rect, | 175 const gfx::Rect& rect, |
| 174 const Region& missing_region) const; | 176 const Region& missing_region) const; |
| 175 gfx::Rect GetViewportForTilePriorityInContentSpace() const; | 177 gfx::Rect GetViewportForTilePriorityInContentSpace() const; |
| 178 PictureLayerImpl* GetRecycledTwinLayer(); |
| 176 | 179 |
| 177 void DoPostCommitInitializationIfNeeded() { | 180 void DoPostCommitInitializationIfNeeded() { |
| 178 if (needs_post_commit_initialization_) | 181 if (needs_post_commit_initialization_) |
| 179 DoPostCommitInitialization(); | 182 DoPostCommitInitialization(); |
| 180 } | 183 } |
| 181 void DoPostCommitInitialization(); | 184 void DoPostCommitInitialization(); |
| 182 | 185 |
| 183 bool CanHaveTilings() const; | 186 bool CanHaveTilings() const; |
| 184 bool CanHaveTilingWithScale(float contents_scale) const; | 187 bool CanHaveTilingWithScale(float contents_scale) const; |
| 185 void SanityCheckTilingState() const; | 188 void SanityCheckTilingState() const; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 gfx::Rect viewport_rect_for_tile_priority_; | 228 gfx::Rect viewport_rect_for_tile_priority_; |
| 226 gfx::Transform screen_space_transform_for_tile_priority_; | 229 gfx::Transform screen_space_transform_for_tile_priority_; |
| 227 | 230 |
| 228 friend class PictureLayer; | 231 friend class PictureLayer; |
| 229 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 232 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 230 }; | 233 }; |
| 231 | 234 |
| 232 } // namespace cc | 235 } // namespace cc |
| 233 | 236 |
| 234 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 237 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |