| OLD | NEW |
| 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 void GpuCommandBufferStub::OnCreateVideoDecoder( | 458 void GpuCommandBufferStub::OnCreateVideoDecoder( |
| 459 media::VideoDecodeAccelerator::Profile profile, | 459 media::VideoDecodeAccelerator::Profile profile, |
| 460 IPC::Message* reply_message) { | 460 IPC::Message* reply_message) { |
| 461 int decoder_route_id = channel_->GenerateRouteID(); | 461 int decoder_route_id = channel_->GenerateRouteID(); |
| 462 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams( | 462 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams( |
| 463 reply_message, decoder_route_id); | 463 reply_message, decoder_route_id); |
| 464 GpuVideoDecodeAccelerator* decoder = | 464 GpuVideoDecodeAccelerator* decoder = |
| 465 new GpuVideoDecodeAccelerator(this, decoder_route_id, this); | 465 new GpuVideoDecodeAccelerator(this, decoder_route_id, this); |
| 466 video_decoders_.AddWithID(decoder, decoder_route_id); | 466 video_decoders_.AddWithID(decoder, decoder_route_id); |
| 467 channel_->AddRoute(decoder_route_id, decoder); | 467 channel_->AddRoute(decoder_route_id, decoder); |
| 468 decoder->Initialize(profile, reply_message); | 468 decoder->Initialize(profile, reply_message, |
| 469 channel_->renderer_process()); |
| 469 } | 470 } |
| 470 | 471 |
| 471 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { | 472 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { |
| 472 channel_->RemoveRoute(decoder_route_id); | 473 channel_->RemoveRoute(decoder_route_id); |
| 473 video_decoders_.Remove(decoder_route_id); | 474 video_decoders_.Remove(decoder_route_id); |
| 474 } | 475 } |
| 475 | 476 |
| 476 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { | 477 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { |
| 477 surface_->SetVisible(visible); | 478 surface_->SetVisible(visible); |
| 478 } | 479 } |
| 479 | 480 |
| 480 #endif // defined(ENABLE_GPU) | 481 #endif // defined(ENABLE_GPU) |
| OLD | NEW |