Index: cc/layer_impl.cc |
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc |
index 09c1fa04a73e185e63aeef74dd2af24b1c820696..136b891d4a36a34c3efbc7141a3758c89b8a67ae 100644 |
--- a/cc/layer_impl.cc |
+++ b/cc/layer_impl.cc |
@@ -17,6 +17,7 @@ |
#include "cc/proxy.h" |
#include "cc/quad_sink.h" |
#include "cc/scrollbar_animation_controller.h" |
+#include "cc/scrollbar_animation_controller_linear_fade.h" |
#include "ui/gfx/point_conversions.h" |
#include "ui/gfx/rect_conversions.h" |
@@ -790,8 +791,15 @@ const ScrollbarLayerImpl* LayerImpl::horizontalScrollbarLayer() const |
void LayerImpl::setHorizontalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) |
{ |
- if (!m_scrollbarAnimationController) |
- m_scrollbarAnimationController = ScrollbarAnimationController::create(this); |
+ if (!m_scrollbarAnimationController) { |
+ if (m_layerTreeImpl->settings().useLinearFadeScrollbarAnimator) { |
+ static const double fadeoutDelay = 0.3; |
enne (OOO)
2012/12/22 01:17:18
s/static const//
danakj
2012/12/22 01:23:26
Mhm! Done.
|
+ static const double fadeoutLength = 0.3; |
+ m_scrollbarAnimationController = ScrollbarAnimationControllerLinearFade::create(this, fadeoutDelay, fadeoutLength).PassAs<ScrollbarAnimationController>(); |
+ } else { |
+ m_scrollbarAnimationController = ScrollbarAnimationController::create(this); |
+ } |
+ } |
m_scrollbarAnimationController->setHorizontalScrollbarLayer(scrollbarLayer); |
m_scrollbarAnimationController->updateScrollOffset(this); |
} |