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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_unittest.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 #include "cc/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 hide_layer_and_subtree(false), 70 hide_layer_and_subtree(false),
71 client(nullptr) {} 71 client(nullptr) {}
72 72
73 Layer::Inputs::~Inputs() {} 73 Layer::Inputs::~Inputs() {}
74 74
75 scoped_refptr<Layer> Layer::Create() { 75 scoped_refptr<Layer> Layer::Create() {
76 return make_scoped_refptr(new Layer()); 76 return make_scoped_refptr(new Layer());
77 } 77 }
78 78
79 Layer::Layer() 79 Layer::Layer()
80 // Layer IDs start from 1.
81 : Layer(g_next_layer_id.GetNext() + 1) {}
82
83 Layer::Layer(int layer_id)
84 : ignore_set_needs_commit_(false), 80 : ignore_set_needs_commit_(false),
85 parent_(nullptr), 81 parent_(nullptr),
86 layer_tree_host_(nullptr), 82 layer_tree_host_(nullptr),
87 layer_tree_(nullptr), 83 layer_tree_(nullptr),
88 inputs_(layer_id), 84 // Layer IDs start from 1.
85 inputs_(g_next_layer_id.GetNext() + 1),
89 num_descendants_that_draw_content_(0), 86 num_descendants_that_draw_content_(0),
90 transform_tree_index_(TransformTree::kInvalidNodeId), 87 transform_tree_index_(TransformTree::kInvalidNodeId),
91 effect_tree_index_(EffectTree::kInvalidNodeId), 88 effect_tree_index_(EffectTree::kInvalidNodeId),
92 clip_tree_index_(ClipTree::kInvalidNodeId), 89 clip_tree_index_(ClipTree::kInvalidNodeId),
93 scroll_tree_index_(ScrollTree::kInvalidNodeId), 90 scroll_tree_index_(ScrollTree::kInvalidNodeId),
94 property_tree_sequence_number_(-1), 91 property_tree_sequence_number_(-1),
95 should_flatten_transform_from_property_tree_(false), 92 should_flatten_transform_from_property_tree_(false),
96 draws_content_(false), 93 draws_content_(false),
97 use_local_transform_for_backface_visibility_(false), 94 use_local_transform_for_backface_visibility_(false),
98 should_check_backface_visibility_(false), 95 should_check_backface_visibility_(false),
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 gfx::Transform Layer::screen_space_transform() const { 1857 gfx::Transform Layer::screen_space_transform() const {
1861 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); 1858 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId);
1862 return draw_property_utils::ScreenSpaceTransform( 1859 return draw_property_utils::ScreenSpaceTransform(
1863 this, layer_tree_->property_trees()->transform_tree); 1860 this, layer_tree_->property_trees()->transform_tree);
1864 } 1861 }
1865 1862
1866 LayerTree* Layer::GetLayerTree() const { 1863 LayerTree* Layer::GetLayerTree() const {
1867 return layer_tree_; 1864 return layer_tree_;
1868 } 1865 }
1869 1866
1867 void Layer::SetLayerIdForTesting(int id) {
1868 inputs_.layer_id = id;
1869 }
1870
1870 } // namespace cc 1871 } // namespace cc
OLDNEW
« 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