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