Commit e8eea72e authored by Xida Chen's avatar Xida Chen Committed by Commit Bot

[Debugging] Add InputEventAckState to the debug string for TouchAction

Right now in InputRouterImpl::OnTouchEventAck, we append a "T" to the
debug string in TouchActionFilter when the touch event is a touch
sequence start and that the input event ack state is NO_CONSUMER_EXISTS.

This CL make changes to append the input event ack state to the debug
string. The reason is that all the current crashes seems to be the case
that is not acked from the main thread, but we do not know the ack state
yet.

Bug: 851644
Change-Id: Ia57de7aa2c63e104008893dc8809a5eac679460d
Reviewed-on: https://chromium-review.googlesource.com/1219781
Commit-Queue: Xida Chen <xidachen@chromium.org>
Reviewed-by: default avatarNavid Zolghadr <nzolghadr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590415}
parent ba8d5783
...@@ -336,12 +336,14 @@ void InputRouterImpl::OnTouchEventAck(const TouchEventWithLatencyInfo& event, ...@@ -336,12 +336,14 @@ void InputRouterImpl::OnTouchEventAck(const TouchEventWithLatencyInfo& event,
InputEventAckSource ack_source, InputEventAckSource ack_source,
InputEventAckState ack_result) { InputEventAckState ack_result) {
if (WebTouchEventTraits::IsTouchSequenceStart(event.event)) { if (WebTouchEventTraits::IsTouchSequenceStart(event.event)) {
touch_action_filter_.AppendToGestureSequenceForDebugging("T");
touch_action_filter_.AppendToGestureSequenceForDebugging(
std::to_string(ack_result).c_str());
touch_action_filter_.IncreaseActiveTouches(); touch_action_filter_.IncreaseActiveTouches();
// Touchstart events sent to the renderer indicate a new touch sequence, but // Touchstart events sent to the renderer indicate a new touch sequence, but
// in some cases we may filter out sending the touchstart - catch those // in some cases we may filter out sending the touchstart - catch those
// here. // here.
if (ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS) { if (ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS) {
touch_action_filter_.AppendToGestureSequenceForDebugging("T");
// Touch action must be auto when there is no consumer // Touch action must be auto when there is no consumer
touch_action_filter_.OnSetTouchAction(cc::kTouchActionAuto); touch_action_filter_.OnSetTouchAction(cc::kTouchActionAuto);
UpdateTouchAckTimeoutEnabled(); UpdateTouchAckTimeoutEnabled();
......
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