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

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

Issue 492923002: [Android] Consolidate vsync request logic in RWHVAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More cleanup 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 cd502d162ee328dd34ced8427a99d01d2d23f580..c574b1523fff21223cd973be0e48769a56ebb188 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -332,6 +332,13 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
void InternalSwapCompositorFrame(uint32 output_surface_id,
scoped_ptr<cc::CompositorFrame> frame);
+ enum VSyncRequestType {
+ FLUSH_INPUT = 1 << 0,
+ BEGIN_FRAME = 1 << 1,
+ PERSISTENT_BEGIN_FRAME = 1 << 2
+ };
+ void RequestVSyncUpdate(uint32 requests);
+ void SendBeginFrame(base::TimeTicks frame_time, base::TimeDelta vsync_period);
bool Animate(base::TimeTicks frame_time);
void OnContentScrollingChange();
@@ -345,8 +352,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
// The model object.
RenderWidgetHostImpl* host_;
- // Used to track whether this render widget needs a BeginFrame.
- bool needs_begin_frame_;
+ // Used to control action dispatch at the next |OnVSync()| call.
+ uint32 outstanding_vsync_requests_;
bool is_showing_;
@@ -392,8 +399,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

Powered by Google App Engine
This is Rietveld 408576698