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

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

Issue 342483007: Removed ManagedMemoryStats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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_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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 signal_tasks_.insert(std::make_pair(signal_id, callback)); 434 signal_tasks_.insert(std::make_pair(signal_id, callback));
435 } 435 }
436 436
437 void CommandBufferProxyImpl::SetSurfaceVisible(bool visible) { 437 void CommandBufferProxyImpl::SetSurfaceVisible(bool visible) {
438 if (last_state_.error != gpu::error::kNoError) 438 if (last_state_.error != gpu::error::kNoError)
439 return; 439 return;
440 440
441 Send(new GpuCommandBufferMsg_SetSurfaceVisible(route_id_, visible)); 441 Send(new GpuCommandBufferMsg_SetSurfaceVisible(route_id_, visible));
442 } 442 }
443 443
444 void CommandBufferProxyImpl::SendManagedMemoryStats(
445 const gpu::ManagedMemoryStats& stats) {
446 if (last_state_.error != gpu::error::kNoError)
447 return;
448
449 Send(new GpuCommandBufferMsg_SendClientManagedMemoryStats(route_id_,
450 stats));
451 }
452
453 bool CommandBufferProxyImpl::ProduceFrontBuffer(const gpu::Mailbox& mailbox) { 444 bool CommandBufferProxyImpl::ProduceFrontBuffer(const gpu::Mailbox& mailbox) {
454 if (last_state_.error != gpu::error::kNoError) 445 if (last_state_.error != gpu::error::kNoError)
455 return false; 446 return false;
456 447
457 return Send(new GpuCommandBufferMsg_ProduceFrontBuffer(route_id_, mailbox)); 448 return Send(new GpuCommandBufferMsg_ProduceFrontBuffer(route_id_, mailbox));
458 } 449 }
459 450
460 scoped_ptr<media::VideoDecodeAccelerator> 451 scoped_ptr<media::VideoDecodeAccelerator>
461 CommandBufferProxyImpl::CreateVideoDecoder() { 452 CommandBufferProxyImpl::CreateVideoDecoder() {
462 if (!channel_) 453 if (!channel_)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 if (last_state_.error == gpu::error::kNoError) 508 if (last_state_.error == gpu::error::kNoError)
518 shared_state()->Read(&last_state_); 509 shared_state()->Read(&last_state_);
519 } 510 }
520 511
521 gpu::CommandBufferSharedState* CommandBufferProxyImpl::shared_state() const { 512 gpu::CommandBufferSharedState* CommandBufferProxyImpl::shared_state() const {
522 return reinterpret_cast<gpu::CommandBufferSharedState*>( 513 return reinterpret_cast<gpu::CommandBufferSharedState*>(
523 shared_state_shm_->memory()); 514 shared_state_shm_->memory());
524 } 515 }
525 516
526 } // namespace content 517 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698