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

Side by Side Diff: cc/layer_tree_impl.h

Issue 11529003: [cc] Route LayerImpl::layerTreeHostImpl() calls through LayerTreeImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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/layer_tree_host_unittest.cc ('k') | cc/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_LAYER_TREE_IMPL_H_ 5 #ifndef CC_LAYER_TREE_IMPL_H_
6 #define CC_LAYER_TREE_IMPL_H_ 6 #define CC_LAYER_TREE_IMPL_H_
7 7
8 #include "cc/layer_impl.h" 8 #include "cc/layer_impl.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 class DebugRectHistory;
13 class FrameRateCounter;
14 class HeadsUpDisplayLayerImpl;
15 class LayerTreeDebugState;
12 class LayerTreeHostImpl; 16 class LayerTreeHostImpl;
13 class LayerTreeImpl; 17 class LayerTreeImpl;
14 class HeadsUpDisplayLayerImpl; 18 class LayerTreeSettings;
19 class OutputSurface;
20 class ResourceProvider;
21 class TileManager;
15 22
16 class CC_EXPORT LayerTreeImpl { 23 class CC_EXPORT LayerTreeImpl {
17 public: 24 public:
18 static scoped_ptr<LayerTreeImpl> create(LayerTreeHostImpl* layer_tree_host_imp l) 25 static scoped_ptr<LayerTreeImpl> create(LayerTreeHostImpl* layer_tree_host_imp l)
19 { 26 {
20 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); 27 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl));
21 } 28 }
22 virtual ~LayerTreeImpl(); 29 virtual ~LayerTreeImpl();
23 30
24 // Methods called by the layer tree. 31 // Methods called by the layer tree that pass-through to LHTI.
25 // --------------------------------------------------------------------------- 32 // ---------------------------------------------------------------------------
26 // TODO(nduca): Remove this and have layers call through this class. 33 const LayerTreeSettings& settings() const;
27 LayerTreeHostImpl* layer_tree_host_impl() const { return layer_tree_host_impl_ ; } 34 OutputSurface* output_surface() const;
35 ResourceProvider* resource_provider() const;
36 TileManager* tile_manager() const;
37 FrameRateCounter* frame_rate_counter() const;
38
39 // Tree specific methods exposed to layer-impl tree.
40 // ---------------------------------------------------------------------------
41 void SetNeedsRedraw();
42 void SetNeedsUpdateDrawProperties();
43
44 // TODO(nduca): These are implemented in cc files temporarily, but will become
45 // trivial accessors in a followup patch.
46 const LayerTreeDebugState& debug_state() const;
47 float device_scale_factor() const;
48 const gfx::Size& device_viewport_size() const;
49 const gfx::Size& layout_viewport_size() const;
50 std::string layer_tree_as_text() const;
51 DebugRectHistory* debug_rect_history() const;
28 52
29 // Other public methods 53 // Other public methods
30 // --------------------------------------------------------------------------- 54 // ---------------------------------------------------------------------------
31 LayerImpl* RootLayer() const { return root_layer_.get(); } 55 LayerImpl* RootLayer() const { return root_layer_.get(); }
32 void SetRootLayer(scoped_ptr<LayerImpl>); 56 void SetRootLayer(scoped_ptr<LayerImpl>);
33 scoped_ptr<LayerImpl> DetachLayerTree(); 57 scoped_ptr<LayerImpl> DetachLayerTree();
34 58
35 int source_frame_number() const { return source_frame_number_; } 59 int source_frame_number() const { return source_frame_number_; }
36 void set_source_frame_number(int frame_number) { source_frame_number_ = frame_ number; } 60 void set_source_frame_number(int frame_number) { source_frame_number_ = frame_ number; }
37 61
(...skipping 20 matching lines...) Expand all
58 82
59 // Persisted state 83 // Persisted state
60 int scrolling_layer_id_from_previous_tree_; 84 int scrolling_layer_id_from_previous_tree_;
61 85
62 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 86 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
63 }; 87 };
64 88
65 } 89 }
66 90
67 #endif // CC_LAYER_TREE_IMPL_H_ 91 #endif // CC_LAYER_TREE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layer_tree_host_unittest.cc ('k') | cc/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698