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

Side by Side Diff: cc/blink/web_scroll_offset_animation_curve_impl.cc

Issue 719453007: Make Keyframe use TimeTicks/TimeDelta to represent time instead of double. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/blink/web_scroll_offset_animation_curve_impl.h" 5 #include "cc/blink/web_scroll_offset_animation_curve_impl.h"
6 6
7 #include "cc/animation/scroll_offset_animation_curve.h" 7 #include "cc/animation/scroll_offset_animation_curve.h"
8 #include "cc/animation/timing_function.h" 8 #include "cc/animation/timing_function.h"
9 #include "cc/blink/web_animation_curve_common.h" 9 #include "cc/blink/web_animation_curve_common.h"
10 10
(...skipping 16 matching lines...) Expand all
27 WebScrollOffsetAnimationCurveImpl::type() const { 27 WebScrollOffsetAnimationCurveImpl::type() const {
28 return WebCompositorAnimationCurve::AnimationCurveTypeScrollOffset; 28 return WebCompositorAnimationCurve::AnimationCurveTypeScrollOffset;
29 } 29 }
30 30
31 void WebScrollOffsetAnimationCurveImpl::setInitialValue( 31 void WebScrollOffsetAnimationCurveImpl::setInitialValue(
32 WebFloatPoint initial_value) { 32 WebFloatPoint initial_value) {
33 curve_->SetInitialValue(gfx::ScrollOffset(initial_value.x, initial_value.y)); 33 curve_->SetInitialValue(gfx::ScrollOffset(initial_value.x, initial_value.y));
34 } 34 }
35 35
36 WebFloatPoint WebScrollOffsetAnimationCurveImpl::getValue(double time) const { 36 WebFloatPoint WebScrollOffsetAnimationCurveImpl::getValue(double time) const {
37 gfx::ScrollOffset value = curve_->GetValue(time); 37 gfx::ScrollOffset value =
38 curve_->GetValue(base::TimeDelta::FromSecondsD(time));
38 return WebFloatPoint(value.x(), value.y()); 39 return WebFloatPoint(value.x(), value.y());
39 } 40 }
40 41
41 double WebScrollOffsetAnimationCurveImpl::duration() const { 42 double WebScrollOffsetAnimationCurveImpl::duration() const {
42 return curve_->Duration().InSecondsF(); 43 return curve_->Duration().InSecondsF();
43 } 44 }
44 45
45 scoped_ptr<cc::AnimationCurve> 46 scoped_ptr<cc::AnimationCurve>
46 WebScrollOffsetAnimationCurveImpl::CloneToAnimationCurve() const { 47 WebScrollOffsetAnimationCurveImpl::CloneToAnimationCurve() const {
47 return curve_->Clone(); 48 return curve_->Clone();
48 } 49 }
49 50
50 } // namespace cc_blink 51 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_float_animation_curve_impl.cc ('k') | cc/blink/web_transform_animation_curve_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698