| 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/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 | 391 |
| 392 return Send(new GpuCommandBufferMsg_EnsureBackbuffer(route_id_)); | 392 return Send(new GpuCommandBufferMsg_EnsureBackbuffer(route_id_)); |
| 393 } | 393 } |
| 394 | 394 |
| 395 uint32 CommandBufferProxyImpl::InsertSyncPoint() { | 395 uint32 CommandBufferProxyImpl::InsertSyncPoint() { |
| 396 uint32 sync_point = 0; | 396 uint32 sync_point = 0; |
| 397 Send(new GpuCommandBufferMsg_InsertSyncPoint(route_id_, &sync_point)); | 397 Send(new GpuCommandBufferMsg_InsertSyncPoint(route_id_, &sync_point)); |
| 398 return sync_point; | 398 return sync_point; |
| 399 } | 399 } |
| 400 | 400 |
| 401 void CommandBufferProxyImpl::WaitSyncPoint(uint32 sync_point) { | |
| 402 Send(new GpuCommandBufferMsg_WaitSyncPoint(route_id_, sync_point)); | |
| 403 } | |
| 404 | |
| 405 bool CommandBufferProxyImpl::SignalSyncPoint(uint32 sync_point, | 401 bool CommandBufferProxyImpl::SignalSyncPoint(uint32 sync_point, |
| 406 const base::Closure& callback) { | 402 const base::Closure& callback) { |
| 407 if (last_state_.error != gpu::error::kNoError) { | 403 if (last_state_.error != gpu::error::kNoError) { |
| 408 return false; | 404 return false; |
| 409 } | 405 } |
| 410 | 406 |
| 411 uint32 signal_id = next_signal_id_++; | 407 uint32 signal_id = next_signal_id_++; |
| 412 if (!Send(new GpuCommandBufferMsg_SignalSyncPoint(route_id_, | 408 if (!Send(new GpuCommandBufferMsg_SignalSyncPoint(route_id_, |
| 413 sync_point, | 409 sync_point, |
| 414 signal_id))) { | 410 signal_id))) { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 void CommandBufferProxyImpl::SendManagedMemoryStats( | 525 void CommandBufferProxyImpl::SendManagedMemoryStats( |
| 530 const GpuManagedMemoryStats& stats) { | 526 const GpuManagedMemoryStats& stats) { |
| 531 if (last_state_.error != gpu::error::kNoError) | 527 if (last_state_.error != gpu::error::kNoError) |
| 532 return; | 528 return; |
| 533 | 529 |
| 534 Send(new GpuCommandBufferMsg_SendClientManagedMemoryStats(route_id_, | 530 Send(new GpuCommandBufferMsg_SendClientManagedMemoryStats(route_id_, |
| 535 stats)); | 531 stats)); |
| 536 } | 532 } |
| 537 | 533 |
| 538 } // namespace content | 534 } // namespace content |
| OLD | NEW |