| 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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 | 604 |
| 605 SkColor LayerImpl::SafeOpaqueBackgroundColor() const { | 605 SkColor LayerImpl::SafeOpaqueBackgroundColor() const { |
| 606 if (contents_opaque()) | 606 if (contents_opaque()) |
| 607 return safe_opaque_background_color_; | 607 return safe_opaque_background_color_; |
| 608 SkColor color = background_color(); | 608 SkColor color = background_color(); |
| 609 if (SkColorGetA(color) == 255) | 609 if (SkColorGetA(color) == 255) |
| 610 color = SK_ColorTRANSPARENT; | 610 color = SK_ColorTRANSPARENT; |
| 611 return color; | 611 return color; |
| 612 } | 612 } |
| 613 | 613 |
| 614 bool LayerImpl::FilterIsAnimating() const { | |
| 615 return GetMutatorHost()->IsAnimatingFilterProperty( | |
| 616 element_id(), GetElementTypeForAnimation()); | |
| 617 } | |
| 618 | |
| 619 bool LayerImpl::HasPotentiallyRunningFilterAnimation() const { | 614 bool LayerImpl::HasPotentiallyRunningFilterAnimation() const { |
| 620 return GetMutatorHost()->HasPotentiallyRunningFilterAnimation( | 615 return GetMutatorHost()->HasPotentiallyRunningFilterAnimation( |
| 621 element_id(), GetElementTypeForAnimation()); | 616 element_id(), GetElementTypeForAnimation()); |
| 622 } | 617 } |
| 623 | 618 |
| 624 void LayerImpl::SetMasksToBounds(bool masks_to_bounds) { | 619 void LayerImpl::SetMasksToBounds(bool masks_to_bounds) { |
| 625 masks_to_bounds_ = masks_to_bounds; | 620 masks_to_bounds_ = masks_to_bounds; |
| 626 } | 621 } |
| 627 | 622 |
| 628 void LayerImpl::SetContentsOpaque(bool opaque) { | 623 void LayerImpl::SetContentsOpaque(bool opaque) { |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 | 978 |
| 984 ScrollTree& LayerImpl::GetScrollTree() const { | 979 ScrollTree& LayerImpl::GetScrollTree() const { |
| 985 return GetPropertyTrees()->scroll_tree; | 980 return GetPropertyTrees()->scroll_tree; |
| 986 } | 981 } |
| 987 | 982 |
| 988 TransformTree& LayerImpl::GetTransformTree() const { | 983 TransformTree& LayerImpl::GetTransformTree() const { |
| 989 return GetPropertyTrees()->transform_tree; | 984 return GetPropertyTrees()->transform_tree; |
| 990 } | 985 } |
| 991 | 986 |
| 992 } // namespace cc | 987 } // namespace cc |
| OLD | NEW |