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

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

Issue 9699125: Chromium implementation of discardBackbuffer WebGraphicsContext3D extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renaming extension for now, so its not mistaken for the standard one 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
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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 return true; 360 return true;
361 } 361 }
362 362
363 bool CommandBufferProxy::SetSurfaceVisible(bool visible) { 363 bool CommandBufferProxy::SetSurfaceVisible(bool visible) {
364 if (last_state_.error != gpu::error::kNoError) 364 if (last_state_.error != gpu::error::kNoError)
365 return false; 365 return false;
366 366
367 return Send(new GpuCommandBufferMsg_SetSurfaceVisible(route_id_, visible)); 367 return Send(new GpuCommandBufferMsg_SetSurfaceVisible(route_id_, visible));
368 } 368 }
369 369
370 bool CommandBufferProxy::DiscardBackbuffer() {
371 if (last_state_.error != gpu::error::kNoError)
372 return false;
373
374 return Send(new GpuCommandBufferMsg_DiscardBackbuffer(route_id_));
375 }
376
377 bool CommandBufferProxy::EnsureBackbuffer() {
378 if (last_state_.error != gpu::error::kNoError)
379 return false;
380
381 return Send(new GpuCommandBufferMsg_EnsureBackbuffer(route_id_));
382 }
383
370 bool CommandBufferProxy::SetParent(CommandBufferProxy* parent_command_buffer, 384 bool CommandBufferProxy::SetParent(CommandBufferProxy* parent_command_buffer,
371 uint32 parent_texture_id) { 385 uint32 parent_texture_id) {
372 if (last_state_.error != gpu::error::kNoError) 386 if (last_state_.error != gpu::error::kNoError)
373 return false; 387 return false;
374 388
375 bool result; 389 bool result;
376 if (parent_command_buffer) { 390 if (parent_command_buffer) {
377 if (!Send(new GpuCommandBufferMsg_SetParent( 391 if (!Send(new GpuCommandBufferMsg_SetParent(
378 route_id_, 392 route_id_,
379 parent_command_buffer->route_id_, 393 parent_command_buffer->route_id_,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 469
456 void CommandBufferProxy::SetOnConsoleMessageCallback( 470 void CommandBufferProxy::SetOnConsoleMessageCallback(
457 const GpuConsoleMessageCallback& callback) { 471 const GpuConsoleMessageCallback& callback) {
458 console_message_callback_ = callback; 472 console_message_callback_ = callback;
459 } 473 }
460 474
461 void CommandBufferProxy::TryUpdateState() { 475 void CommandBufferProxy::TryUpdateState() {
462 if (last_state_.error == gpu::error::kNoError) 476 if (last_state_.error == gpu::error::kNoError)
463 shared_state_->Read(&last_state_); 477 shared_state_->Read(&last_state_);
464 } 478 }
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy.h ('k') | content/common/gpu/client/content_gl_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698