OLD | NEW |
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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1351 | 1351 |
1352 // Reset any state that should be cleared for the next update. | 1352 // Reset any state that should be cleared for the next update. |
1353 stacking_order_changed_ = false; | 1353 stacking_order_changed_ = false; |
1354 update_rect_ = gfx::Rect(); | 1354 update_rect_ = gfx::Rect(); |
1355 | 1355 |
1356 needs_push_properties_ = false; | 1356 needs_push_properties_ = false; |
1357 num_dependents_need_push_properties_ = 0; | 1357 num_dependents_need_push_properties_ = 0; |
1358 } | 1358 } |
1359 | 1359 |
1360 void Layer::SetTypeForProtoSerialization(proto::LayerNode* proto) const { | 1360 void Layer::SetTypeForProtoSerialization(proto::LayerNode* proto) const { |
1361 proto->set_type(proto::LayerType::Base); | 1361 proto->set_type(proto::LayerType::LAYER); |
1362 } | 1362 } |
1363 | 1363 |
1364 void Layer::ToLayerNodeProto(proto::LayerNode* proto) const { | 1364 void Layer::ToLayerNodeProto(proto::LayerNode* proto) const { |
1365 proto->set_id(layer_id_); | 1365 proto->set_id(layer_id_); |
1366 SetTypeForProtoSerialization(proto); | 1366 SetTypeForProtoSerialization(proto); |
1367 | 1367 |
1368 if (parent_) | 1368 if (parent_) |
1369 proto->set_parent_id(parent_->id()); | 1369 proto->set_parent_id(parent_->id()); |
1370 | 1370 |
1371 DCHECK_EQ(0, proto->children_size()); | 1371 DCHECK_EQ(0, proto->children_size()); |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1851 this, layer_tree_host_->property_trees()->transform_tree); | 1851 this, layer_tree_host_->property_trees()->transform_tree); |
1852 } | 1852 } |
1853 | 1853 |
1854 gfx::Transform Layer::screen_space_transform() const { | 1854 gfx::Transform Layer::screen_space_transform() const { |
1855 DCHECK_NE(transform_tree_index_, -1); | 1855 DCHECK_NE(transform_tree_index_, -1); |
1856 return ScreenSpaceTransformFromPropertyTrees( | 1856 return ScreenSpaceTransformFromPropertyTrees( |
1857 this, layer_tree_host_->property_trees()->transform_tree); | 1857 this, layer_tree_host_->property_trees()->transform_tree); |
1858 } | 1858 } |
1859 | 1859 |
1860 } // namespace cc | 1860 } // namespace cc |
OLD | NEW |