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: third_party/WebKit/Source/platform/exported/WebActiveGestureAnimation.cpp

Issue 2908073008: Remove a frame of delay on main-thread FlingStart. [2nd land] (Closed)
Patch Set: Fix pad-gesture-fling properlyy Created 3 years, 7 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
Index: third_party/WebKit/Source/platform/exported/WebActiveGestureAnimation.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebActiveGestureAnimation.cpp b/third_party/WebKit/Source/platform/exported/WebActiveGestureAnimation.cpp
index a149026038ba9d64ea76b3c6598f0226dff8302e..aa3070dc4770677cba78758327d6bf758a03d090 100644
--- a/third_party/WebKit/Source/platform/exported/WebActiveGestureAnimation.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebActiveGestureAnimation.cpp
@@ -32,21 +32,13 @@
namespace blink {
-std::unique_ptr<WebActiveGestureAnimation>
-WebActiveGestureAnimation::CreateAtAnimationStart(
- std::unique_ptr<WebGestureCurve> curve,
- WebGestureCurveTarget* target) {
- return WTF::WrapUnique(
- new WebActiveGestureAnimation(std::move(curve), target, 0, true));
-}
-
std::unique_ptr<WebActiveGestureAnimation>
WebActiveGestureAnimation::CreateWithTimeOffset(
std::unique_ptr<WebGestureCurve> curve,
WebGestureCurveTarget* target,
double start_time) {
- return WTF::WrapUnique(new WebActiveGestureAnimation(std::move(curve), target,
- start_time, false));
+ return WTF::WrapUnique(
+ new WebActiveGestureAnimation(std::move(curve), target, start_time));
}
WebActiveGestureAnimation::~WebActiveGestureAnimation() {}
@@ -54,18 +46,10 @@ WebActiveGestureAnimation::~WebActiveGestureAnimation() {}
WebActiveGestureAnimation::WebActiveGestureAnimation(
std::unique_ptr<WebGestureCurve> curve,
WebGestureCurveTarget* target,
- double start_time,
- bool waiting_for_first_tick)
- : start_time_(start_time),
- waiting_for_first_tick_(waiting_for_first_tick),
- curve_(std::move(curve)),
- target_(target) {}
+ double start_time)
+ : start_time_(start_time), curve_(std::move(curve)), target_(target) {}
bool WebActiveGestureAnimation::Animate(double time) {
- if (waiting_for_first_tick_) {
- start_time_ = time;
- waiting_for_first_tick_ = false;
- }
// All WebGestureCurves assume zero-based time, so we subtract
// the animation start time before passing to the curve.
return curve_->Apply(time - start_time_, target_);
« no previous file with comments | « third_party/WebKit/Source/platform/exported/WebActiveGestureAnimation.h ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698