Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 11316238: gpu: don't try to discard/recreate backbuffer while draws are deferred. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reset currently_processing_message_ in RequeueMessage Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/texture_image_transport_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/texture_image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698