Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc |
| index df2e948b3b5f88f012eba529579ded3e71a8c202..17cc7263bcf6b121b7b624e05164af9dd23689b8 100644 |
| --- a/content/browser/renderer_host/render_widget_host_impl.cc |
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc |
| @@ -787,6 +787,12 @@ void RenderWidgetHostImpl::PaintAtSize(TransportDIB::Handle dib_handle, |
| page_size, desired_size)); |
| } |
| +void RenderWidgetHostImpl::SetAboutToWaitForBackingStoreCallback( |
| + const base::Closure& about_to_wait_for_backing_store_callback) { |
| + about_to_wait_for_backing_store_callback_ = |
| + about_to_wait_for_backing_store_callback; |
| +} |
| + |
| bool RenderWidgetHostImpl::TryGetBackingStore(const gfx::Size& desired_size, |
| BackingStore** backing_store) { |
| // Check if the view has an accelerated surface of the desired size. |
| @@ -856,6 +862,11 @@ BackingStore* RenderWidgetHostImpl::GetBackingStore(bool force_create) { |
| do { |
| TRACE_EVENT0("renderer_host", "GetBackingStore::WaitForUpdate"); |
| + // Release any backpressure preventing the renderer from generating new |
| + // frames. |
| + if (!about_to_wait_for_backing_store_callback_.is_null()) |
| + about_to_wait_for_backing_store_callback_.Run(); |
|
ccameron
2014/02/14 02:19:06
The call that we need it before is this guy. It's
piman
2014/02/14 02:59:02
RWHVMac could send the ack right away when receivi
|
| + |
| // When we have asked the RenderWidget to resize, and we are still waiting |
| // on a response, block for a little while to see if we can't get a response |
| // before returning the old (incorrectly sized) backing store. |