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

Side by Side Diff: cc/trees/layer_tree_impl.h

Issue 13285002: cc: Consolidate LayerList types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « cc/trees/layer_tree_host_unittest_video.cc ('k') | cc/trees/layer_tree_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_TREES_LAYER_TREE_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_
6 #define CC_TREES_LAYER_TREE_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 25 matching lines...) Expand all
36 class OutputSurface; 36 class OutputSurface;
37 class PaintTimeCounter; 37 class PaintTimeCounter;
38 class Proxy; 38 class Proxy;
39 class ResourceProvider; 39 class ResourceProvider;
40 class ScrollbarLayerImpl; 40 class ScrollbarLayerImpl;
41 class TileManager; 41 class TileManager;
42 struct RendererCapabilities; 42 struct RendererCapabilities;
43 43
44 class CC_EXPORT LayerTreeImpl { 44 class CC_EXPORT LayerTreeImpl {
45 public: 45 public:
46 typedef std::vector<LayerImpl*> LayerList;
47
48 static scoped_ptr<LayerTreeImpl> create( 46 static scoped_ptr<LayerTreeImpl> create(
49 LayerTreeHostImpl* layer_tree_host_impl) { 47 LayerTreeHostImpl* layer_tree_host_impl) {
50 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); 48 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl));
51 } 49 }
52 virtual ~LayerTreeImpl(); 50 virtual ~LayerTreeImpl();
53 51
54 // Methods called by the layer tree that pass-through or access LTHI. 52 // Methods called by the layer tree that pass-through or access LTHI.
55 // --------------------------------------------------------------------------- 53 // ---------------------------------------------------------------------------
56 const LayerTreeSettings& settings() const; 54 const LayerTreeSettings& settings() const;
57 const RendererCapabilities& GetRendererCapabilities() const; 55 const RendererCapabilities& GetRendererCapabilities() const;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return needs_update_draw_properties_; 152 return needs_update_draw_properties_;
155 } 153 }
156 154
157 void set_needs_full_tree_sync(bool needs) { needs_full_tree_sync_ = needs; } 155 void set_needs_full_tree_sync(bool needs) { needs_full_tree_sync_ = needs; }
158 bool needs_full_tree_sync() const { return needs_full_tree_sync_; } 156 bool needs_full_tree_sync() const { return needs_full_tree_sync_; }
159 157
160 void ClearRenderSurfaces(); 158 void ClearRenderSurfaces();
161 159
162 bool AreVisibleResourcesReady() const; 160 bool AreVisibleResourcesReady() const;
163 161
164 const LayerList& RenderSurfaceLayerList() const; 162 const LayerImplList& RenderSurfaceLayerList() const;
165 163
166 // These return the size of the root scrollable area and the size of 164 // These return the size of the root scrollable area and the size of
167 // the user-visible scrolling viewport, in CSS layout coordinates. 165 // the user-visible scrolling viewport, in CSS layout coordinates.
168 gfx::Size ScrollableSize() const; 166 gfx::Size ScrollableSize() const;
169 gfx::SizeF ScrollableViewportSize() const; 167 gfx::SizeF ScrollableViewportSize() const;
170 168
171 LayerImpl* LayerById(int id); 169 LayerImpl* LayerById(int id);
172 170
173 // These should be called by LayerImpl's ctor/dtor. 171 // These should be called by LayerImpl's ctor/dtor.
174 void RegisterLayer(LayerImpl* layer); 172 void RegisterLayer(LayerImpl* layer);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 float max_page_scale_factor_; 230 float max_page_scale_factor_;
233 231
234 typedef base::hash_map<int, LayerImpl*> LayerIdMap; 232 typedef base::hash_map<int, LayerImpl*> LayerIdMap;
235 LayerIdMap layer_id_map_; 233 LayerIdMap layer_id_map_;
236 234
237 // Persisted state for non-impl-side-painting. 235 // Persisted state for non-impl-side-painting.
238 int scrolling_layer_id_from_previous_tree_; 236 int scrolling_layer_id_from_previous_tree_;
239 237
240 // List of visible layers for the most recently prepared frame. Used for 238 // List of visible layers for the most recently prepared frame. Used for
241 // rendering and input event hit testing. 239 // rendering and input event hit testing.
242 LayerList render_surface_layer_list_; 240 LayerImplList render_surface_layer_list_;
243 241
244 bool contents_textures_purged_; 242 bool contents_textures_purged_;
245 bool viewport_size_invalid_; 243 bool viewport_size_invalid_;
246 bool needs_update_draw_properties_; 244 bool needs_update_draw_properties_;
247 245
248 // In impl-side painting mode, this is true when the tree may contain 246 // In impl-side painting mode, this is true when the tree may contain
249 // structural differences relative to the active tree. 247 // structural differences relative to the active tree.
250 bool needs_full_tree_sync_; 248 bool needs_full_tree_sync_;
251 249
252 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 250 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
253 }; 251 };
254 252
255 } // namespace cc 253 } // namespace cc
256 254
257 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 255 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_video.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698