| 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/trees/layer_tree_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const { | 771 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const { |
| 772 return layer_tree_host_impl_->ViewportRectForTilePriority(); | 772 return layer_tree_host_impl_->ViewportRectForTilePriority(); |
| 773 } | 773 } |
| 774 | 774 |
| 775 scoped_ptr<ScrollbarAnimationController> | 775 scoped_ptr<ScrollbarAnimationController> |
| 776 LayerTreeImpl::CreateScrollbarAnimationController(LayerImpl* scrolling_layer) { | 776 LayerTreeImpl::CreateScrollbarAnimationController(LayerImpl* scrolling_layer) { |
| 777 DCHECK(settings().scrollbar_fade_delay_ms); | 777 DCHECK(settings().scrollbar_fade_delay_ms); |
| 778 DCHECK(settings().scrollbar_fade_duration_ms); | 778 DCHECK(settings().scrollbar_fade_duration_ms); |
| 779 base::TimeDelta delay = | 779 base::TimeDelta delay = |
| 780 base::TimeDelta::FromMilliseconds(settings().scrollbar_fade_delay_ms); | 780 base::TimeDelta::FromMilliseconds(settings().scrollbar_fade_delay_ms); |
| 781 base::TimeDelta resize_delay = base::TimeDelta::FromMilliseconds( |
| 782 settings().scrollbar_fade_resize_delay_ms); |
| 781 base::TimeDelta duration = | 783 base::TimeDelta duration = |
| 782 base::TimeDelta::FromMilliseconds(settings().scrollbar_fade_duration_ms); | 784 base::TimeDelta::FromMilliseconds(settings().scrollbar_fade_duration_ms); |
| 783 switch (settings().scrollbar_animator) { | 785 switch (settings().scrollbar_animator) { |
| 784 case LayerTreeSettings::LinearFade: { | 786 case LayerTreeSettings::LinearFade: { |
| 785 return ScrollbarAnimationControllerLinearFade::Create( | 787 return ScrollbarAnimationControllerLinearFade::Create( |
| 786 scrolling_layer, layer_tree_host_impl_, delay, duration) | 788 scrolling_layer, |
| 787 .PassAs<ScrollbarAnimationController>(); | 789 layer_tree_host_impl_, |
| 790 delay, |
| 791 resize_delay, |
| 792 duration).PassAs<ScrollbarAnimationController>(); |
| 788 } | 793 } |
| 789 case LayerTreeSettings::Thinning: { | 794 case LayerTreeSettings::Thinning: { |
| 790 return ScrollbarAnimationControllerThinning::Create( | 795 return ScrollbarAnimationControllerThinning::Create(scrolling_layer, |
| 791 scrolling_layer, layer_tree_host_impl_, delay, duration) | 796 layer_tree_host_impl_, |
| 797 delay, |
| 798 resize_delay, |
| 799 duration) |
| 792 .PassAs<ScrollbarAnimationController>(); | 800 .PassAs<ScrollbarAnimationController>(); |
| 793 } | 801 } |
| 794 case LayerTreeSettings::NoAnimator: | 802 case LayerTreeSettings::NoAnimator: |
| 795 NOTREACHED(); | 803 NOTREACHED(); |
| 796 break; | 804 break; |
| 797 } | 805 } |
| 798 return scoped_ptr<ScrollbarAnimationController>(); | 806 return scoped_ptr<ScrollbarAnimationController>(); |
| 799 } | 807 } |
| 800 | 808 |
| 801 void LayerTreeImpl::DidAnimateScrollOffset() { | 809 void LayerTreeImpl::DidAnimateScrollOffset() { |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 | 1451 |
| 1444 void LayerTreeImpl::InputScrollAnimationFinished() { | 1452 void LayerTreeImpl::InputScrollAnimationFinished() { |
| 1445 layer_tree_host_impl_->ScrollEnd(); | 1453 layer_tree_host_impl_->ScrollEnd(); |
| 1446 } | 1454 } |
| 1447 | 1455 |
| 1448 BlockingTaskRunner* LayerTreeImpl::BlockingMainThreadTaskRunner() const { | 1456 BlockingTaskRunner* LayerTreeImpl::BlockingMainThreadTaskRunner() const { |
| 1449 return proxy()->blocking_main_thread_task_runner(); | 1457 return proxy()->blocking_main_thread_task_runner(); |
| 1450 } | 1458 } |
| 1451 | 1459 |
| 1452 } // namespace cc | 1460 } // namespace cc |
| OLD | NEW |