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 47f8f8db5280b30ee0bea3bddf19f69c99830ccc..e565277f72e1ab7423b24f3e0991b367bcd2b92d 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_android.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc |
@@ -1413,11 +1413,6 @@ void RenderWidgetHostViewAndroid::RequestVSyncUpdate(uint32_t requests) { |
bool should_request_vsync = !outstanding_vsync_requests_ && requests; |
outstanding_vsync_requests_ |= requests; |
- // If the host has been hidden, defer vsync requests until it is shown |
- // again via |Show()|. |
- if (!host_ || host_->is_hidden()) |
- return; |
- |
// Note that if we're not currently observing the root window, outstanding |
// vsync requests will be pushed if/when we resume observing in |
// |StartObservingRootWindow()|. |
@@ -1435,6 +1430,8 @@ void RenderWidgetHostViewAndroid::StartObservingRootWindow() { |
return; |
observing_root_window_ = true; |
+ if (host_) |
+ host_->Send(new ViewMsg_SetBeginFramePaused(host_->GetRoutingID(), false)); |
content_view_core_->GetWindowAndroid()->AddObserver(this); |
// Clear existing vsync requests to allow a request to the new window. |
@@ -1456,6 +1453,8 @@ void RenderWidgetHostViewAndroid::StopObservingRootWindow() { |
is_window_activity_started_ = true; |
is_window_visible_ = true; |
observing_root_window_ = false; |
+ if (host_) |
+ host_->Send(new ViewMsg_SetBeginFramePaused(host_->GetRoutingID(), true)); |
content_view_core_->GetWindowAndroid()->RemoveObserver(this); |
} |
@@ -1874,7 +1873,7 @@ void RenderWidgetHostViewAndroid::OnDetachCompositor() { |
void RenderWidgetHostViewAndroid::OnVSync(base::TimeTicks frame_time, |
base::TimeDelta vsync_period) { |
TRACE_EVENT0("cc,benchmark", "RenderWidgetHostViewAndroid::OnVSync"); |
- if (!host_ || host_->is_hidden()) |
+ if (!host_) |
return; |
if (outstanding_vsync_requests_ & FLUSH_INPUT) { |