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

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

Issue 43283002: Enable GLX/EGL backend switching while run HW video decode with libva. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Refined based on Fischman's comments. Created 7 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 side-by-side diff with in-line comments
Download patch
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 08e23a33e310b087d8a0874c9e77b768d3bb058a..73c5378c10a5e143ef7281cf961333babc928606 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -278,6 +278,13 @@ void GpuVideoDecodeAccelerator::Initialize(
make_context_current_,
io_message_loop_));
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
+#if defined(VAVDA_VATEXTURE_EGL_BACKEND)
+ video_decode_accelerator_.reset(new VaapiVideoDecodeAccelerator(
+ gfx::GLSurfaceEGL::GetHardwareDisplay(),
+ stub_->decoder()->GetGLContext()->GetHandle(),
+ this,
+ make_context_current_));
+#else
gfx::GLContextGLX* glx_context =
static_cast<gfx::GLContextGLX*>(stub_->decoder()->GetGLContext());
GLXContext glx_context_handle =
@@ -285,6 +292,7 @@ void GpuVideoDecodeAccelerator::Initialize(
video_decode_accelerator_.reset(new VaapiVideoDecodeAccelerator(
glx_context->display(), glx_context_handle, this,
make_context_current_));
+#endif
#elif defined(OS_ANDROID)
video_decode_accelerator_.reset(new AndroidVideoDecodeAccelerator(
this,

Powered by Google App Engine
This is Rietveld 408576698