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

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: nit 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
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_impl.cc
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
index 09c1fa04a73e185e63aeef74dd2af24b1c820696..1f6e21ab0d8cac82a8968a47df25c73286acb364 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) {
+ double fadeoutDelay = 0.3;
+ 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);
}
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698