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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 void ManageTilings(bool animating_transform_to_screen, | 149 void ManageTilings(bool animating_transform_to_screen, |
150 float maximum_animation_contents_scale); | 150 float maximum_animation_contents_scale); |
151 virtual bool ShouldAdjustRasterScale( | 151 virtual bool ShouldAdjustRasterScale( |
152 bool animating_transform_to_screen) const; | 152 bool animating_transform_to_screen) const; |
153 virtual void RecalculateRasterScales(bool animating_transform_to_screen, | 153 virtual void RecalculateRasterScales(bool animating_transform_to_screen, |
154 float maximum_animation_contents_scale); | 154 float maximum_animation_contents_scale); |
155 void CleanUpTilingsOnActiveLayer( | 155 void CleanUpTilingsOnActiveLayer( |
156 std::vector<PictureLayerTiling*> used_tilings); | 156 std::vector<PictureLayerTiling*> used_tilings); |
157 float MinimumContentsScale() const; | 157 float MinimumContentsScale() const; |
158 float SnappedContentsScale(float new_contents_scale); | 158 float SnappedContentsScale(float new_contents_scale); |
159 void UpdateLCDTextStatus(bool new_status); | |
160 void ResetRasterScale(); | 159 void ResetRasterScale(); |
161 void MarkVisibleResourcesAsRequired() const; | 160 void MarkVisibleResourcesAsRequired() const; |
162 bool MarkVisibleTilesAsRequired( | 161 bool MarkVisibleTilesAsRequired( |
163 PictureLayerTiling* tiling, | 162 PictureLayerTiling* tiling, |
164 const PictureLayerTiling* optional_twin_tiling, | 163 const PictureLayerTiling* optional_twin_tiling, |
165 float contents_scale, | 164 float contents_scale, |
166 const gfx::Rect& rect, | 165 const gfx::Rect& rect, |
167 const Region& missing_region) const; | 166 const Region& missing_region) const; |
168 | 167 |
169 void DoPostCommitInitializationIfNeeded() { | 168 void DoPostCommitInitializationIfNeeded() { |
(...skipping 24 matching lines...) Expand all Loading... |
194 float ideal_contents_scale_; | 193 float ideal_contents_scale_; |
195 | 194 |
196 float raster_page_scale_; | 195 float raster_page_scale_; |
197 float raster_device_scale_; | 196 float raster_device_scale_; |
198 float raster_source_scale_; | 197 float raster_source_scale_; |
199 float raster_contents_scale_; | 198 float raster_contents_scale_; |
200 float low_res_raster_contents_scale_; | 199 float low_res_raster_contents_scale_; |
201 | 200 |
202 bool raster_source_scale_is_fixed_; | 201 bool raster_source_scale_is_fixed_; |
203 bool was_animating_transform_to_screen_; | 202 bool was_animating_transform_to_screen_; |
204 bool is_using_lcd_text_; | |
205 bool needs_post_commit_initialization_; | 203 bool needs_post_commit_initialization_; |
206 // A sanity state check to make sure UpdateTilePriorities only gets called | 204 // A sanity state check to make sure UpdateTilePriorities only gets called |
207 // after a CalculateContentsScale/ManageTilings. | 205 // after a CalculateContentsScale/ManageTilings. |
208 bool should_update_tile_priorities_; | 206 bool should_update_tile_priorities_; |
209 | 207 |
210 // Save a copy of the visible rect and viewport size of the last frame that | 208 // Save a copy of the visible rect and viewport size of the last frame that |
211 // has a valid viewport for prioritizing tiles. | 209 // has a valid viewport for prioritizing tiles. |
212 gfx::Rect visible_rect_for_tile_priority_; | 210 gfx::Rect visible_rect_for_tile_priority_; |
213 gfx::Size viewport_size_for_tile_priority_; | 211 gfx::Size viewport_size_for_tile_priority_; |
214 gfx::Transform screen_space_transform_for_tile_priority_; | 212 gfx::Transform screen_space_transform_for_tile_priority_; |
215 | 213 |
216 friend class PictureLayer; | 214 friend class PictureLayer; |
217 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 215 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
218 }; | 216 }; |
219 | 217 |
220 } // namespace cc | 218 } // namespace cc |
221 | 219 |
222 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 220 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |