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

Unified Diff: content/common/gpu/media/video_decode_accelerator_unittest.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 | « content/common/gpu/media/vaapi_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/video_decode_accelerator_unittest.cc
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
index a93e4f75e35143fe51ace2c95b355a4550191b18..a86fb6783753c401b162d05ef1de543f9cf7708d 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -317,28 +317,25 @@ static bool DoNothingReturnTrue() { return true; }
void GLRenderingVDAClient::CreateDecoder() {
CHECK(decoder_deleted());
+ CHECK(!decoder_.get());
#if defined(OS_WIN)
- scoped_ptr<DXVAVideoDecodeAccelerator> decoder(
- new DXVAVideoDecodeAccelerator(this));
+ decoder_.reset(new DXVAVideoDecodeAccelerator(this));
#elif defined(OS_MACOSX)
- scoped_ptr<MacVideoDecodeAccelerator> decoder(
- new MacVideoDecodeAccelerator(this));
- decoder->SetCGLContext(
- static_cast<CGLContextObj>(rendering_helper_->GetGLContext()));
+ decoder_.reset(new MacVideoDecodeAccelerator(
+ static_cast<CGLContextObj>(rendering_helper_->GetGLContext()), this));
#elif defined(ARCH_CPU_ARMEL)
- scoped_ptr<OmxVideoDecodeAccelerator> decoder(
- new OmxVideoDecodeAccelerator(this));
- decoder->SetEglState(
- static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()),
- static_cast<EGLContext>(rendering_helper_->GetGLContext()));
+ decoder_.reset(
+ new OmxVideoDecodeAccelerator(
+ static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()),
+ static_cast<EGLContext>(rendering_helper_->GetGLContext()),
+ this));
#elif defined(ARCH_CPU_X86_FAMILY)
- scoped_ptr<VaapiVideoDecodeAccelerator> decoder(
- new VaapiVideoDecodeAccelerator(this, base::Bind(&DoNothingReturnTrue)));
- decoder->SetGlxState(
+ decoder_.reset(new VaapiVideoDecodeAccelerator(
static_cast<Display*>(rendering_helper_->GetGLDisplay()),
- static_cast<GLXContext>(rendering_helper_->GetGLContext()));
+ static_cast<GLXContext>(rendering_helper_->GetGLContext()),
+ this, base::Bind(&DoNothingReturnTrue)));
#endif // OS_WIN
- decoder_ = decoder.Pass();
+ CHECK(decoder_.get());
SetState(CS_DECODER_SET);
if (decoder_deleted())
return;
« no previous file with comments | « content/common/gpu/media/vaapi_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698