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

Unified Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 10827074: Replace the explicit *VDA::Set{CGL,Egl,Glx}Context() methods with ctor params. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/gpu/media/mac_video_decode_accelerator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f164acc48469c0de74a6d7c8fadb094ee4157caa..0e2d14acab66dd1a6dbe75e2b76d1dc6a1b337fa 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -169,31 +169,25 @@ void GpuVideoDecodeAccelerator::Initialize(
return;
}
DLOG(INFO) << "Initializing DXVA HW decoder for windows.";
- scoped_ptr<DXVAVideoDecodeAccelerator> video_decoder(
- new DXVAVideoDecodeAccelerator(this));
- video_decode_accelerator_ = video_decoder.Pass();
+ video_decode_accelerator_.reset(new DXVAVideoDecodeAccelerator(this));
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
- scoped_ptr<OmxVideoDecodeAccelerator> video_decoder(
- new OmxVideoDecodeAccelerator(this));
- video_decoder->SetEglState(
+ video_decode_accelerator_.reset(new OmxVideoDecodeAccelerator(
gfx::GLSurfaceEGL::GetHardwareDisplay(),
- stub_->decoder()->GetGLContext()->GetHandle());
- video_decode_accelerator_ = video_decoder.Pass();
+ stub_->decoder()->GetGLContext()->GetHandle(),
+ this));
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
- scoped_ptr<VaapiVideoDecodeAccelerator> video_decoder(
- new VaapiVideoDecodeAccelerator(this, make_context_current_));
gfx::GLContextGLX* glx_context =
static_cast<gfx::GLContextGLX*>(stub_->decoder()->GetGLContext());
GLXContext glx_context_handle =
static_cast<GLXContext>(glx_context->GetHandle());
- video_decoder->SetGlxState(glx_context->display(), glx_context_handle);
- video_decode_accelerator_ = video_decoder.Pass();
+ video_decode_accelerator_.reset(new VaapiVideoDecodeAccelerator(
+ glx_context->display(), glx_context_handle, this,
+ make_context_current_));
#elif defined(OS_MACOSX)
- scoped_ptr<MacVideoDecodeAccelerator> video_decoder(
- new MacVideoDecodeAccelerator(this));
- video_decoder->SetCGLContext(static_cast<CGLContextObj>(
- stub_->decoder()->GetGLContext()->GetHandle()));
- video_decode_accelerator_ = video_decoder.Pass();
+ video_decode_accelerator_.reset(new MacVideoDecodeAccelerator(
+ static_cast<CGLContextObj>(
+ stub_->decoder()->GetGLContext()->GetHandle()),
+ this));
#else
NOTIMPLEMENTED() << "HW video decode acceleration not available.";
NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
« no previous file with comments | « no previous file | content/common/gpu/media/mac_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698