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

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

Issue 165393003: gpu: Generate mailboxes on client side (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 514
515 void CommandBufferProxyImpl::SendManagedMemoryStats( 515 void CommandBufferProxyImpl::SendManagedMemoryStats(
516 const gpu::ManagedMemoryStats& stats) { 516 const gpu::ManagedMemoryStats& stats) {
517 if (last_state_.error != gpu::error::kNoError) 517 if (last_state_.error != gpu::error::kNoError)
518 return; 518 return;
519 519
520 Send(new GpuCommandBufferMsg_SendClientManagedMemoryStats(route_id_, 520 Send(new GpuCommandBufferMsg_SendClientManagedMemoryStats(route_id_,
521 stats)); 521 stats));
522 } 522 }
523 523
524 bool CommandBufferProxyImpl::GenerateMailboxNames(
525 unsigned num,
526 std::vector<gpu::Mailbox>* names) {
527 if (last_state_.error != gpu::error::kNoError)
528 return false;
529
530 return channel_->GenerateMailboxNames(num, names);
531 }
532
533 bool CommandBufferProxyImpl::ProduceFrontBuffer(const gpu::Mailbox& mailbox) { 524 bool CommandBufferProxyImpl::ProduceFrontBuffer(const gpu::Mailbox& mailbox) {
534 if (last_state_.error != gpu::error::kNoError) 525 if (last_state_.error != gpu::error::kNoError)
535 return false; 526 return false;
536 527
537 return Send(new GpuCommandBufferMsg_ProduceFrontBuffer(route_id_, mailbox)); 528 return Send(new GpuCommandBufferMsg_ProduceFrontBuffer(route_id_, mailbox));
538 } 529 }
539 530
540 scoped_ptr<media::VideoDecodeAccelerator> 531 scoped_ptr<media::VideoDecodeAccelerator>
541 CommandBufferProxyImpl::CreateVideoDecoder( 532 CommandBufferProxyImpl::CreateVideoDecoder(
542 media::VideoCodecProfile profile, 533 media::VideoCodecProfile profile,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 const GpuConsoleMessageCallback& callback) { 590 const GpuConsoleMessageCallback& callback) {
600 console_message_callback_ = callback; 591 console_message_callback_ = callback;
601 } 592 }
602 593
603 void CommandBufferProxyImpl::TryUpdateState() { 594 void CommandBufferProxyImpl::TryUpdateState() {
604 if (last_state_.error == gpu::error::kNoError) 595 if (last_state_.error == gpu::error::kNoError)
605 shared_state()->Read(&last_state_); 596 shared_state()->Read(&last_state_);
606 } 597 }
607 598
608 } // namespace content 599 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698