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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 164643002: [Android] Eliminate JNI hop for critical path gestures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index e98186525cd370eef411ebd0fbfb367776d8e26e..20eb17c8c1b5d5317fe38c91ac17ceba0ef6bb8f 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -619,13 +619,19 @@ void ContentViewCoreImpl::OnGestureEventAck(const blink::WebGestureEvent& event,
case WebInputEvent::GesturePinchEnd:
Java_ContentViewCore_onPinchEndEventAck(env, j_obj.obj());
break;
+ case WebInputEvent::GestureDoubleTap:
+ Java_ContentViewCore_onDoubleTapEventAck(env, j_obj.obj());
+ break;
default:
break;
}
}
bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) {
- if (!WebInputEvent::isGestureEventType(event.type))
+ if (event.type != WebInputEvent::GestureTap &&
+ event.type != WebInputEvent::GestureDoubleTap &&
+ event.type != WebInputEvent::GestureLongTap &&
+ event.type != WebInputEvent::GestureLongPress)
return false;
JNIEnv* env = AttachCurrentThread();
@@ -636,11 +642,11 @@ bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) {
const blink::WebGestureEvent& gesture =
static_cast<const blink::WebGestureEvent&>(event);
int gesture_type = ToContentViewGestureHandlerType(event.type);
- return Java_ContentViewCore_filterGestureEvent(env,
- j_obj.obj(),
- gesture_type,
- gesture.x,
- gesture.y);
+ return Java_ContentViewCore_filterTapOrPressEvent(env,
+ j_obj.obj(),
+ gesture_type,
+ gesture.x,
+ gesture.y);
}
bool ContentViewCoreImpl::HasFocus() {
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698