Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: cc/layer_impl.cc

Issue 11464041: cc: Don't use partial updates for scrollbars when they are not allowed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698