Index: content/common/gpu/client/command_buffer_proxy.cc |
diff --git a/content/common/gpu/client/command_buffer_proxy.cc b/content/common/gpu/client/command_buffer_proxy.cc |
index 25bee42417b3d7f4611dc7f458b14dd4a388895b..d4e1121a0bdd33baf78ccc8a605afd9c37e84269 100644 |
--- a/content/common/gpu/client/command_buffer_proxy.cc |
+++ b/content/common/gpu/client/command_buffer_proxy.cc |
@@ -98,14 +98,20 @@ void CommandBufferProxy::OnConsoleMessage( |
} |
void CommandBufferProxy::SetMemoryAllocationChangedCallback( |
- const base::Callback<void(const GpuMemoryAllocation&)>& callback) { |
+ const base::Callback<void(const GpuMemoryAllocationForRenderer&)>& |
+ callback) { |
memory_allocation_changed_callback_ = callback; |
} |
void CommandBufferProxy::OnSetMemoryAllocation( |
- const GpuMemoryAllocation& allocation) { |
+ const GpuMemoryAllocationForRenderer& allocation) { |
if (!memory_allocation_changed_callback_.is_null()) |
memory_allocation_changed_callback_.Run(allocation); |
+ |
+ if (allocation.suggest_have_backbuffer) |
mmocny
2012/03/15 19:11:43
Send right away for now, but should be done via Gr
|
+ Send(new GpuCommandBufferMsg_CreateBackbuffer(route_id_)); |
+ else |
+ Send(new GpuCommandBufferMsg_DestroyBackbuffer(route_id_)); |
} |
void CommandBufferProxy::SetChannelErrorCallback( |
@@ -363,7 +369,13 @@ bool CommandBufferProxy::SetSurfaceVisible(bool visible) { |
if (last_state_.error != gpu::error::kNoError) |
return false; |
- return Send(new GpuCommandBufferMsg_SetSurfaceVisible(route_id_, visible)); |
+ bool ret = Send(new GpuCommandBufferMsg_SetSurfaceVisible( |
+ route_id_, visible)); |
+ if (visible) |
+ Send(new GpuCommandBufferMsg_CreateBackbuffer(route_id_)); |
+ else |
+ Send(new GpuCommandBufferMsg_DestroyBackbuffer(route_id_)); |
+ return ret; |
} |
bool CommandBufferProxy::SetParent(CommandBufferProxy* parent_command_buffer, |