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

Unified Diff: cc/layers/layer.h

Issue 2159513003: Setup LayerTree class, refactor 2 functions from LayerTreeHost to it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Layer GetLayerTree now directly uses LayerTree pointer. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/layer.cc » ('j') | cc/proto/layer_tree.proto » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.h
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 6821f12d8bd5deac88f0e7902058ee7c471b475d..4e132b1258518fe4a225d2b867947f3a84a88f69 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -27,6 +27,7 @@
#include "cc/layers/layer_position_constraint.h"
#include "cc/layers/paint_properties.h"
#include "cc/output/filter_operations.h"
+#include "cc/trees/layer_tree.h"
#include "cc/trees/mutator_host_client.h"
#include "cc/trees/property_tree.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -387,8 +388,11 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
// of |proto| is only read if |needs_push_properties_| is set.
void FromLayerPropertiesProto(const proto::LayerProperties& proto);
+ // TODO(xingliu): Layer will hold LayerTree instead of LayerTreeHost.
+ // http://crbug.com/628683
LayerTreeHost* layer_tree_host() { return layer_tree_host_; }
const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; }
+ LayerTree* GetLayerTree() const;
virtual ScrollbarLayerInterface* ToScrollbarLayer();
@@ -691,6 +695,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
// This pointer value is nil when a Layer is not in a tree and is
// updated via SetLayerTreeHost() if a layer moves between trees.
LayerTreeHost* layer_tree_host_;
+ LayerTree* layer_tree_;
Inputs inputs_;
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/layer.cc » ('j') | cc/proto/layer_tree.proto » ('J')

Powered by Google App Engine
This is Rietveld 408576698