Index: content/browser/renderer_host/compositor_impl_android.cc |
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc |
index 3f2ee6408a78d205be1a704ae2ae865a8493fa8a..e618c200388f3767db73d1af8682e4419ffb7e69 100644 |
--- a/content/browser/renderer_host/compositor_impl_android.cc |
+++ b/content/browser/renderer_host/compositor_impl_android.cc |
@@ -94,10 +94,16 @@ class OutputSurfaceWithoutParent : public cc::OutputSurface, |
void SwapBuffers(cc::CompositorFrame* frame) override { |
GetCommandBufferProxy()->SetLatencyInfo(frame->metadata.latency_info); |
- DCHECK(frame->gl_frame_data->sub_buffer_rect == |
- gfx::Rect(frame->gl_frame_data->size)); |
- context_provider_->ContextSupport()->Swap(); |
- client_->DidSwapBuffers(); |
+ // Partial swap is not supported, so if the |sub_buffer_rect| is non-empty |
+ // swap the whole buffer. Otherwise, there is no damage, so don't |
+ // swap at all. |
+ if (!frame->gl_frame_data->sub_buffer_rect.IsEmpty()) { |
+ context_provider_->ContextSupport()->Swap(); |
+ client_->DidSwapBuffers(); |
+ } else { |
+ client_->DidSwapBuffers(); |
+ OutputSurface::OnSwapBuffersComplete(); |
+ } |
} |
bool BindToClient(cc::OutputSurfaceClient* client) override { |