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

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

Issue 290573007: cc: Move gpu rasterization flag from tree-impl to tree-host-impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void SyncTiling(const PictureLayerTiling* tiling); 125 void SyncTiling(const PictureLayerTiling* tiling);
126 126
127 // Mask-related functions 127 // Mask-related functions
128 void SetIsMask(bool is_mask); 128 void SetIsMask(bool is_mask);
129 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE; 129 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE;
130 130
131 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE; 131 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE;
132 132
133 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE; 133 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE;
134 134
135 bool use_gpu_rasterization() const {
136 return layer_tree_impl()->use_gpu_rasterization();
137 }
138
139 // Functions used by tile manager. 135 // Functions used by tile manager.
140 void DidUnregisterLayer(); 136 void DidUnregisterLayer();
141 PictureLayerImpl* GetTwinLayer() { return twin_layer_; } 137 PictureLayerImpl* GetTwinLayer() { return twin_layer_; }
142 WhichTree GetTree() const; 138 WhichTree GetTree() const;
143 bool IsOnActiveOrPendingTree() const; 139 bool IsOnActiveOrPendingTree() const;
144 140
145 protected: 141 protected:
146 friend class LayerRasterTileIterator; 142 friend class LayerRasterTileIterator;
147 143
148 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); 144 PictureLayerImpl(LayerTreeImpl* tree_impl, int id);
149 PictureLayerTiling* AddTiling(float contents_scale); 145 PictureLayerTiling* AddTiling(float contents_scale);
150 void RemoveTiling(float contents_scale); 146 void RemoveTiling(float contents_scale);
151 void RemoveAllTilings(); 147 void RemoveAllTilings();
152 void SyncFromActiveLayer(const PictureLayerImpl* other); 148 void SyncFromActiveLayer(const PictureLayerImpl* other);
153 void ManageTilings(bool animating_transform_to_screen, 149 void ManageTilings(bool animating_transform_to_screen,
154 float maximum_animation_contents_scale); 150 float maximum_animation_contents_scale);
155 bool ShouldHaveLowResTiling() const { 151 bool ShouldHaveLowResTiling() const {
156 return should_use_low_res_tiling_ && !use_gpu_rasterization(); 152 return should_use_low_res_tiling_ &&
153 !layer_tree_impl()->use_gpu_rasterization();
157 } 154 }
158 virtual bool ShouldAdjustRasterScale( 155 virtual bool ShouldAdjustRasterScale(
159 bool animating_transform_to_screen) const; 156 bool animating_transform_to_screen) const;
160 virtual void RecalculateRasterScales(bool animating_transform_to_screen, 157 virtual void RecalculateRasterScales(bool animating_transform_to_screen,
161 float maximum_animation_contents_scale); 158 float maximum_animation_contents_scale);
162 void CleanUpTilingsOnActiveLayer( 159 void CleanUpTilingsOnActiveLayer(
163 std::vector<PictureLayerTiling*> used_tilings); 160 std::vector<PictureLayerTiling*> used_tilings);
164 float MinimumContentsScale() const; 161 float MinimumContentsScale() const;
165 float SnappedContentsScale(float new_contents_scale); 162 float SnappedContentsScale(float new_contents_scale);
166 void UpdateLCDTextStatus(bool new_status); 163 void UpdateLCDTextStatus(bool new_status);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 gfx::Size viewport_size_for_tile_priority_; 220 gfx::Size viewport_size_for_tile_priority_;
224 gfx::Transform screen_space_transform_for_tile_priority_; 221 gfx::Transform screen_space_transform_for_tile_priority_;
225 222
226 friend class PictureLayer; 223 friend class PictureLayer;
227 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 224 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
228 }; 225 };
229 226
230 } // namespace cc 227 } // namespace cc
231 228
232 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 229 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698