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

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

Issue 8510039: Initial implementation of the DXVA 2.0 H.264 hardware decoder for pepper for Windows. The decodin... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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/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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 void GpuCommandBufferStub::OnCreateVideoDecoder( 455 void GpuCommandBufferStub::OnCreateVideoDecoder(
456 media::VideoDecodeAccelerator::Profile profile, 456 media::VideoDecodeAccelerator::Profile profile,
457 IPC::Message* reply_message) { 457 IPC::Message* reply_message) {
458 int decoder_route_id = channel_->GenerateRouteID(); 458 int decoder_route_id = channel_->GenerateRouteID();
459 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams( 459 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(
460 reply_message, decoder_route_id); 460 reply_message, decoder_route_id);
461 GpuVideoDecodeAccelerator* decoder = 461 GpuVideoDecodeAccelerator* decoder =
462 new GpuVideoDecodeAccelerator(this, decoder_route_id, this); 462 new GpuVideoDecodeAccelerator(this, decoder_route_id, this);
463 video_decoders_.AddWithID(decoder, decoder_route_id); 463 video_decoders_.AddWithID(decoder, decoder_route_id);
464 channel_->AddRoute(decoder_route_id, decoder); 464 channel_->AddRoute(decoder_route_id, decoder);
465 decoder->Initialize(profile, reply_message); 465 decoder->Initialize(profile, reply_message,
466 channel_->renderer_process());
466 } 467 }
467 468
468 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { 469 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) {
469 channel_->RemoveRoute(decoder_route_id); 470 channel_->RemoveRoute(decoder_route_id);
470 video_decoders_.Remove(decoder_route_id); 471 video_decoders_.Remove(decoder_route_id);
471 } 472 }
472 473
473 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { 474 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) {
474 surface_->SetVisible(visible); 475 surface_->SetVisible(visible);
475 } 476 }
476 477
477 #endif // defined(ENABLE_GPU) 478 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698