OLD | NEW |
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 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 weak_factory_for_io_.GetWeakPtr(), | 329 weak_factory_for_io_.GetWeakPtr(), |
330 make_context_current_, | 330 make_context_current_, |
331 io_task_runner_)); | 331 io_task_runner_)); |
332 } | 332 } |
333 #endif | 333 #endif |
334 return decoder.Pass(); | 334 return decoder.Pass(); |
335 } | 335 } |
336 | 336 |
337 void GpuVideoDecodeAccelerator::BindImage(uint32 client_texture_id, | 337 void GpuVideoDecodeAccelerator::BindImage(uint32 client_texture_id, |
338 uint32 texture_target, | 338 uint32 texture_target, |
339 scoped_refptr<gfx::GLImage> image) { | 339 scoped_refptr<gl::GLImage> image) { |
340 gpu::gles2::GLES2Decoder* command_decoder = stub_->decoder(); | 340 gpu::gles2::GLES2Decoder* command_decoder = stub_->decoder(); |
341 gpu::gles2::TextureManager* texture_manager = | 341 gpu::gles2::TextureManager* texture_manager = |
342 command_decoder->GetContextGroup()->texture_manager(); | 342 command_decoder->GetContextGroup()->texture_manager(); |
343 gpu::gles2::TextureRef* ref = texture_manager->GetTexture(client_texture_id); | 343 gpu::gles2::TextureRef* ref = texture_manager->GetTexture(client_texture_id); |
344 if (ref) { | 344 if (ref) { |
345 texture_manager->SetLevelImage(ref, texture_target, 0, image.get(), | 345 texture_manager->SetLevelImage(ref, texture_target, 0, image.get(), |
346 gpu::gles2::Texture::BOUND); | 346 gpu::gles2::Texture::BOUND); |
347 } | 347 } |
348 } | 348 } |
349 | 349 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 return stub_->channel()->Send(message); | 626 return stub_->channel()->Send(message); |
627 } | 627 } |
628 | 628 |
629 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, | 629 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, |
630 bool succeeded) { | 630 bool succeeded) { |
631 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); | 631 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); |
632 Send(message); | 632 Send(message); |
633 } | 633 } |
634 | 634 |
635 } // namespace content | 635 } // namespace content |
OLD | NEW |