summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authordominikg@chromium.org <dominikg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-20 17:44:00 +0000
committerdominikg@chromium.org <dominikg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-20 17:44:00 +0000
commite3bd9c4d590ecdb6f7f11c004a878ac3a0ea94b0 (patch)
tree66198fdef60739191ff1d264a2a24b66926dc5c0 /content
parentcb4c966017b7d2511eaf9a39198bd15d36438c2f (diff)
downloadchromium_src-e3bd9c4d590ecdb6f7f11c004a878ac3a0ea94b0.zip
chromium_src-e3bd9c4d590ecdb6f7f11c004a878ac3a0ea94b0.tar.gz
chromium_src-e3bd9c4d590ecdb6f7f11c004a878ac3a0ea94b0.tar.bz2
Telemetry: Ensure a single scroll gesture & measure smoothness during gesture only.
This patch removes the mechanism for doing multiple scroll gestures in scroll.js, because it introduced noise. The number of scrolls could change from one run to the next, depending on whether JS values had been updated in time or not. The patch also adds a trace event that's fired at the beginning and end of a gesture inside the synthetic gesture controller. When computing the GPU rendering stats, only events that happened during the gesture are considered. This improves upon the previous implementation which relied on trace data recorded from JS. This method relies on there only being a single gesture (hence the change above). BUG=265901 Review URL: https://chromiumcodereview.appspot.com/23532057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224422 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/synthetic_gesture_controller.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/browser/renderer_host/synthetic_gesture_controller.cc b/content/browser/renderer_host/synthetic_gesture_controller.cc
index d066f0f..46c4329 100644
--- a/content/browser/renderer_host/synthetic_gesture_controller.cc
+++ b/content/browser/renderer_host/synthetic_gesture_controller.cc
@@ -40,6 +40,8 @@ void SyntheticGestureController::BeginSmoothScroll(
params.mouse_event_x,
params.mouse_event_y);
+ TRACE_EVENT_ASYNC_BEGIN0("benchmark", "SyntheticGestureController::running",
+ pending_synthetic_gesture_);
timer_.Start(FROM_HERE, GetSyntheticGestureMessageInterval(), this,
&SyntheticGestureController::OnTimer);
}
@@ -57,6 +59,8 @@ void SyntheticGestureController::BeginPinch(
params.anchor_x,
params.anchor_y);
+ TRACE_EVENT_ASYNC_BEGIN0("benchmark", "SyntheticGestureController::running",
+ pending_synthetic_gesture_);
timer_.Start(FROM_HERE, GetSyntheticGestureMessageInterval(), this,
&SyntheticGestureController::OnTimer);
}
@@ -70,6 +74,8 @@ void SyntheticGestureController::OnTimer() {
base::TimeTicks now = base::TimeTicks::Now();
if (!pending_synthetic_gesture_->ForwardInputEvents(now, rwh_)) {
timer_.Stop();
+ TRACE_EVENT_ASYNC_END0("benchmark", "SyntheticGestureController::running",
+ pending_synthetic_gesture_);
pending_synthetic_gesture_ = NULL;
rwh_->Send(new ViewMsg_SyntheticGestureCompleted(rwh_->GetRoutingID()));
}