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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void SyncTiling(const PictureLayerTiling* tiling); | 98 void SyncTiling(const PictureLayerTiling* tiling); |
99 | 99 |
100 // Mask-related functions | 100 // Mask-related functions |
101 void SetIsMask(bool is_mask); | 101 void SetIsMask(bool is_mask); |
102 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE; | 102 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE; |
103 | 103 |
104 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE; | 104 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE; |
105 | 105 |
106 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE; | 106 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE; |
107 | 107 |
108 void SetHasGpuRasterizationHint(bool has_hint); | 108 void SetUseGpuRasterization(bool use_gpu); |
109 bool ShouldUseGpuRasterization() const; | 109 bool ShouldUseGpuRasterization() const { return use_gpu_rasterization_; } |
110 | 110 |
111 // Functions used by tile manager. | 111 // Functions used by tile manager. |
112 void DidUnregisterLayer(); | 112 void DidUnregisterLayer(); |
113 PictureLayerImpl* GetTwinLayer() { return twin_layer_; } | 113 PictureLayerImpl* GetTwinLayer() { return twin_layer_; } |
114 WhichTree GetTree() const; | 114 WhichTree GetTree() const; |
115 bool IsOnActiveOrPendingTree() const; | 115 bool IsOnActiveOrPendingTree() const; |
116 | 116 |
117 protected: | 117 protected: |
118 friend class LayerRasterTileIterator; | 118 friend class LayerRasterTileIterator; |
119 | 119 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 float raster_source_scale_; | 176 float raster_source_scale_; |
177 float raster_contents_scale_; | 177 float raster_contents_scale_; |
178 float low_res_raster_contents_scale_; | 178 float low_res_raster_contents_scale_; |
179 | 179 |
180 bool raster_source_scale_was_animating_; | 180 bool raster_source_scale_was_animating_; |
181 bool is_using_lcd_text_; | 181 bool is_using_lcd_text_; |
182 bool needs_post_commit_initialization_; | 182 bool needs_post_commit_initialization_; |
183 // A sanity state check to make sure UpdateTilePriorities only gets called | 183 // A sanity state check to make sure UpdateTilePriorities only gets called |
184 // after a CalculateContentsScale/ManageTilings. | 184 // after a CalculateContentsScale/ManageTilings. |
185 bool should_update_tile_priorities_; | 185 bool should_update_tile_priorities_; |
186 bool has_gpu_rasterization_hint_; | |
187 bool should_use_low_res_tiling_; | 186 bool should_use_low_res_tiling_; |
| 187 bool use_gpu_rasterization_; |
188 | 188 |
189 bool layer_needs_to_register_itself_; | 189 bool layer_needs_to_register_itself_; |
190 | 190 |
191 friend class PictureLayer; | 191 friend class PictureLayer; |
192 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 192 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
193 }; | 193 }; |
194 | 194 |
195 } // namespace cc | 195 } // namespace cc |
196 | 196 |
197 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 197 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |