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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 457913002: Android WebView: flush input events during onVSync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: register observer only for synthetic gestures Created 6 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index dd65887f78db5d47ad01b2adc5b5da168d243a18..46c0427313cf0370f34ae29ab51b92739ccea826 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -811,6 +811,12 @@ void RenderWidgetHostViewAndroid::ShowDisambiguationPopup(
scoped_ptr<SyntheticGestureTarget>
RenderWidgetHostViewAndroid::CreateSyntheticGestureTarget() {
+ DCHECK(content_view_core_);
+ if (using_synchronous_compositor_) {
boliu 2014/08/19 22:54:39 && !observing_root_window_
hush (inactive) 2014/08/19 23:24:36 Done.
+ content_view_core_->GetWindowAndroid()->AddObserver(this);
+ observing_root_window_ = true;
+ }
+
return scoped_ptr<SyntheticGestureTarget>(new SyntheticGestureTargetAndroid(
host_, content_view_core_->CreateTouchEventSynthesizer()));
}
@@ -1529,6 +1535,9 @@ void RenderWidgetHostViewAndroid::OnVSync(base::TimeTicks frame_time,
host_->FlushInput();
}
+ if (using_synchronous_compositor_)
boliu 2014/08/19 22:54:39 Can we also remove this as observer if there are n
hush (inactive) 2014/08/19 23:24:36 I'm not sure you can do that... You can't know if
jdduke (slow) 2014/08/19 23:30:38 |DidFlushInput| will be called when synthetic *eve
boliu 2014/08/19 23:37:47 Never mind then. Maybe SyntheticGestureController
jdduke (slow) 2014/08/19 23:41:33 There are a couple one-off cases where we "kick st
hush (inactive) 2014/08/20 00:16:14 So there are 3 VSync Subscriber Types: input: only
jdduke (slow) 2014/08/20 00:21:33 Yup, that sounds about right. This way we can also
+ return;
+
TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::SendBeginFrame");
base::TimeTicks display_time = frame_time + vsync_period;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698