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

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

Issue 9702081: Splitting GpuMemoryAllocation into two parts: for renderer and browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding unittests for GpuMemoryAllocation comparison functions since they have become not as trivial. Created 8 years, 9 months 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_command_buffer_stub.h ('k') | content/common/gpu/gpu_memory_allocation.h » ('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 96ca0ea68ab85ff030ddaac2a1a4a1494614602e..f277eca2fc88ff84c1fe1e7e190cbf5de8d379fc 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -623,12 +623,14 @@ void GpuCommandBufferStub::SetMemoryAllocation(
SendMemoryAllocationToProxy(allocation);
+ DCHECK(surface_);
+
if (!surface_)
return;
- if (allocation.has_frontbuffer && allocation.has_backbuffer)
+ if (allocation.suggest_have_frontbuffer && allocation.suggest_have_backbuffer)
surface_->SetBufferAllocation(
gfx::GLSurface::BUFFER_ALLOCATION_FRONT_AND_BACK);
- else if (allocation.has_frontbuffer)
+ else if (allocation.suggest_have_frontbuffer)
surface_->SetBufferAllocation(
gfx::GLSurface::BUFFER_ALLOCATION_FRONT_ONLY);
else
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_memory_allocation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698