Chromium Code Reviews| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 } | 83 } |
| 84 | 84 |
| 85 protected: | 85 protected: |
| 86 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); | 86 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); |
| 87 PictureLayerTiling* AddTiling(float contents_scale); | 87 PictureLayerTiling* AddTiling(float contents_scale); |
| 88 void RemoveTiling(float contents_scale); | 88 void RemoveTiling(float contents_scale); |
| 89 void RemoveAllTilings(); | 89 void RemoveAllTilings(); |
| 90 void SyncFromActiveLayer(const PictureLayerImpl* other); | 90 void SyncFromActiveLayer(const PictureLayerImpl* other); |
| 91 void ManageTilings(bool animating_transform_to_screen); | 91 void ManageTilings(bool animating_transform_to_screen); |
| 92 bool ShouldHaveLowResTiling() const { | 92 bool ShouldHaveLowResTiling() const { |
| 93 return !should_use_gpu_rasterization(); | 93 return !should_use_gpu_rasterization() && should_use_low_res_tiling_; |
|
enne (OOO)
2014/03/12 17:52:08
Can you make this just should_use_low_res_tiling a
| |
| 94 } | 94 } |
| 95 virtual bool ShouldAdjustRasterScale( | 95 virtual bool ShouldAdjustRasterScale( |
| 96 bool animating_transform_to_screen) const; | 96 bool animating_transform_to_screen) const; |
| 97 virtual void RecalculateRasterScales( | 97 virtual void RecalculateRasterScales( |
| 98 bool animating_transform_to_screen); | 98 bool animating_transform_to_screen); |
| 99 void CleanUpTilingsOnActiveLayer( | 99 void CleanUpTilingsOnActiveLayer( |
| 100 std::vector<PictureLayerTiling*> used_tilings); | 100 std::vector<PictureLayerTiling*> used_tilings); |
| 101 float MinimumContentsScale() const; | 101 float MinimumContentsScale() const; |
| 102 float SnappedContentsScale(float new_contents_scale); | 102 float SnappedContentsScale(float new_contents_scale); |
| 103 void UpdateLCDTextStatus(bool new_status); | 103 void UpdateLCDTextStatus(bool new_status); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 float raster_contents_scale_; | 143 float raster_contents_scale_; |
| 144 float low_res_raster_contents_scale_; | 144 float low_res_raster_contents_scale_; |
| 145 | 145 |
| 146 bool raster_source_scale_was_animating_; | 146 bool raster_source_scale_was_animating_; |
| 147 bool is_using_lcd_text_; | 147 bool is_using_lcd_text_; |
| 148 bool needs_post_commit_initialization_; | 148 bool needs_post_commit_initialization_; |
| 149 // A sanity state check to make sure UpdateTilePriorities only gets called | 149 // A sanity state check to make sure UpdateTilePriorities only gets called |
| 150 // after a CalculateContentsScale/ManageTilings. | 150 // after a CalculateContentsScale/ManageTilings. |
| 151 bool should_update_tile_priorities_; | 151 bool should_update_tile_priorities_; |
| 152 bool should_use_gpu_rasterization_; | 152 bool should_use_gpu_rasterization_; |
| 153 bool should_use_low_res_tiling_; | |
| 153 | 154 |
| 154 friend class PictureLayer; | 155 friend class PictureLayer; |
| 155 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 156 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 156 }; | 157 }; |
| 157 | 158 |
| 158 } // namespace cc | 159 } // namespace cc |
| 159 | 160 |
| 160 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 161 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |