Chromium Code Reviews| Index: content/renderer/android/synchronous_compositor_output_surface.cc |
| diff --git a/content/renderer/android/synchronous_compositor_output_surface.cc b/content/renderer/android/synchronous_compositor_output_surface.cc |
| index d42d3de65465ee231350c2fd9707443b45a3fe9b..2d3b60921979154b2e7d7247a727c13ee04c2512 100644 |
| --- a/content/renderer/android/synchronous_compositor_output_surface.cc |
| +++ b/content/renderer/android/synchronous_compositor_output_surface.cc |
| @@ -197,6 +197,17 @@ void SynchronousCompositorOutputSurface::SwapBuffers( |
| DCHECK(CalledOnValidThread()); |
| DCHECK(sync_client_); |
| + client_->DidSwapBuffers(); |
|
boliu
2016/07/07 21:30:31
sync_client_->SwapBuffers sends the reply of the s
|
| + |
| + if (fallback_tick_running_) { |
| + client_->DidSwapBuffersComplete(); |
| + cc::ReturnedResourceArray return_resources; |
| + cc::TransferableResource::ReturnResources( |
| + frame.delegated_frame_data->resource_list, &return_resources); |
| + ReturnResources(return_resources); |
|
boliu
2016/07/07 21:30:31
again, can we skip this and just DCHECK there are
danakj
2016/07/07 22:08:34
DCHECKing empty, but still sending back the ack to
|
| + return; |
| + } |
| + |
| cc::CompositorFrame swap_frame; |
| if (in_software_draw_) { |
| @@ -220,14 +231,13 @@ void SynchronousCompositorOutputSurface::SwapBuffers( |
| delegated_surface_id_, std::move(frame), base::Bind(&NoOpDrawCallback)); |
| display_->DrawAndSwap(); |
| } else { |
| + // For hardware draws we send the whole frame to the client so it can draw |
| + // the content in it. |
| swap_frame = std::move(frame); |
| } |
| - if (!fallback_tick_running_) { |
| - sync_client_->SwapBuffers(output_surface_id_, std::move(swap_frame)); |
| - DeliverMessages(); |
| - } |
| - client_->DidSwapBuffers(); |
| + sync_client_->SwapBuffers(output_surface_id_, std::move(swap_frame)); |
| + DeliverMessages(); |
| did_swap_ = true; |
| } |