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

Unified Diff: cc/input/scrollbar_animation_controller.cc

Issue 2740493003: Call setNeedsRedraw when scrollbar opacity changes. (Closed)
Patch Set: Fix test that was causing redraw during initialization Created 3 years, 9 months 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 | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/scrollbar_animation_controller.cc
diff --git a/cc/input/scrollbar_animation_controller.cc b/cc/input/scrollbar_animation_controller.cc
index da3ba8a2e204235b935a5fa88d0dc97c5c5ff269..576ec2a4318ce93d1955db96d7a206c844e5b54b 100644
--- a/cc/input/scrollbar_animation_controller.cc
+++ b/cc/input/scrollbar_animation_controller.cc
@@ -170,7 +170,6 @@ float ScrollbarAnimationController::AnimationProgressAtTime(
void ScrollbarAnimationController::RunAnimationFrame(float progress) {
ApplyOpacityToScrollbars(1.f - progress);
- client_->SetNeedsRedrawForScrollbarAnimation();
if (progress == 1.f)
StopAnimation();
}
@@ -377,6 +376,9 @@ void ScrollbarAnimationController::ApplyOpacityToScrollbars(float opacity) {
bool previouslyVisible = opacity_ > 0.0f;
bool currentlyVisible = opacity > 0.0f;
+ if (opacity_ != opacity)
+ client_->SetNeedsRedrawForScrollbarAnimation();
+
opacity_ = opacity;
if (previouslyVisible != currentlyVisible)
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698