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.h" | 5 #include "content/common/gpu/client/command_buffer_proxy.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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 gpu::error::ContextLostReason reason) { | 336 gpu::error::ContextLostReason reason) { |
337 // Not implemented in proxy. | 337 // Not implemented in proxy. |
338 NOTREACHED(); | 338 NOTREACHED(); |
339 } | 339 } |
340 | 340 |
341 bool CommandBufferProxy::Echo(const base::Closure& callback) { | 341 bool CommandBufferProxy::Echo(const base::Closure& callback) { |
342 if (last_state_.error != gpu::error::kNoError) { | 342 if (last_state_.error != gpu::error::kNoError) { |
343 return false; | 343 return false; |
344 } | 344 } |
345 | 345 |
346 if (!Send(new GpuChannelMsg_Echo(GpuCommandBufferMsg_EchoAck(route_id_)))) { | 346 if (!Send(new GpuCommandBufferMsg_Echo(route_id_, |
| 347 GpuCommandBufferMsg_EchoAck(route_id_)))) { |
347 return false; | 348 return false; |
348 } | 349 } |
349 | 350 |
350 echo_tasks_.push(callback); | 351 echo_tasks_.push(callback); |
351 | 352 |
352 return true; | 353 return true; |
353 } | 354 } |
354 | 355 |
355 bool CommandBufferProxy::SetSurfaceVisible(bool visible) { | 356 bool CommandBufferProxy::SetSurfaceVisible(bool visible) { |
356 if (last_state_.error != gpu::error::kNoError) | 357 if (last_state_.error != gpu::error::kNoError) |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 | 448 |
448 void CommandBufferProxy::SetOnConsoleMessageCallback( | 449 void CommandBufferProxy::SetOnConsoleMessageCallback( |
449 const GpuConsoleMessageCallback& callback) { | 450 const GpuConsoleMessageCallback& callback) { |
450 console_message_callback_ = callback; | 451 console_message_callback_ = callback; |
451 } | 452 } |
452 | 453 |
453 void CommandBufferProxy::TryUpdateState() { | 454 void CommandBufferProxy::TryUpdateState() { |
454 if (last_state_.error == gpu::error::kNoError) | 455 if (last_state_.error == gpu::error::kNoError) |
455 shared_state_->Read(&last_state_); | 456 shared_state_->Read(&last_state_); |
456 } | 457 } |
OLD | NEW |