Chromium Code Reviews| Index: content/common/gpu/media/gpu_video_decode_accelerator.cc |
| diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc |
| index ab97618ca0b111d1a522d12be5272337107e98ad..0f15ad92bdd007ec64eb5c29b3550ee0af2db13d 100644 |
| --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc |
| +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc |
| @@ -26,6 +26,8 @@ |
| #if defined(OS_WIN) |
| #include "base/win/windows_version.h" |
| #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
| +#elif defined(OS_MACOSX) |
| +#include "content/common/gpu/media/vt_video_decode_accelerator.h" |
| #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) |
| #include "content/common/gpu/media/v4l2_video_decode_accelerator.h" |
| #include "content/common/gpu/media/v4l2_video_device.h" |
| @@ -251,6 +253,10 @@ void GpuVideoDecodeAccelerator::Initialize( |
| DVLOG(0) << "Initializing DXVA HW decoder for windows."; |
| video_decode_accelerator_.reset( |
| new DXVAVideoDecodeAccelerator(make_context_current_)); |
| +#elif defined(OS_MACOSX) |
| + video_decode_accelerator_.reset(new VTVideoDecodeAccelerator( |
| + static_cast<CGLContextObj>( |
| + stub_->decoder()->GetGLContext()->GetHandle()))); |
| #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) |
| scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
| if (!device.get()) { |
| @@ -353,11 +359,12 @@ void GpuVideoDecodeAccelerator::OnAssignPictureBuffers( |
| NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT); |
| return; |
| } |
| - if (texture_target_ == GL_TEXTURE_EXTERNAL_OES) { |
| - // GL_TEXTURE_EXTERNAL_OES textures have their dimensions defined by the |
| + if (texture_target_ == GL_TEXTURE_EXTERNAL_OES || |
| + texture_target_ == GL_TEXTURE_RECTANGLE) { |
|
scherkus (not reviewing)
2014/06/09 16:02:06
do we need this change right now?
in general I pr
sandersd (OOO until July 31)
2014/06/10 01:02:44
Done.
|
| + // These textures have their dimensions defined by the |
| // underlying EGLImage. Use |texture_dimensions_| for this size. |
| texture_manager->SetLevelInfo(texture_ref, |
| - GL_TEXTURE_EXTERNAL_OES, |
| + texture_target_, |
| 0, |
| 0, |
| texture_dimensions_.width(), |
| @@ -459,7 +466,6 @@ void GpuVideoDecodeAccelerator::OnWillDestroyStub() { |
| stub_->channel()->RemoveRoute(host_route_id_); |
| stub_->RemoveDestructionObserver(this); |
| - video_decode_accelerator_.reset(); |
|
scherkus (not reviewing)
2014/06/09 16:02:06
ditto
sandersd (OOO until July 31)
2014/06/10 01:02:44
More bad merging :-(
|
| delete this; |
| } |