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

Side by Side Diff: ui/events/gesture_detection/gesture_event_data_packet.cc

Issue 2869823003: [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: Use seperate bool for set_non_blocking Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/gesture_detection/gesture_event_data_packet.h" 5 #include "ui/events/gesture_detection/gesture_event_data_packet.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/events/gesture_detection/motion_event.h" 8 #include "ui/events/gesture_detection/motion_event.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 GestureEventDataPacket GestureEventDataPacket::FromTouchTimeout( 104 GestureEventDataPacket GestureEventDataPacket::FromTouchTimeout(
105 const GestureEventData& gesture) { 105 const GestureEventData& gesture) {
106 GestureEventDataPacket packet(gesture.time, TOUCH_TIMEOUT, 106 GestureEventDataPacket packet(gesture.time, TOUCH_TIMEOUT,
107 gfx::PointF(gesture.x, gesture.y), 107 gfx::PointF(gesture.x, gesture.y),
108 gfx::PointF(gesture.raw_x, gesture.raw_y), 108 gfx::PointF(gesture.raw_x, gesture.raw_y),
109 gesture.unique_touch_event_id); 109 gesture.unique_touch_event_id);
110 packet.Push(gesture); 110 packet.Push(gesture);
111 return packet; 111 return packet;
112 } 112 }
113 113
114 void GestureEventDataPacket::Ack(bool event_consumed) { 114 void GestureEventDataPacket::Ack(bool event_consumed,
115 bool is_source_touch_event_set_non_blocking) {
115 DCHECK_EQ(static_cast<int>(ack_state_), static_cast<int>(AckState::PENDING)); 116 DCHECK_EQ(static_cast<int>(ack_state_), static_cast<int>(AckState::PENDING));
116 ack_state_ = event_consumed ? AckState::CONSUMED : AckState::UNCONSUMED; 117 ack_state_ = event_consumed ? AckState::CONSUMED : AckState::UNCONSUMED;
118 for (auto& gesture : gestures_.container())
sadrul 2017/06/08 20:31:48 Add {}
chongz 2017/06/09 14:51:44 Done.
119 gesture.details.set_is_source_touch_event_set_non_blocking(
120 is_source_touch_event_set_non_blocking);
117 } 121 }
118 122
119 } // namespace ui 123 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698