| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_impl.h" | 5 #include "cc/layers/layer_impl.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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 } | 926 } |
| 927 | 927 |
| 928 void LayerImpl::SetContentsOpaque(bool opaque) { | 928 void LayerImpl::SetContentsOpaque(bool opaque) { |
| 929 if (contents_opaque_ == opaque) | 929 if (contents_opaque_ == opaque) |
| 930 return; | 930 return; |
| 931 | 931 |
| 932 contents_opaque_ = opaque; | 932 contents_opaque_ = opaque; |
| 933 } | 933 } |
| 934 | 934 |
| 935 float LayerImpl::Opacity() const { | 935 float LayerImpl::Opacity() const { |
| 936 if (!layer_tree_impl()->property_trees()->IsInIdToIndexMap( | 936 PropertyTrees* property_trees = layer_tree_impl()->property_trees(); |
| 937 PropertyTrees::TreeType::EFFECT, id())) | 937 if (!property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::EFFECT, id())) |
| 938 return 1.f; | 938 return 1.f; |
| 939 EffectNode* node = | 939 EffectNode* node = property_trees->effect_tree.Node( |
| 940 layer_tree_impl()->property_trees()->effect_tree.Node(effect_tree_index_); | 940 property_trees->effect_id_to_index_map[id()]); |
| 941 return node->data.opacity; | 941 return node->data.opacity; |
| 942 } | 942 } |
| 943 | 943 |
| 944 bool LayerImpl::OpacityIsAnimating() const { | 944 bool LayerImpl::OpacityIsAnimating() const { |
| 945 return layer_tree_impl_->IsAnimatingOpacityProperty(this); | 945 return layer_tree_impl_->IsAnimatingOpacityProperty(this); |
| 946 } | 946 } |
| 947 | 947 |
| 948 bool LayerImpl::HasPotentiallyRunningOpacityAnimation() const { | 948 bool LayerImpl::HasPotentiallyRunningOpacityAnimation() const { |
| 949 return layer_tree_impl_->HasPotentiallyRunningOpacityAnimation(this); | 949 return layer_tree_impl_->HasPotentiallyRunningOpacityAnimation(this); |
| 950 } | 950 } |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1341 .layer_transforms_should_scale_layer_contents) { | 1341 .layer_transforms_should_scale_layer_contents) { |
| 1342 return default_scale; | 1342 return default_scale; |
| 1343 } | 1343 } |
| 1344 | 1344 |
| 1345 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1345 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
| 1346 ScreenSpaceTransform(), default_scale); | 1346 ScreenSpaceTransform(), default_scale); |
| 1347 return std::max(transform_scales.x(), transform_scales.y()); | 1347 return std::max(transform_scales.x(), transform_scales.y()); |
| 1348 } | 1348 } |
| 1349 | 1349 |
| 1350 } // namespace cc | 1350 } // namespace cc |
| OLD | NEW |