Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: content/common/gpu/client/command_buffer_proxy.cc

Issue 9567028: Make echo message per-command-buffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698