| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void SetHasGpuRasterizationHint(bool has_hint); | 80 void SetHasGpuRasterizationHint(bool has_hint); |
| 81 bool ShouldUseGpuRasterization() const; | 81 bool ShouldUseGpuRasterization() const; |
| 82 | 82 |
| 83 protected: | 83 protected: |
| 84 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); | 84 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); |
| 85 PictureLayerTiling* AddTiling(float contents_scale); | 85 PictureLayerTiling* AddTiling(float contents_scale); |
| 86 void RemoveTiling(float contents_scale); | 86 void RemoveTiling(float contents_scale); |
| 87 void RemoveAllTilings(); | 87 void RemoveAllTilings(); |
| 88 void SyncFromActiveLayer(const PictureLayerImpl* other); | 88 void SyncFromActiveLayer(const PictureLayerImpl* other); |
| 89 void ManageTilings(bool animating_transform_to_screen); | 89 void ManageTilings(bool animating_transform_to_screen); |
| 90 bool ShouldHaveLowResTiling() const { return !ShouldUseGpuRasterization(); } | 90 bool ShouldHaveLowResTiling() const { return should_use_low_res_tiling_; } |
| 91 virtual bool ShouldAdjustRasterScale( | 91 virtual bool ShouldAdjustRasterScale( |
| 92 bool animating_transform_to_screen) const; | 92 bool animating_transform_to_screen) const; |
| 93 virtual void RecalculateRasterScales( | 93 virtual void RecalculateRasterScales( |
| 94 bool animating_transform_to_screen); | 94 bool animating_transform_to_screen); |
| 95 void CleanUpTilingsOnActiveLayer( | 95 void CleanUpTilingsOnActiveLayer( |
| 96 std::vector<PictureLayerTiling*> used_tilings); | 96 std::vector<PictureLayerTiling*> used_tilings); |
| 97 float MinimumContentsScale() const; | 97 float MinimumContentsScale() const; |
| 98 float SnappedContentsScale(float new_contents_scale); | 98 float SnappedContentsScale(float new_contents_scale); |
| 99 void UpdateLCDTextStatus(bool new_status); | 99 void UpdateLCDTextStatus(bool new_status); |
| 100 void ResetRasterScale(); | 100 void ResetRasterScale(); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 float raster_contents_scale_; | 139 float raster_contents_scale_; |
| 140 float low_res_raster_contents_scale_; | 140 float low_res_raster_contents_scale_; |
| 141 | 141 |
| 142 bool raster_source_scale_was_animating_; | 142 bool raster_source_scale_was_animating_; |
| 143 bool is_using_lcd_text_; | 143 bool is_using_lcd_text_; |
| 144 bool needs_post_commit_initialization_; | 144 bool needs_post_commit_initialization_; |
| 145 // A sanity state check to make sure UpdateTilePriorities only gets called | 145 // A sanity state check to make sure UpdateTilePriorities only gets called |
| 146 // after a CalculateContentsScale/ManageTilings. | 146 // after a CalculateContentsScale/ManageTilings. |
| 147 bool should_update_tile_priorities_; | 147 bool should_update_tile_priorities_; |
| 148 bool has_gpu_rasterization_hint_; | 148 bool has_gpu_rasterization_hint_; |
| 149 bool should_use_low_res_tiling_; |
| 149 | 150 |
| 150 friend class PictureLayer; | 151 friend class PictureLayer; |
| 151 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 152 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 152 }; | 153 }; |
| 153 | 154 |
| 154 } // namespace cc | 155 } // namespace cc |
| 155 | 156 |
| 156 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 157 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |