| 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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 if (m_maxScrollOffset == maxScrollOffset) | 813 if (m_maxScrollOffset == maxScrollOffset) |
| 814 return; | 814 return; |
| 815 m_maxScrollOffset = maxScrollOffset; | 815 m_maxScrollOffset = maxScrollOffset; |
| 816 | 816 |
| 817 layerTreeImpl()->SetNeedsUpdateDrawProperties(); | 817 layerTreeImpl()->SetNeedsUpdateDrawProperties(); |
| 818 | 818 |
| 819 if (m_scrollbarAnimationController) | 819 if (m_scrollbarAnimationController) |
| 820 m_scrollbarAnimationController->updateScrollOffset(this); | 820 m_scrollbarAnimationController->updateScrollOffset(this); |
| 821 } | 821 } |
| 822 | 822 |
| 823 void LayerImpl::setVisibleScrollArea(gfx::Size visibleScrollArea) |
| 824 { |
| 825 if (m_visibleScrollArea == visibleScrollArea) |
| 826 return; |
| 827 m_visibleScrollArea = visibleScrollArea; |
| 828 } |
| 829 |
| 823 ScrollbarLayerImpl* LayerImpl::horizontalScrollbarLayer() | 830 ScrollbarLayerImpl* LayerImpl::horizontalScrollbarLayer() |
| 824 { | 831 { |
| 825 return m_scrollbarAnimationController ? m_scrollbarAnimationController->hori
zontalScrollbarLayer() : 0; | 832 return m_scrollbarAnimationController ? m_scrollbarAnimationController->hori
zontalScrollbarLayer() : 0; |
| 826 } | 833 } |
| 827 | 834 |
| 828 const ScrollbarLayerImpl* LayerImpl::horizontalScrollbarLayer() const | 835 const ScrollbarLayerImpl* LayerImpl::horizontalScrollbarLayer() const |
| 829 { | 836 { |
| 830 return m_scrollbarAnimationController ? m_scrollbarAnimationController->hori
zontalScrollbarLayer() : 0; | 837 return m_scrollbarAnimationController ? m_scrollbarAnimationController->hori
zontalScrollbarLayer() : 0; |
| 831 } | 838 } |
| 832 | 839 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 863 if (!m_scrollbarAnimationController) { | 870 if (!m_scrollbarAnimationController) { |
| 864 if (m_layerTreeImpl->settings().useLinearFadeScrollbarAnimator) | 871 if (m_layerTreeImpl->settings().useLinearFadeScrollbarAnimator) |
| 865 m_scrollbarAnimationController = createScrollbarAnimationControllerW
ithFade(this); | 872 m_scrollbarAnimationController = createScrollbarAnimationControllerW
ithFade(this); |
| 866 else | 873 else |
| 867 m_scrollbarAnimationController = ScrollbarAnimationController::creat
e(this); | 874 m_scrollbarAnimationController = ScrollbarAnimationController::creat
e(this); |
| 868 } | 875 } |
| 869 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 876 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); |
| 870 } | 877 } |
| 871 | 878 |
| 872 } // namespace cc | 879 } // namespace cc |
| OLD | NEW |