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

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

Issue 7779001: Replace the use of an int32* with a proper struct for decoder configuration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replaced struct with explicit profile parameter. Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 gfx::GLContext::LosesAllContextsOnContextLost()) { 530 gfx::GLContext::LosesAllContextsOnContextLost()) {
531 channel_->LoseAllContexts(); 531 channel_->LoseAllContexts();
532 } else { 532 } else {
533 IPC::Message* msg = new GpuCommandBufferMsg_UpdateState(route_id_, state); 533 IPC::Message* msg = new GpuCommandBufferMsg_UpdateState(route_id_, state);
534 msg->set_unblock(true); 534 msg->set_unblock(true);
535 Send(msg); 535 Send(msg);
536 } 536 }
537 } 537 }
538 538
539 void GpuCommandBufferStub::OnCreateVideoDecoder( 539 void GpuCommandBufferStub::OnCreateVideoDecoder(
540 const std::vector<int32>& configs, 540 media::VideoDecodeAccelerator::Profile profile,
541 IPC::Message* reply_message) { 541 IPC::Message* reply_message) {
542 int decoder_route_id = channel_->GenerateRouteID(); 542 int decoder_route_id = channel_->GenerateRouteID();
543 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams( 543 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(
544 reply_message, decoder_route_id); 544 reply_message, decoder_route_id);
545 GpuVideoDecodeAccelerator* decoder = 545 GpuVideoDecodeAccelerator* decoder =
546 new GpuVideoDecodeAccelerator(this, decoder_route_id, this); 546 new GpuVideoDecodeAccelerator(this, decoder_route_id, this);
547 video_decoders_.AddWithID(decoder, decoder_route_id); 547 video_decoders_.AddWithID(decoder, decoder_route_id);
548 channel_->AddRoute(decoder_route_id, decoder); 548 channel_->AddRoute(decoder_route_id, decoder);
549 decoder->Initialize(configs, reply_message); 549 decoder->Initialize(profile, reply_message);
550 } 550 }
551 551
552 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { 552 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) {
553 channel_->RemoveRoute(decoder_route_id); 553 channel_->RemoveRoute(decoder_route_id);
554 video_decoders_.Remove(decoder_route_id); 554 video_decoders_.Remove(decoder_route_id);
555 } 555 }
556 556
557 #endif // defined(ENABLE_GPU) 557 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698