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

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

Issue 322443002: cc: Refactor how picture layers are exposed to the tile manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tile manager perf tests Created 6 years, 6 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 125
126 // Mask-related functions 126 // Mask-related functions
127 void SetIsMask(bool is_mask); 127 void SetIsMask(bool is_mask);
128 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE; 128 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE;
129 129
130 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE; 130 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE;
131 131
132 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE; 132 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE;
133 133
134 // Functions used by tile manager. 134 // Functions used by tile manager.
135 void DidUnregisterLayer();
136 PictureLayerImpl* GetTwinLayer() { return twin_layer_; } 135 PictureLayerImpl* GetTwinLayer() { return twin_layer_; }
137 WhichTree GetTree() const; 136 WhichTree GetTree() const;
138 bool IsOnActiveOrPendingTree() const; 137 bool IsOnActiveOrPendingTree() const;
138 bool HasValidTilePriorities() const;
139 bool AllTilesRequiredForActivationAreReadyToDraw() const; 139 bool AllTilesRequiredForActivationAreReadyToDraw() const;
140 140
141 protected: 141 protected:
142 friend class LayerRasterTileIterator; 142 friend class LayerRasterTileIterator;
143 143
144 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); 144 PictureLayerImpl(LayerTreeImpl* tree_impl, int id);
145 PictureLayerTiling* AddTiling(float contents_scale); 145 PictureLayerTiling* AddTiling(float contents_scale);
146 void RemoveTiling(float contents_scale); 146 void RemoveTiling(float contents_scale);
147 void RemoveAllTilings(); 147 void RemoveAllTilings();
148 void SyncFromActiveLayer(const PictureLayerImpl* other); 148 void SyncFromActiveLayer(const PictureLayerImpl* other);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 float low_res_raster_contents_scale_; 200 float low_res_raster_contents_scale_;
201 201
202 bool raster_source_scale_is_fixed_; 202 bool raster_source_scale_is_fixed_;
203 bool was_animating_transform_to_screen_; 203 bool was_animating_transform_to_screen_;
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 209
210 bool layer_needs_to_register_itself_;
211
212 // Save a copy of the visible rect and viewport size of the last frame that 210 // Save a copy of the visible rect and viewport size of the last frame that
213 // has a valid viewport for prioritizing tiles. 211 // has a valid viewport for prioritizing tiles.
214 gfx::Rect visible_rect_for_tile_priority_; 212 gfx::Rect visible_rect_for_tile_priority_;
215 gfx::Size viewport_size_for_tile_priority_; 213 gfx::Size viewport_size_for_tile_priority_;
216 gfx::Transform screen_space_transform_for_tile_priority_; 214 gfx::Transform screen_space_transform_for_tile_priority_;
217 215
218 friend class PictureLayer; 216 friend class PictureLayer;
219 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 217 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
220 }; 218 };
221 219
222 } // namespace cc 220 } // namespace cc
223 221
224 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 222 #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