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

Unified Diff: cc/layers/layer.cc

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/layers/layer.h ('k') | cc/layers/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index c477da3aadbc4ee2bb24a63f0ff1b93dfdf9b9c4..9143d556f76e42e1189f9045d1e0c6c60fe89d30 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -77,15 +77,12 @@ scoped_refptr<Layer> Layer::Create() {
}
Layer::Layer()
- // Layer IDs start from 1.
- : Layer(g_next_layer_id.GetNext() + 1) {}
-
-Layer::Layer(int layer_id)
: ignore_set_needs_commit_(false),
parent_(nullptr),
layer_tree_host_(nullptr),
layer_tree_(nullptr),
- inputs_(layer_id),
+ // Layer IDs start from 1.
+ inputs_(g_next_layer_id.GetNext() + 1),
num_descendants_that_draw_content_(0),
transform_tree_index_(TransformTree::kInvalidNodeId),
effect_tree_index_(EffectTree::kInvalidNodeId),
@@ -1867,4 +1864,8 @@ LayerTree* Layer::GetLayerTree() const {
return layer_tree_;
}
+void Layer::SetLayerIdForTesting(int id) {
+ inputs_.layer_id = id;
+}
+
} // namespace cc
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698