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

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

Issue 457913002: Android WebView: flush input events during onVSync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixups 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
Index: content/browser/renderer_host/render_widget_host_view_android.h
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index 91f9d483731a958e316bb66a69f8ccea1c5f0e67..6190d5f7435e1758053a33e3ad7f6f06d7484b05 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -247,6 +247,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
const TextSurroundingSelectionCallback& callback);
private:
+ enum VSyncSubscriberType { INPUT = 1 << 0, BEGIN_FRAME = 1 << 1 };
boliu 2014/08/20 20:30:00 nit: separate lines (unless this is what clang-for
+
// TouchSelectionControllerClient implementation.
virtual bool SupportsAnimation() const OVERRIDE;
virtual void SetNeedsAnimate() OVERRIDE;
@@ -317,12 +319,14 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
float GetDpiScale() const;
+ // type is a bit field containing one or more VSyncSubscriberType.
+ void SubscribeToVSync(uint32 type);
+ void UnsubscribeToVSync(uint32 type);
+ bool IsSubscribedToType(uint32 type);
+
// The model object.
RenderWidgetHostImpl* host_;
- // Used to track whether this render widget needs a BeginFrame.
- bool needs_begin_frame_;
-
bool is_showing_;
// ContentViewCoreImpl is our interface to the view system.
@@ -370,8 +374,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
bool touch_scrolling_;
size_t potentially_active_fling_count_;
- bool flush_input_requested_;
-
int accelerated_surface_route_id_;
// Size to use if we have no backing ContentViewCore
@@ -379,10 +381,13 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
const bool using_synchronous_compositor_;
+ // Used to track how VSync should be dispatched. For example, if this bit
+ // mask has BEGIN_FRAME bit on, a new frame will be requested during OnVSync.
+ uint32 vsync_subscribers_bitmask_;
+
scoped_ptr<DelegatedFrameEvictor> frame_evictor_;
size_t locks_on_frame_count_;
- bool observing_root_window_;
struct LastFrameInfo {
LastFrameInfo(uint32 output_id,

Powered by Google App Engine
This is Rietveld 408576698