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

Side by Side Diff: cc/scrollbar_animation_controller_linear_fade.cc

Issue 12774006: cc: Chromify Layer and LayerImpl classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MoreAndroidCompilings Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/scheduler_unittest.cc ('k') | cc/scrollbar_animation_controller_linear_fade_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/scrollbar_animation_controller_linear_fade.h" 5 #include "cc/scrollbar_animation_controller_linear_fade.h"
6 6
7 #include "base/time.h" 7 #include "base/time.h"
8 #include "cc/layer_impl.h" 8 #include "cc/layer_impl.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 13 matching lines...) Expand all
24 { 24 {
25 } 25 }
26 26
27 ScrollbarAnimationControllerLinearFade::~ScrollbarAnimationControllerLinearFade( ) 27 ScrollbarAnimationControllerLinearFade::~ScrollbarAnimationControllerLinearFade( )
28 { 28 {
29 } 29 }
30 30
31 bool ScrollbarAnimationControllerLinearFade::animate(base::TimeTicks now) 31 bool ScrollbarAnimationControllerLinearFade::animate(base::TimeTicks now)
32 { 32 {
33 float opacity = opacityAtTime(now); 33 float opacity = opacityAtTime(now);
34 m_scrollLayer->setScrollbarOpacity(opacity); 34 m_scrollLayer->SetScrollbarOpacity(opacity);
35 return opacity; 35 return opacity;
36 } 36 }
37 37
38 void ScrollbarAnimationControllerLinearFade::didPinchGestureUpdate(base::TimeTic ks now) 38 void ScrollbarAnimationControllerLinearFade::didPinchGestureUpdate(base::TimeTic ks now)
39 { 39 {
40 m_pinchGestureInEffect = true; 40 m_pinchGestureInEffect = true;
41 } 41 }
42 42
43 void ScrollbarAnimationControllerLinearFade::didPinchGestureEnd(base::TimeTicks now) 43 void ScrollbarAnimationControllerLinearFade::didPinchGestureEnd(base::TimeTicks now)
44 { 44 {
(...skipping 17 matching lines...) Expand all
62 double delta = (now - m_lastAwakenTime).InSecondsF(); 62 double delta = (now - m_lastAwakenTime).InSecondsF();
63 63
64 if (delta <= m_fadeoutDelay) 64 if (delta <= m_fadeoutDelay)
65 return 1; 65 return 1;
66 if (delta < m_fadeoutDelay + m_fadeoutLength) 66 if (delta < m_fadeoutDelay + m_fadeoutLength)
67 return (m_fadeoutDelay + m_fadeoutLength - delta) / m_fadeoutLength; 67 return (m_fadeoutDelay + m_fadeoutLength - delta) / m_fadeoutLength;
68 return 0; 68 return 0;
69 } 69 }
70 70
71 } // namespace cc 71 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler_unittest.cc ('k') | cc/scrollbar_animation_controller_linear_fade_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698