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

Side by Side Diff: ui/events/blink/blink_event_util.cc

Issue 2869823003: [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: dtapuska's comment: Use ack to determine blocking vs. non-blocking Created 3 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // MSVC++ requires this to be set before any other includes to get M_PI. 5 // MSVC++ requires this to be set before any other includes to get M_PI.
6 #define _USE_MATH_DEFINES 6 #define _USE_MATH_DEFINES
7 7
8 #include "ui/events/blink/blink_event_util.h" 8 #include "ui/events/blink/blink_event_util.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 break; 620 break;
621 case GestureDeviceType::DEVICE_TOUCHPAD: 621 case GestureDeviceType::DEVICE_TOUCHPAD:
622 gesture.source_device = blink::kWebGestureDeviceTouchpad; 622 gesture.source_device = blink::kWebGestureDeviceTouchpad;
623 break; 623 break;
624 case GestureDeviceType::DEVICE_UNKNOWN: 624 case GestureDeviceType::DEVICE_UNKNOWN:
625 NOTREACHED() << "Unknown device type is not allowed"; 625 NOTREACHED() << "Unknown device type is not allowed";
626 gesture.source_device = blink::kWebGestureDeviceUninitialized; 626 gesture.source_device = blink::kWebGestureDeviceUninitialized;
627 break; 627 break;
628 } 628 }
629 629
630 switch (details.source_touch_event_result()) {
631 case ER_IGNORED_NON_BLOCKING:
632 gesture.source_touch_event_dispatch_type =
633 WebInputEvent::DispatchType::kEventNonBlocking;
634 break;
635 default:
636 gesture.source_touch_event_dispatch_type =
637 WebInputEvent::DispatchType::kBlocking;
638 break;
639 }
640
630 gesture.unique_touch_event_id = unique_touch_event_id; 641 gesture.unique_touch_event_id = unique_touch_event_id;
631 642
632 switch (details.type()) { 643 switch (details.type()) {
633 case ET_GESTURE_SHOW_PRESS: 644 case ET_GESTURE_SHOW_PRESS:
634 gesture.SetType(WebInputEvent::kGestureShowPress); 645 gesture.SetType(WebInputEvent::kGestureShowPress);
635 gesture.data.show_press.width = details.bounding_box_f().width(); 646 gesture.data.show_press.width = details.bounding_box_f().width();
636 gesture.data.show_press.height = details.bounding_box_f().height(); 647 gesture.data.show_press.height = details.bounding_box_f().height();
637 break; 648 break;
638 case ET_GESTURE_DOUBLE_TAP: 649 case ET_GESTURE_DOUBLE_TAP:
639 gesture.SetType(WebInputEvent::kGestureDoubleTap); 650 gesture.SetType(WebInputEvent::kGestureDoubleTap);
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 switch (type) { 995 switch (type) {
985 case blink::WebGestureEvent::kGestureScrollUpdate: 996 case blink::WebGestureEvent::kGestureScrollUpdate:
986 case blink::WebGestureEvent::kGesturePinchUpdate: 997 case blink::WebGestureEvent::kGesturePinchUpdate:
987 return true; 998 return true;
988 default: 999 default:
989 return false; 1000 return false;
990 } 1001 }
991 } 1002 }
992 1003
993 } // namespace ui 1004 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698