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

Unified Diff: content/renderer/input/input_handler_proxy.cc

Issue 206793003: cc: Split animating and drawing into separate actions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix input handler proxy test build. Created 6 years, 8 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 | « cc/trees/thread_proxy.cc ('k') | content/renderer/input/input_handler_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/input/input_handler_proxy.cc
diff --git a/content/renderer/input/input_handler_proxy.cc b/content/renderer/input/input_handler_proxy.cc
index f0d6b6c5b79b19bbd1ef51da77b4528b0354265c..dd54185c438e785d98753a42bae94200e07f02c1 100644
--- a/content/renderer/input/input_handler_proxy.cc
+++ b/content/renderer/input/input_handler_proxy.cc
@@ -330,7 +330,7 @@ InputHandlerProxy::HandleGestureFling(
// Note that the timestamp will only be used to kickstart the animation if
// its sufficiently close to the timestamp of the first call |Animate()|.
has_fling_animation_started_ = false;
- fling_parameters_.startTime = gesture_event.timeStampSeconds;
+ fling_parameters_.startTime = gesture_event.timeStampSeconds;
fling_parameters_.delta =
WebFloatPoint(gesture_event.data.flingStart.velocityX,
gesture_event.data.flingStart.velocityY);
@@ -339,7 +339,7 @@ InputHandlerProxy::HandleGestureFling(
WebPoint(gesture_event.globalX, gesture_event.globalY);
fling_parameters_.modifiers = gesture_event.modifiers;
fling_parameters_.sourceDevice = gesture_event.sourceDevice;
- input_handler_->ScheduleAnimation();
+ input_handler_->SetNeedsAnimate();
return DID_HANDLE;
}
case cc::InputHandler::ScrollUnknown:
@@ -380,14 +380,14 @@ void InputHandlerProxy::Animate(base::TimeTicks time) {
has_fling_animation_started_ = true;
// Guard against invalid, future or sufficiently stale start times, as there
// are no guarantees fling event and animation timestamps are compatible.
- if (!fling_parameters_.startTime ||
+ if (!fling_parameters_.startTime ||
monotonic_time_sec <= fling_parameters_.startTime ||
monotonic_time_sec >= fling_parameters_.startTime +
kMaxSecondsFromFlingTimestampToFirstAnimate) {
- fling_parameters_.startTime = monotonic_time_sec;
- input_handler_->ScheduleAnimation();
- return;
- }
+ fling_parameters_.startTime = monotonic_time_sec;
+ input_handler_->SetNeedsAnimate();
+ return;
+ }
}
bool fling_is_active =
@@ -398,7 +398,7 @@ void InputHandlerProxy::Animate(base::TimeTicks time) {
fling_is_active = false;
if (fling_is_active) {
- input_handler_->ScheduleAnimation();
+ input_handler_->SetNeedsAnimate();
} else {
TRACE_EVENT_INSTANT0("input",
"InputHandlerProxy::animate::flingOver",
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/renderer/input/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698