OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/common/gpu/client/command_buffer_proxy_impl.h" | 5 #include "content/common/gpu/client/command_buffer_proxy_impl.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 int32 CommandBufferProxyImpl::GetLastToken() { | 188 int32 CommandBufferProxyImpl::GetLastToken() { |
189 TryUpdateState(); | 189 TryUpdateState(); |
190 return last_state_.token; | 190 return last_state_.token; |
191 } | 191 } |
192 | 192 |
193 void CommandBufferProxyImpl::Flush(int32 put_offset) { | 193 void CommandBufferProxyImpl::Flush(int32 put_offset) { |
194 if (last_state_.error != gpu::error::kNoError) | 194 if (last_state_.error != gpu::error::kNoError) |
195 return; | 195 return; |
196 | 196 |
197 TRACE_EVENT1("gpu", | 197 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("gpu.debug"), |
198 "CommandBufferProxyImpl::Flush", | 198 "CommandBufferProxyImpl::Flush", |
199 "put_offset", | 199 "put_offset", |
200 put_offset); | 200 put_offset); |
201 | 201 |
202 if (last_put_offset_ == put_offset) | 202 if (last_put_offset_ == put_offset) |
203 return; | 203 return; |
204 | 204 |
205 last_put_offset_ = put_offset; | 205 last_put_offset_ = put_offset; |
206 | 206 |
207 Send(new GpuCommandBufferMsg_AsyncFlush(route_id_, | 207 Send(new GpuCommandBufferMsg_AsyncFlush(route_id_, |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 void CommandBufferProxyImpl::SendManagedMemoryStats( | 558 void CommandBufferProxyImpl::SendManagedMemoryStats( |
559 const GpuManagedMemoryStats& stats) { | 559 const GpuManagedMemoryStats& stats) { |
560 if (last_state_.error != gpu::error::kNoError) | 560 if (last_state_.error != gpu::error::kNoError) |
561 return; | 561 return; |
562 | 562 |
563 Send(new GpuCommandBufferMsg_SendClientManagedMemoryStats(route_id_, | 563 Send(new GpuCommandBufferMsg_SendClientManagedMemoryStats(route_id_, |
564 stats)); | 564 stats)); |
565 } | 565 } |
566 | 566 |
567 } // namespace content | 567 } // namespace content |
OLD | NEW |