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

Unified Diff: cc/layers/layer.h

Issue 2397843003: cc/blimp: Add (de)-serialization for PictureLayer and ScrollbarLayer. (Closed)
Patch Set: Addressed comments Created 4 years, 2 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/blimp/layer_tree_host_remote_unittest.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »
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 cb4f1cb6fbde1ec9110729abc354118be210d006..d0bd07ce9b90e717ccf5c7ce5ab56e5ff6f11480 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -358,7 +358,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
// hierarchical structure to the given LayerNode proto. In addition to the
// structure itself, the Layer id and type is also written to facilitate
// construction of the correct layer on the client.
- void ToLayerNodeProto(proto::LayerNode* proto) const;
+ virtual void ToLayerNodeProto(proto::LayerNode* proto) const;
// Recursively iterate over this layer and all children and reset the
// properties sent with the hierarchical structure in the LayerNode protos.
@@ -371,9 +371,9 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
// into this node and its children. The |layer_map| should be used to look
// for previously existing Layers, since they should be re-used between each
// hierarchy update.
- void FromLayerNodeProto(const proto::LayerNode& proto,
- const LayerIdMap& layer_map,
- LayerTreeHost* layer_tree_host);
+ virtual void FromLayerNodeProto(const proto::LayerNode& proto,
+ const LayerIdMap& layer_map,
+ LayerTreeHost* layer_tree_host);
// This method is similar to PushPropertiesTo, but instead of pushing to
// a LayerImpl, it pushes the properties to proto::LayerProperties. It is
@@ -488,16 +488,16 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
ElementListType GetElementTypeForAnimation() const;
+ // Tests in remote mode need to explicitly set the layer id so it matches the
+ // layer id for the corresponding Layer on the engine.
+ void SetLayerIdForTesting(int id);
+
protected:
friend class LayerImpl;
friend class TreeSynchronizer;
virtual ~Layer();
Layer();
- // Tests in remote mode need to explicitly set the layer id so it matches the
- // layer id for the corresponding Layer on the engine.
- explicit Layer(int layer_id);
-
LayerTreeHost* layer_tree_host() { return layer_tree_host_; }
const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; }
« no previous file with comments | « cc/blimp/layer_tree_host_remote_unittest.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698