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 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 // set directly rather than by calling Set<Property>. | 1401 // set directly rather than by calling Set<Property>. |
1402 void Layer::OnFilterAnimated(const FilterOperations& filters) { | 1402 void Layer::OnFilterAnimated(const FilterOperations& filters) { |
1403 filters_ = filters; | 1403 filters_ = filters; |
1404 } | 1404 } |
1405 | 1405 |
1406 void Layer::OnOpacityAnimated(float opacity) { | 1406 void Layer::OnOpacityAnimated(float opacity) { |
1407 opacity_ = opacity; | 1407 opacity_ = opacity; |
1408 if (layer_tree_host_) { | 1408 if (layer_tree_host_) { |
1409 if (OpacityNode* node = | 1409 if (OpacityNode* node = |
1410 layer_tree_host_->property_trees()->opacity_tree.Node( | 1410 layer_tree_host_->property_trees()->opacity_tree.Node( |
1411 opacity_tree_index_)) { | 1411 opacity_tree_index())) { |
1412 if (node->owner_id == id()) | 1412 if (node->owner_id == id()) |
1413 node->data = opacity; | 1413 node->data = opacity; |
1414 } | 1414 } |
1415 } | 1415 } |
1416 } | 1416 } |
1417 | 1417 |
1418 void Layer::OnTransformAnimated(const gfx::Transform& transform) { | 1418 void Layer::OnTransformAnimated(const gfx::Transform& transform) { |
1419 if (transform_ == transform) | 1419 if (transform_ == transform) |
1420 return; | 1420 return; |
1421 transform_ = transform; | 1421 transform_ = transform; |
1422 transform_is_invertible_ = transform.IsInvertible(); | 1422 transform_is_invertible_ = transform.IsInvertible(); |
1423 if (layer_tree_host_) { | 1423 if (layer_tree_host_) { |
1424 if (TransformNode* node = | 1424 if (TransformNode* node = |
1425 layer_tree_host_->property_trees()->transform_tree.Node( | 1425 layer_tree_host_->property_trees()->transform_tree.Node( |
1426 transform_tree_index_)) { | 1426 transform_tree_index())) { |
1427 if (node->owner_id == id()) { | 1427 if (node->owner_id == id()) { |
1428 node->data.local = transform; | 1428 node->data.local = transform; |
1429 node->data.needs_local_transform_update = true; | 1429 node->data.needs_local_transform_update = true; |
1430 node->data.is_animated = true; | 1430 node->data.is_animated = true; |
1431 layer_tree_host_->property_trees()->transform_tree.set_needs_update( | 1431 layer_tree_host_->property_trees()->transform_tree.set_needs_update( |
1432 true); | 1432 true); |
1433 } | 1433 } |
1434 } | 1434 } |
1435 } | 1435 } |
1436 } | 1436 } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1569 | 1569 |
1570 void Layer::DidBeginTracing() { | 1570 void Layer::DidBeginTracing() { |
1571 // We'll be dumping layer trees as part of trace, so make sure | 1571 // We'll be dumping layer trees as part of trace, so make sure |
1572 // PushPropertiesTo() propagates layer debug info to the impl | 1572 // PushPropertiesTo() propagates layer debug info to the impl |
1573 // side -- otherwise this won't happen for the the layers that | 1573 // side -- otherwise this won't happen for the the layers that |
1574 // remain unchanged since tracing started. | 1574 // remain unchanged since tracing started. |
1575 SetNeedsPushProperties(); | 1575 SetNeedsPushProperties(); |
1576 } | 1576 } |
1577 | 1577 |
1578 } // namespace cc | 1578 } // namespace cc |
OLD | NEW |