Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/layer_impl.h" | 5 #include "cc/layer_impl.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "cc/animation_registrar.h" | 10 #include "cc/animation_registrar.h" |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 735 float LayerImpl::opacity() const | 735 float LayerImpl::opacity() const |
| 736 { | 736 { |
| 737 return m_opacity; | 737 return m_opacity; |
| 738 } | 738 } |
| 739 | 739 |
| 740 bool LayerImpl::opacityIsAnimating() const | 740 bool LayerImpl::opacityIsAnimating() const |
| 741 { | 741 { |
| 742 return m_layerAnimationController->isAnimatingProperty(Animation::Opacity); | 742 return m_layerAnimationController->isAnimatingProperty(Animation::Opacity); |
| 743 } | 743 } |
| 744 | 744 |
| 745 bool LayerImpl::opacityIsAnimatingOnImplOnly() const | |
| 746 { | |
| 747 Animation* opacityAnimation = m_layerAnimationController->getAnimation(Anima tion::Opacity); | |
|
danakj
2013/03/13 02:02:06
You're going to need to rebase and chromify this C
Ian Vollick
2013/03/13 02:41:02
Done.
| |
| 748 return opacityAnimation && opacityAnimation->isImplOnly(); | |
| 749 } | |
| 750 | |
| 745 void LayerImpl::setPosition(const gfx::PointF& position) | 751 void LayerImpl::setPosition(const gfx::PointF& position) |
| 746 { | 752 { |
| 747 if (m_position == position) | 753 if (m_position == position) |
| 748 return; | 754 return; |
| 749 | 755 |
| 750 m_position = position; | 756 m_position = position; |
| 751 noteLayerPropertyChangedForSubtree(); | 757 noteLayerPropertyChangedForSubtree(); |
| 752 } | 758 } |
| 753 | 759 |
| 754 void LayerImpl::setPreserves3D(bool preserves3D) | 760 void LayerImpl::setPreserves3D(bool preserves3D) |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 782 const gfx::Transform& LayerImpl::transform() const | 788 const gfx::Transform& LayerImpl::transform() const |
| 783 { | 789 { |
| 784 return m_transform; | 790 return m_transform; |
| 785 } | 791 } |
| 786 | 792 |
| 787 bool LayerImpl::transformIsAnimating() const | 793 bool LayerImpl::transformIsAnimating() const |
| 788 { | 794 { |
| 789 return m_layerAnimationController->isAnimatingProperty(Animation::Transform) ; | 795 return m_layerAnimationController->isAnimatingProperty(Animation::Transform) ; |
| 790 } | 796 } |
| 791 | 797 |
| 798 bool LayerImpl::transformIsAnimatingOnImplOnly() const | |
| 799 { | |
| 800 Animation* transformAnimation = m_layerAnimationController->getAnimation(Ani mation::Transform); | |
| 801 return transformAnimation && transformAnimation->isImplOnly(); | |
| 802 } | |
| 803 | |
| 792 void LayerImpl::setContentBounds(const gfx::Size& contentBounds) | 804 void LayerImpl::setContentBounds(const gfx::Size& contentBounds) |
| 793 { | 805 { |
| 794 if (this->contentBounds() == contentBounds) | 806 if (this->contentBounds() == contentBounds) |
| 795 return; | 807 return; |
| 796 | 808 |
| 797 m_drawProperties.content_bounds = contentBounds; | 809 m_drawProperties.content_bounds = contentBounds; |
| 798 noteLayerPropertyChanged(); | 810 noteLayerPropertyChanged(); |
| 799 } | 811 } |
| 800 | 812 |
| 801 void LayerImpl::setContentsScale(float contentsScaleX, float contentsScaleY) | 813 void LayerImpl::setContentsScale(float contentsScaleX, float contentsScaleY) |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 985 } | 997 } |
| 986 | 998 |
| 987 scoped_ptr<base::Value> LayerImpl::AsValue() const | 999 scoped_ptr<base::Value> LayerImpl::AsValue() const |
| 988 { | 1000 { |
| 989 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1001 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
| 990 AsValueInto(state.get()); | 1002 AsValueInto(state.get()); |
| 991 return state.PassAs<base::Value>(); | 1003 return state.PassAs<base::Value>(); |
| 992 } | 1004 } |
| 993 | 1005 |
| 994 } // namespace cc | 1006 } // namespace cc |
| OLD | NEW |