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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 1418483003: Revert of ui: Move GLImage::BindTexImage fallback from GLImage implementations to GLES2CmdDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
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<gfx::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);
347 }
348 } 346 }
349 347
350 scoped_ptr<media::VideoDecodeAccelerator> 348 scoped_ptr<media::VideoDecodeAccelerator>
351 GpuVideoDecodeAccelerator::CreateVaapiVDA() { 349 GpuVideoDecodeAccelerator::CreateVaapiVDA() {
352 scoped_ptr<media::VideoDecodeAccelerator> decoder; 350 scoped_ptr<media::VideoDecodeAccelerator> decoder;
353 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) 351 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
354 decoder.reset(new VaapiVideoDecodeAccelerator( 352 decoder.reset(new VaapiVideoDecodeAccelerator(
355 make_context_current_, base::Bind(&GpuVideoDecodeAccelerator::BindImage, 353 make_context_current_, base::Bind(&GpuVideoDecodeAccelerator::BindImage,
356 base::Unretained(this)))); 354 base::Unretained(this))));
357 #endif 355 #endif
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 return stub_->channel()->Send(message); 618 return stub_->channel()->Send(message);
621 } 619 }
622 620
623 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, 621 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message,
624 bool succeeded) { 622 bool succeeded) {
625 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); 623 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded);
626 Send(message); 624 Send(message);
627 } 625 }
628 626
629 } // namespace content 627 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/avda_codec_image.cc ('k') | content/common/gpu/stream_texture_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698