Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: cc/layers/picture_layer_impl.h

Issue 222903005: cc: Let skia veto gpu rasterization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 void SyncTiling(const PictureLayerTiling* tiling); 121 void SyncTiling(const PictureLayerTiling* tiling);
122 122
123 // Mask-related functions 123 // Mask-related functions
124 void SetIsMask(bool is_mask); 124 void SetIsMask(bool is_mask);
125 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE; 125 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE;
126 126
127 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE; 127 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE;
128 128
129 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE; 129 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE;
130 130
131 void SetHasGpuRasterizationHint(bool has_hint); 131 void SetUseGpuRasterization(bool use_gpu);
132 bool ShouldUseGpuRasterization() const; 132 bool ShouldUseGpuRasterization() const { return use_gpu_rasterization_; }
133 133
134 // Functions used by tile manager. 134 // Functions used by tile manager.
135 void DidUnregisterLayer(); 135 void DidUnregisterLayer();
136 PictureLayerImpl* GetTwinLayer() { return twin_layer_; } 136 PictureLayerImpl* GetTwinLayer() { return twin_layer_; }
137 WhichTree GetTree() const; 137 WhichTree GetTree() const;
138 bool IsOnActiveOrPendingTree() const; 138 bool IsOnActiveOrPendingTree() const;
139 139
140 protected: 140 protected:
141 friend class LayerRasterTileIterator; 141 friend class LayerRasterTileIterator;
142 142
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 float raster_source_scale_; 199 float raster_source_scale_;
200 float raster_contents_scale_; 200 float raster_contents_scale_;
201 float low_res_raster_contents_scale_; 201 float low_res_raster_contents_scale_;
202 202
203 bool raster_source_scale_was_animating_; 203 bool raster_source_scale_was_animating_;
204 bool is_using_lcd_text_; 204 bool is_using_lcd_text_;
205 bool needs_post_commit_initialization_; 205 bool needs_post_commit_initialization_;
206 // A sanity state check to make sure UpdateTilePriorities only gets called 206 // A sanity state check to make sure UpdateTilePriorities only gets called
207 // after a CalculateContentsScale/ManageTilings. 207 // after a CalculateContentsScale/ManageTilings.
208 bool should_update_tile_priorities_; 208 bool should_update_tile_priorities_;
209 bool has_gpu_rasterization_hint_;
210 bool should_use_low_res_tiling_; 209 bool should_use_low_res_tiling_;
210 bool use_gpu_rasterization_;
211 211
212 bool layer_needs_to_register_itself_; 212 bool layer_needs_to_register_itself_;
213 213
214 friend class PictureLayer; 214 friend class PictureLayer;
215 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 215 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
216 }; 216 };
217 217
218 } // namespace cc 218 } // namespace cc
219 219
220 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 220 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698