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/debug_border_draw_quad.h" | 10 #include "cc/debug_border_draw_quad.h" |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 noteLayerSurfacePropertyChanged(); | 666 noteLayerSurfacePropertyChanged(); |
667 } | 667 } |
668 | 668 |
669 bool LayerImpl::transformIsAnimating() const | 669 bool LayerImpl::transformIsAnimating() const |
670 { | 670 { |
671 return m_layerAnimationController->isAnimatingProperty(ActiveAnimation::Tran
sform); | 671 return m_layerAnimationController->isAnimatingProperty(ActiveAnimation::Tran
sform); |
672 } | 672 } |
673 | 673 |
674 void LayerImpl::setContentBounds(const gfx::Size& contentBounds) | 674 void LayerImpl::setContentBounds(const gfx::Size& contentBounds) |
675 { | 675 { |
676 if (m_contentBounds == contentBounds) | 676 if (this->contentBounds() == contentBounds) |
677 return; | 677 return; |
678 | 678 |
679 m_contentBounds = contentBounds; | 679 m_drawProperties.content_bounds = contentBounds; |
680 noteLayerPropertyChanged(); | 680 noteLayerPropertyChanged(); |
681 } | 681 } |
682 | 682 |
683 void LayerImpl::setContentsScale(float contentsScaleX, float contentsScaleY) | 683 void LayerImpl::setContentsScale(float contentsScaleX, float contentsScaleY) |
684 { | 684 { |
685 if (m_contentsScaleX == contentsScaleX && m_contentsScaleY == contentsScaleY
) | 685 if (this->contentsScaleX() == contentsScaleX && this->contentsScaleY() == co
ntentsScaleY) |
686 return; | 686 return; |
687 | 687 |
688 m_contentsScaleX = contentsScaleX; | 688 m_drawProperties.contents_scale_x = contentsScaleX; |
689 m_contentsScaleY = contentsScaleY; | 689 m_drawProperties.contents_scale_y = contentsScaleY; |
690 noteLayerPropertyChanged(); | 690 noteLayerPropertyChanged(); |
691 } | 691 } |
692 | 692 |
693 void LayerImpl::setScrollOffset(gfx::Vector2d scrollOffset) | 693 void LayerImpl::setScrollOffset(gfx::Vector2d scrollOffset) |
694 { | 694 { |
695 if (m_scrollOffset == scrollOffset) | 695 if (m_scrollOffset == scrollOffset) |
696 return; | 696 return; |
697 | 697 |
698 m_scrollOffset = scrollOffset; | 698 m_scrollOffset = scrollOffset; |
699 noteLayerPropertyChangedForSubtree(); | 699 noteLayerPropertyChangedForSubtree(); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 | 780 |
781 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) | 781 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) |
782 { | 782 { |
783 if (!m_scrollbarAnimationController) | 783 if (!m_scrollbarAnimationController) |
784 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); | 784 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); |
785 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 785 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); |
786 m_scrollbarAnimationController->updateScrollOffset(this); | 786 m_scrollbarAnimationController->updateScrollOffset(this); |
787 } | 787 } |
788 | 788 |
789 } // namespace cc | 789 } // namespace cc |
OLD | NEW |