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

Side by Side Diff: cc/layer_tree_impl.h

Issue 11450015: [cc] Move root layer pointer to LayerTreeImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_LAYER_TREE_IMPL_H_
6 #define CC_LAYER_TREE_IMPL_H_
7
8 #include "cc/layer_impl.h"
9
10 namespace cc {
11
12 class LayerTreeHostImpl;
13 class LayerTreeImpl;
14 class HeadsUpDisplayLayerImpl;
15
16 class CC_EXPORT LayerTreeImplClient {
17 public:
18 virtual void OnCanDrawStateChangedForTree(LayerTreeImpl*) = 0;
19
20 protected:
21 virtual ~LayerTreeImplClient() {}
22 };
23
24 class CC_EXPORT LayerTreeImpl {
25 public:
26 static scoped_ptr<LayerTreeImpl> create(LayerTreeImplClient* client)
27 {
28 return make_scoped_ptr(new LayerTreeImpl(client));
29 }
30 virtual ~LayerTreeImpl();
31
32 LayerImpl* RootLayer() const { return root_layer_.get(); }
33 void SetRootLayer(scoped_ptr<LayerImpl>);
34 scoped_ptr<LayerImpl> DetachLayerTree();
35
36 int source_frame_number() const { return source_frame_number_; }
37 void set_source_frame_number(int frame_number) { source_frame_number_ = frame_ number; }
38
39 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; }
40 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { hud_layer_ = layer_i mpl; }
41
42 LayerImpl* root_scroll_layer() { return root_scroll_layer_; }
43 void set_root_scroll_layer(LayerImpl* layer_impl) { root_scroll_layer_ = layer _impl; }
44
45 LayerImpl* currently_scrolling_layer() { return currently_scrolling_layer_; }
46 void set_currently_scrolling_layer(LayerImpl* layer_impl) { currently_scrollin g_layer_ = layer_impl; }
47
48 void ClearCurrentlyScrollingLayer();
49
50 protected:
51 LayerTreeImpl(LayerTreeImplClient* client);
52
53 LayerTreeImplClient* client_;
54 int source_frame_number_;
55 scoped_ptr<LayerImpl> root_layer_;
56 HeadsUpDisplayLayerImpl* hud_layer_;
57 LayerImpl* root_scroll_layer_;
58 LayerImpl* currently_scrolling_layer_;
59
60 // Persisted state
61 int scrolling_layer_id_from_previous_tree_;
62
63 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
64 };
65
66 }
67
68 #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