| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 | 1354 |
| 1355 // Reset any state that should be cleared for the next update. | 1355 // Reset any state that should be cleared for the next update. |
| 1356 stacking_order_changed_ = false; | 1356 stacking_order_changed_ = false; |
| 1357 update_rect_ = gfx::Rect(); | 1357 update_rect_ = gfx::Rect(); |
| 1358 | 1358 |
| 1359 needs_push_properties_ = false; | 1359 needs_push_properties_ = false; |
| 1360 num_dependents_need_push_properties_ = 0; | 1360 num_dependents_need_push_properties_ = 0; |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 void Layer::SetTypeForProtoSerialization(proto::LayerNode* proto) const { | 1363 void Layer::SetTypeForProtoSerialization(proto::LayerNode* proto) const { |
| 1364 proto->set_type(proto::LayerType::Base); | 1364 proto->set_type(proto::LayerType::LAYER); |
| 1365 } | 1365 } |
| 1366 | 1366 |
| 1367 void Layer::ToLayerNodeProto(proto::LayerNode* proto) const { | 1367 void Layer::ToLayerNodeProto(proto::LayerNode* proto) const { |
| 1368 proto->set_id(layer_id_); | 1368 proto->set_id(layer_id_); |
| 1369 SetTypeForProtoSerialization(proto); | 1369 SetTypeForProtoSerialization(proto); |
| 1370 | 1370 |
| 1371 if (parent_) | 1371 if (parent_) |
| 1372 proto->set_parent_id(parent_->id()); | 1372 proto->set_parent_id(parent_->id()); |
| 1373 | 1373 |
| 1374 DCHECK_EQ(0, proto->children_size()); | 1374 DCHECK_EQ(0, proto->children_size()); |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2042 this, layer_tree_host_->property_trees()->transform_tree); | 2042 this, layer_tree_host_->property_trees()->transform_tree); |
| 2043 } | 2043 } |
| 2044 | 2044 |
| 2045 gfx::Transform Layer::screen_space_transform() const { | 2045 gfx::Transform Layer::screen_space_transform() const { |
| 2046 DCHECK_NE(transform_tree_index_, -1); | 2046 DCHECK_NE(transform_tree_index_, -1); |
| 2047 return ScreenSpaceTransformFromPropertyTrees( | 2047 return ScreenSpaceTransformFromPropertyTrees( |
| 2048 this, layer_tree_host_->property_trees()->transform_tree); | 2048 this, layer_tree_host_->property_trees()->transform_tree); |
| 2049 } | 2049 } |
| 2050 | 2050 |
| 2051 } // namespace cc | 2051 } // namespace cc |
| OLD | NEW |