Index: content/common/gpu/gpu_command_buffer_stub.cc |
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc |
index 646c5b18fd1832f8329167a517bc57e6e1a151df..b9299627125beaf5317c4ce9844ea4bea436cb18 100644 |
--- a/content/common/gpu/gpu_command_buffer_stub.cc |
+++ b/content/common/gpu/gpu_command_buffer_stub.cc |
@@ -714,14 +714,24 @@ void GpuCommandBufferStub::OnDiscardBackbuffer() { |
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnDiscardBackbuffer"); |
if (!surface_) |
return; |
- surface_->SetBackbufferAllocation(false); |
+ if (surface_->DeferDraws()) { |
+ DCHECK(!IsScheduled()); |
+ channel_->RequeueMessage(); |
+ } else { |
+ surface_->SetBackbufferAllocation(false); |
+ } |
} |
void GpuCommandBufferStub::OnEnsureBackbuffer() { |
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnEnsureBackbuffer"); |
if (!surface_) |
return; |
- surface_->SetBackbufferAllocation(true); |
+ if (surface_->DeferDraws()) { |
+ DCHECK(!IsScheduled()); |
+ channel_->RequeueMessage(); |
+ } else { |
+ surface_->SetBackbufferAllocation(true); |
+ } |
} |
void GpuCommandBufferStub::AddSyncPoint(uint32 sync_point) { |