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 c31e167d8a778b2e8e277465f9e16964b5052d1b..9cc4f8497c5698ce9bc7f4fd319337ff3489e0b7 100644 |
--- a/content/common/gpu/gpu_command_buffer_stub.cc |
+++ b/content/common/gpu/gpu_command_buffer_stub.cc |
@@ -205,7 +205,6 @@ GpuCommandBufferStub::GpuCommandBufferStub( |
route_id_(route_id), |
offscreen_(offscreen), |
last_flush_count_(0), |
- last_memory_allocation_valid_(false), |
watchdog_(watchdog), |
waiting_for_sync_point_(false), |
previous_processed_num_(0), |
@@ -278,9 +277,7 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) { |
message.type() != GpuCommandBufferMsg_RegisterTransferBuffer::ID && |
message.type() != GpuCommandBufferMsg_DestroyTransferBuffer::ID && |
message.type() != GpuCommandBufferMsg_RetireSyncPoint::ID && |
- message.type() != GpuCommandBufferMsg_SignalSyncPoint::ID && |
- message.type() != |
- GpuCommandBufferMsg_SetClientHasMemoryAllocationChangedCallback::ID) { |
+ message.type() != GpuCommandBufferMsg_SignalSyncPoint::ID) { |
if (!MakeCurrent()) |
return false; |
have_context = true; |
@@ -317,9 +314,6 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) { |
OnSignalSyncPoint) |
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalQuery, |
OnSignalQuery) |
- IPC_MESSAGE_HANDLER( |
- GpuCommandBufferMsg_SetClientHasMemoryAllocationChangedCallback, |
- OnSetClientHasMemoryAllocationChangedCallback) |
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_CreateImage, OnCreateImage); |
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyImage, OnDestroyImage); |
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_CreateStreamTexture, |
@@ -477,8 +471,6 @@ void GpuCommandBufferStub::Destroy() { |
} |
} |
- memory_manager_client_state_.reset(); |
- |
while (!sync_points_.empty()) |
OnRetireSyncPoint(sync_points_.front()); |
@@ -924,10 +916,9 @@ void GpuCommandBufferStub::OnCreateVideoEncoder( |
// self-delete during destruction of this stub. |
} |
+// TODO(sohanjg): cleanup this and the client side too. |
void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { |
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetSurfaceVisible"); |
- if (memory_manager_client_state_) |
- memory_manager_client_state_->SetVisible(visible); |
} |
void GpuCommandBufferStub::AddSyncPoint(uint32 sync_point, bool retire) { |
@@ -1022,22 +1013,6 @@ void GpuCommandBufferStub::OnSignalQuery(uint32 query_id, uint32 id) { |
OnSignalSyncPointAck(id); |
} |
- |
-void GpuCommandBufferStub::OnSetClientHasMemoryAllocationChangedCallback( |
- bool has_callback) { |
- TRACE_EVENT0( |
- "gpu", |
- "GpuCommandBufferStub::OnSetClientHasMemoryAllocationChangedCallback"); |
- if (has_callback) { |
- if (!memory_manager_client_state_) { |
- memory_manager_client_state_.reset( |
- GetMemoryManager()->CreateClientState(this, !offscreen_, true)); |
- } |
- } else { |
- memory_manager_client_state_.reset(); |
- } |
-} |
- |
void GpuCommandBufferStub::OnCreateImage(int32 id, |
gfx::GpuMemoryBufferHandle handle, |
gfx::Size size, |
@@ -1143,18 +1118,6 @@ gpu::gles2::MemoryTracker* GpuCommandBufferStub::GetMemoryTracker() const { |
return context_group_->memory_tracker(); |
} |
-void GpuCommandBufferStub::SetMemoryAllocation( |
- const gpu::MemoryAllocation& allocation) { |
- if (!last_memory_allocation_valid_ || |
- !allocation.Equals(last_memory_allocation_)) { |
- Send(new GpuCommandBufferMsg_SetMemoryAllocation( |
- route_id_, allocation)); |
- } |
- |
- last_memory_allocation_valid_ = true; |
- last_memory_allocation_ = allocation; |
-} |
- |
void GpuCommandBufferStub::SuggestHaveFrontBuffer( |
bool suggest_have_frontbuffer) { |
// This can be called outside of OnMessageReceived, so the context needs |