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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 protected: | 76 protected: |
77 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); | 77 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); |
78 PictureLayerTiling* AddTiling(float contents_scale); | 78 PictureLayerTiling* AddTiling(float contents_scale); |
79 void RemoveTiling(float contents_scale); | 79 void RemoveTiling(float contents_scale); |
80 void RemoveAllTilings(); | 80 void RemoveAllTilings(); |
81 void SyncFromActiveLayer(const PictureLayerImpl* other); | 81 void SyncFromActiveLayer(const PictureLayerImpl* other); |
82 void ManageTilings(bool animating_transform_to_screen); | 82 void ManageTilings(bool animating_transform_to_screen); |
83 virtual bool ShouldAdjustRasterScale( | 83 virtual bool ShouldAdjustRasterScale( |
84 bool animating_transform_to_screen) const; | 84 bool animating_transform_to_screen) const; |
85 virtual void CalculateRasterContentsScale( | 85 virtual void RecalculateRasterScales( |
86 bool animating_transform_to_screen, | 86 bool animating_transform_to_screen); |
87 float* raster_contents_scale, | |
88 float* low_res_raster_contents_scale) const; | |
89 void CleanUpTilingsOnActiveLayer( | 87 void CleanUpTilingsOnActiveLayer( |
90 std::vector<PictureLayerTiling*> used_tilings); | 88 std::vector<PictureLayerTiling*> used_tilings); |
91 float MinimumContentsScale() const; | 89 float MinimumContentsScale() const; |
| 90 float SnappedContentsScale(float new_contents_scale); |
92 void UpdateLCDTextStatus(bool new_status); | 91 void UpdateLCDTextStatus(bool new_status); |
93 void ResetRasterScale(); | 92 void ResetRasterScale(); |
94 void MarkVisibleResourcesAsRequired() const; | 93 void MarkVisibleResourcesAsRequired() const; |
95 void DoPostCommitInitializationIfNeeded() { | 94 void DoPostCommitInitializationIfNeeded() { |
96 if (needs_post_commit_initialization_) | 95 if (needs_post_commit_initialization_) |
97 DoPostCommitInitialization(); | 96 DoPostCommitInitialization(); |
98 } | 97 } |
99 void DoPostCommitInitialization(); | 98 void DoPostCommitInitialization(); |
100 | 99 |
101 bool CanHaveTilings() const; | 100 bool CanHaveTilings() const; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // after a CalculateContentsScale/ManageTilings. | 134 // after a CalculateContentsScale/ManageTilings. |
136 bool should_update_tile_priorities_; | 135 bool should_update_tile_priorities_; |
137 | 136 |
138 friend class PictureLayer; | 137 friend class PictureLayer; |
139 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 138 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
140 }; | 139 }; |
141 | 140 |
142 } // namespace cc | 141 } // namespace cc |
143 | 142 |
144 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 143 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |