Commit b0ae2e3f authored by Hayley Ferr's avatar Hayley Ferr Committed by Commit Bot

Histogram for equivalent effective and whitelisted touch actions

Report how often the effective touch action computed by blink is or
is not equivalent to the whitelisted touch action computed by the
compositor.

Bug: 745718
Change-Id: Ieb080bbd6791d8bfaafafd134c2406537000287a
Reviewed-on: https://chromium-review.googlesource.com/575585
Commit-Queue: Hayley Ferr <hayleyferr@chromium.org>
Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatarJesse Doherty <jwd@chromium.org>
Reviewed-by: default avatarXida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488360}
parent e2b6973e
......@@ -277,17 +277,7 @@ void LegacyInputRouterImpl::OnTouchEventAck(
// Reset the touch action at the end of a touch-action sequence.
if (WebTouchEventTraits::IsTouchSequenceEnd(event.event)) {
// Report effective touch action such as kTouchActionNone, kTouchActionPanX,
// etc.
// |touch_action_filter_.allowed_touch_action()| returns the permitted touch
// action (AKA the effective touch action) computed by the renderer.
// Since |cc::kTouchActionAuto| is equivalent to |cc::kTouchActionMax|, we
// must add one to the upper bound to be able to visualize the number of
// times |cc::kTouchActionAuto| is hit.
UMA_HISTOGRAM_ENUMERATION("TouchAction.EffectiveTouchAction",
touch_action_filter_.allowed_touch_action(),
cc::kTouchActionMax + 1);
touch_action_filter_.ResetTouchAction();
touch_action_filter_.ReportAndResetTouchAction();
UpdateTouchAckTimeoutEnabled();
}
}
......
......@@ -174,6 +174,23 @@ void TouchActionFilter::OnSetTouchAction(cc::TouchAction touch_action) {
allowed_touch_action_ &= touch_action;
}
void TouchActionFilter::ReportAndResetTouchAction() {
// Report the effective touch action computed by blink such as
// kTouchActionNone, kTouchActionPanX, etc.
// Since |cc::kTouchActionAuto| is equivalent to |cc::kTouchActionMax|, we
// must add one to the upper bound to be able to visualize the number of
// times |cc::kTouchActionAuto| is hit.
UMA_HISTOGRAM_ENUMERATION("TouchAction.EffectiveTouchAction",
allowed_touch_action_, cc::kTouchActionMax + 1);
// Report how often the effective touch action computed by blink is or is
// not equivalent to the whitelisted touch action computed by the
// compositor.
UMA_HISTOGRAM_BOOLEAN("TouchAction.EquivalentEffectiveAndWhiteListed",
allowed_touch_action_ == white_listed_touch_action_);
ResetTouchAction();
}
void TouchActionFilter::ResetTouchAction() {
// Note that resetting the action mid-sequence is tolerated. Gestures that had
// their begin event(s) suppressed will be suppressed until the next sequence.
......
......@@ -33,6 +33,11 @@ class CONTENT_EXPORT TouchActionFilter {
// for a touch start event that is currently in flight.
void OnSetTouchAction(cc::TouchAction touch_action);
// Called at the end of a touch action sequence in order to log when a
// whitelisted touch action is or is not equivalent to the allowed touch
// action.
void ReportAndResetTouchAction();
// Must be called at least once between when the last gesture events for the
// previous touch sequence have passed through the touch action filter and the
// time the touch start for the next touch sequence has reached the
......
......@@ -11261,6 +11261,11 @@ uploading your change for review. These are checked by presubmit scripts.
<int value="4" label="Automatic kiosk session"/>
</enum>
<enum name="EquivalentEffectiveAndWhiteListed">
<int value="0" label="Different effective and whitelisted touch actions"/>
<int value="1" label="Equivalent effective and whitelisted touch actions"/>
</enum>
<enum name="ErrorCodesGetAdaptersAddresses">
<int value="8" label="ERROR_NOT_ENOUGH_MEMORY"/>
<int value="87" label="ERROR_INVALID_PARAMETER"/>
......@@ -80474,6 +80474,17 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary>
</histogram>
<histogram name="TouchAction.EquivalentEffectiveAndWhiteListed"
enum="EquivalentEffectiveAndWhiteListed">
<owner>hayleyferr@chromium.org</owner>
<owner>xidachen@chromium.org</owner>
<summary>
Tracks how often the effective touch action computed by blink is or is not
equivalent to the whitelisted touch action computed by the compositor at the
end of each touch sequence.
</summary>
</histogram>
<histogram name="TouchAction.GestureEventFiltered"
enum="TouchGestureEventFiltered">
<owner>hayleyferr@chromium.org</owner>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment