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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 10408003: Plumb extra_data() to VideoDecodeAccelerator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rev interface versino Created 8 years, 7 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 | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 if (state.error == gpu::error::kLostContext && 546 if (state.error == gpu::error::kLostContext &&
547 gfx::GLContext::LosesAllContextsOnContextLost()) { 547 gfx::GLContext::LosesAllContextsOnContextLost()) {
548 channel_->LoseAllContexts(); 548 channel_->LoseAllContexts();
549 } else { 549 } else {
550 command_buffer_->UpdateState(); 550 command_buffer_->UpdateState();
551 } 551 }
552 } 552 }
553 553
554 void GpuCommandBufferStub::OnCreateVideoDecoder( 554 void GpuCommandBufferStub::OnCreateVideoDecoder(
555 media::VideoCodecProfile profile, 555 media::VideoCodecProfile profile,
556 const gfx::Size& frame_size,
557 const std::vector<uint8_t>& extra_data,
556 IPC::Message* reply_message) { 558 IPC::Message* reply_message) {
557 int decoder_route_id = channel_->GenerateRouteID(); 559 int decoder_route_id = channel_->GenerateRouteID();
558 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams( 560 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(
559 reply_message, decoder_route_id); 561 reply_message, decoder_route_id);
560 GpuVideoDecodeAccelerator* decoder = 562 GpuVideoDecodeAccelerator* decoder =
561 new GpuVideoDecodeAccelerator(this, decoder_route_id, this); 563 new GpuVideoDecodeAccelerator(this, decoder_route_id, this);
562 video_decoders_.AddWithID(decoder, decoder_route_id); 564 video_decoders_.AddWithID(decoder, decoder_route_id);
563 channel_->AddRoute(decoder_route_id, decoder); 565 channel_->AddRoute(decoder_route_id, decoder);
564 decoder->Initialize(profile, reply_message); 566 decoder->Initialize(profile, frame_size, extra_data, reply_message);
565 } 567 }
566 568
567 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { 569 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) {
568 channel_->RemoveRoute(decoder_route_id); 570 channel_->RemoveRoute(decoder_route_id);
569 video_decoders_.Remove(decoder_route_id); 571 video_decoders_.Remove(decoder_route_id);
570 } 572 }
571 573
572 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { 574 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) {
573 DCHECK(surface_state_.get()); 575 DCHECK(surface_state_.get());
574 surface_state_->visible = visible; 576 surface_state_->visible = visible;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 } 658 }
657 659
658 void GpuCommandBufferStub::SetMemoryAllocation( 660 void GpuCommandBufferStub::SetMemoryAllocation(
659 const GpuMemoryAllocation& allocation) { 661 const GpuMemoryAllocation& allocation) {
660 allocation_ = allocation; 662 allocation_ = allocation;
661 663
662 SendMemoryAllocationToProxy(allocation); 664 SendMemoryAllocationToProxy(allocation);
663 } 665 }
664 666
665 #endif // defined(ENABLE_GPU) 667 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698