| Index: content/common/gpu/client/command_buffer_proxy_impl.cc
|
| diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc
|
| index ec473f3295f74957a3d246df20e1deb84d09908e..03766181c677c08733674534e934f285a0224398 100644
|
| --- a/content/common/gpu/client/command_buffer_proxy_impl.cc
|
| +++ b/content/common/gpu/client/command_buffer_proxy_impl.cc
|
| @@ -25,13 +25,13 @@
|
|
|
| namespace content {
|
|
|
| -CommandBufferProxyImpl::CommandBufferProxyImpl(
|
| - GpuChannelHost* channel,
|
| - int route_id)
|
| +CommandBufferProxyImpl::CommandBufferProxyImpl(GpuChannelHost* channel,
|
| + int route_id)
|
| : channel_(channel),
|
| route_id_(route_id),
|
| flush_count_(0),
|
| last_put_offset_(-1),
|
| + last_shallow_put_offset_(-1),
|
| next_signal_id_(0) {
|
| }
|
|
|
| @@ -183,11 +183,30 @@ void CommandBufferProxyImpl::Flush(int32 put_offset) {
|
| return;
|
|
|
| last_put_offset_ = put_offset;
|
| + last_shallow_put_offset_ = put_offset;
|
| +
|
| + if (channel_)
|
| + channel_->Flush(route_id_, put_offset, ++flush_count_, latency_info_,
|
| + false);
|
| +
|
| + latency_info_.clear();
|
| +}
|
| +
|
| +void CommandBufferProxyImpl::ShallowFlush(int32 put_offset) {
|
| + if (last_state_.error != gpu::error::kNoError)
|
| + return;
|
| +
|
| + TRACE_EVENT1("gpu", "CommandBufferProxyImpl::ShallowFlush", "put_offset",
|
| + put_offset);
|
| +
|
| + if (last_shallow_put_offset_ == put_offset)
|
| + return;
|
| +
|
| + last_shallow_put_offset_ = put_offset;
|
| +
|
| + if (channel_)
|
| + channel_->Flush(route_id_, put_offset, ++flush_count_, latency_info_, true);
|
|
|
| - Send(new GpuCommandBufferMsg_AsyncFlush(route_id_,
|
| - put_offset,
|
| - ++flush_count_,
|
| - latency_info_));
|
| latency_info_.clear();
|
| }
|
|
|
|
|