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 f195c8fdbe3dd1e5cf6c7da18d9b5d112698ae97..366169f98b5b9ac52447d057f5de97457fcb4308 100644 |
--- a/content/common/gpu/client/command_buffer_proxy.cc |
+++ b/content/common/gpu/client/command_buffer_proxy.cc |
@@ -28,7 +28,8 @@ CommandBufferProxy::CommandBufferProxy( |
int route_id) |
: channel_(channel), |
route_id_(route_id), |
- flush_count_(0) { |
+ flush_count_(0), |
+ last_put_offset_(-1) { |
} |
CommandBufferProxy::~CommandBufferProxy() { |
@@ -172,6 +173,11 @@ void CommandBufferProxy::Flush(int32 put_offset) { |
TRACE_EVENT1("gpu", "CommandBufferProxy::Flush", "put_offset", put_offset); |
+ if (last_put_offset_ == put_offset) |
+ return; |
+ |
+ last_put_offset_ = put_offset; |
+ |
Send(new GpuCommandBufferMsg_AsyncFlush(route_id_, |
put_offset, |
++flush_count_)); |
@@ -202,6 +208,7 @@ void CommandBufferProxy::SetGetBuffer(int32 shm_id) { |
return; |
Send(new GpuCommandBufferMsg_SetGetBuffer(route_id_, shm_id)); |
+ last_put_offset_ = -1; |
} |
void CommandBufferProxy::SetGetOffset(int32 get_offset) { |