| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 size_t GetMaxTilesForInterestArea() const OVERRIDE; | 127 virtual size_t GetMaxTilesForInterestArea() const OVERRIDE; |
| 128 virtual float GetSkewportTargetTimeInSeconds() const OVERRIDE; | 128 virtual float GetSkewportTargetTimeInSeconds() const OVERRIDE; |
| 129 virtual int GetSkewportExtrapolationLimitInContentPixels() const OVERRIDE; | 129 virtual int GetSkewportExtrapolationLimitInContentPixels() const OVERRIDE; |
| 130 virtual WhichTree GetTree() const OVERRIDE; | 130 virtual WhichTree GetTree() const OVERRIDE; |
| 131 virtual bool RequiresHighResToDraw() const OVERRIDE; |
| 131 | 132 |
| 132 // PushPropertiesTo active tree => pending tree. | 133 // PushPropertiesTo active tree => pending tree. |
| 133 void SyncTiling(const PictureLayerTiling* tiling); | 134 void SyncTiling(const PictureLayerTiling* tiling); |
| 134 | 135 |
| 135 // Mask-related functions | 136 // Mask-related functions |
| 136 void SetIsMask(bool is_mask); | 137 void SetIsMask(bool is_mask); |
| 137 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE; | 138 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE; |
| 138 | 139 |
| 139 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE; | 140 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE; |
| 140 | 141 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 158 void AddTilingsForRasterScale(); | 159 void AddTilingsForRasterScale(); |
| 159 void UpdateTilePriorities( | 160 void UpdateTilePriorities( |
| 160 const OcclusionTracker<LayerImpl>* occlusion_tracker); | 161 const OcclusionTracker<LayerImpl>* occlusion_tracker); |
| 161 virtual bool ShouldAdjustRasterScale() const; | 162 virtual bool ShouldAdjustRasterScale() const; |
| 162 virtual void RecalculateRasterScales(); | 163 virtual void RecalculateRasterScales(); |
| 163 void CleanUpTilingsOnActiveLayer( | 164 void CleanUpTilingsOnActiveLayer( |
| 164 std::vector<PictureLayerTiling*> used_tilings); | 165 std::vector<PictureLayerTiling*> used_tilings); |
| 165 float MinimumContentsScale() const; | 166 float MinimumContentsScale() const; |
| 166 float SnappedContentsScale(float new_contents_scale); | 167 float SnappedContentsScale(float new_contents_scale); |
| 167 void ResetRasterScale(); | 168 void ResetRasterScale(); |
| 168 void MarkVisibleResourcesAsRequired() const; | |
| 169 bool MarkVisibleTilesAsRequired( | |
| 170 PictureLayerTiling* tiling, | |
| 171 const PictureLayerTiling* optional_twin_tiling, | |
| 172 float contents_scale, | |
| 173 const gfx::Rect& rect, | |
| 174 const Region& missing_region) const; | |
| 175 | 169 |
| 176 void DoPostCommitInitializationIfNeeded() { | 170 void DoPostCommitInitializationIfNeeded() { |
| 177 if (needs_post_commit_initialization_) | 171 if (needs_post_commit_initialization_) |
| 178 DoPostCommitInitialization(); | 172 DoPostCommitInitialization(); |
| 179 } | 173 } |
| 180 void DoPostCommitInitialization(); | 174 void DoPostCommitInitialization(); |
| 181 | 175 |
| 182 bool CanHaveTilings() const; | 176 bool CanHaveTilings() const; |
| 183 bool CanHaveTilingWithScale(float contents_scale) const; | 177 bool CanHaveTilingWithScale(float contents_scale) const; |
| 184 void SanityCheckTilingState() const; | 178 void SanityCheckTilingState() const; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 gfx::Rect viewport_rect_for_tile_priority_; | 216 gfx::Rect viewport_rect_for_tile_priority_; |
| 223 gfx::Transform screen_space_transform_for_tile_priority_; | 217 gfx::Transform screen_space_transform_for_tile_priority_; |
| 224 | 218 |
| 225 friend class PictureLayer; | 219 friend class PictureLayer; |
| 226 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 220 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 227 }; | 221 }; |
| 228 | 222 |
| 229 } // namespace cc | 223 } // namespace cc |
| 230 | 224 |
| 231 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 225 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |