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

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
« no previous file with comments | « no previous file | content/common/gpu/media/dxva_video_decode_accelerator.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) 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 void GpuCommandBufferStub::OnCreateVideoDecoder( 454 void GpuCommandBufferStub::OnCreateVideoDecoder(
455 media::VideoDecodeAccelerator::Profile profile, 455 media::VideoDecodeAccelerator::Profile profile,
456 IPC::Message* reply_message) { 456 IPC::Message* reply_message) {
457 int decoder_route_id = channel_->GenerateRouteID(); 457 int decoder_route_id = channel_->GenerateRouteID();
458 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams( 458 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(
459 reply_message, decoder_route_id); 459 reply_message, decoder_route_id);
460 GpuVideoDecodeAccelerator* decoder = 460 GpuVideoDecodeAccelerator* decoder =
461 new GpuVideoDecodeAccelerator(this, decoder_route_id, this); 461 new GpuVideoDecodeAccelerator(this, decoder_route_id, this);
462 video_decoders_.AddWithID(decoder, decoder_route_id); 462 video_decoders_.AddWithID(decoder, decoder_route_id);
463 channel_->AddRoute(decoder_route_id, decoder); 463 channel_->AddRoute(decoder_route_id, decoder);
464 decoder->Initialize(profile, reply_message); 464 decoder->Initialize(profile, reply_message,
465 channel_->renderer_process());
465 } 466 }
466 467
467 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { 468 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) {
468 channel_->RemoveRoute(decoder_route_id); 469 channel_->RemoveRoute(decoder_route_id);
469 video_decoders_.Remove(decoder_route_id); 470 video_decoders_.Remove(decoder_route_id);
470 } 471 }
471 472
472 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { 473 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) {
473 surface_->SetVisible(visible); 474 surface_->SetVisible(visible);
474 } 475 }
475 476
476 void GpuCommandBufferStub::SendConsoleMessage( 477 void GpuCommandBufferStub::SendConsoleMessage(
477 int32 id, 478 int32 id,
478 const std::string& message) { 479 const std::string& message) {
479 GPUCommandBufferConsoleMessage console_message; 480 GPUCommandBufferConsoleMessage console_message;
480 console_message.id = id; 481 console_message.id = id;
481 console_message.message = message; 482 console_message.message = message;
482 IPC::Message* msg = new GpuCommandBufferMsg_ConsoleMsg( 483 IPC::Message* msg = new GpuCommandBufferMsg_ConsoleMsg(
483 route_id_, console_message); 484 route_id_, console_message);
484 msg->set_unblock(true); 485 msg->set_unblock(true);
485 Send(msg); 486 Send(msg);
486 } 487 }
487 488
488 #endif // defined(ENABLE_GPU) 489 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/dxva_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698