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

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

Issue 490233002: VaapiVideoAccelerator: make Vaapi accelerator work with ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 6ce9330f8c2c75593230205ad408966382cc03b5..a34f913be101667f33d84fa347c5a966183a199e 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -31,9 +31,8 @@
#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"
-#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
+#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
#include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
-#include "ui/gl/gl_context_glx.h"
#include "ui/gl/gl_implementation.h"
#elif defined(USE_OZONE)
#include "media/ozone/media_ozone_platform.h"
@@ -272,26 +271,24 @@ void GpuVideoDecodeAccelerator::Initialize(
make_context_current_,
device.Pass(),
io_message_loop_));
-#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
+#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
+#if defined(USE_X11)
Pawel Osciak 2014/08/25 01:13:23 Do we need to make the X11 decision here? Could Va
if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) {
VLOG(1) << "HW video decode acceleration not available without "
"DesktopGL (GLX).";
SendCreateDecoderReply(init_done_msg, false);
return;
}
- gfx::GLContextGLX* glx_context =
- static_cast<gfx::GLContextGLX*>(stub_->decoder()->GetGLContext());
- video_decode_accelerator_.reset(new VaapiVideoDecodeAccelerator(
- glx_context->display(), make_context_current_));
-#elif defined(USE_OZONE)
- media::MediaOzonePlatform* platform =
spang 2014/08/22 17:20:23 I would like to move the vaapi & v4l2 code out of
Pawel Osciak 2014/08/25 01:13:23 Could you please explain why and how/to where woul
spang 2014/08/28 19:52:08 I was thinking we should move it to media/ somewhe
Pawel Osciak 2014/08/29 11:26:29 Agreed, but as you said, VDA impl choice is orthog
- media::MediaOzonePlatform::GetInstance();
- video_decode_accelerator_.reset(platform->CreateVideoDecodeAccelerator(
- make_context_current_));
- if (!video_decode_accelerator_) {
+#else
+ if (gfx::GetGLImplementation() != gfx::kGLImplementationEGLGLES2) {
+ VLOG(1) << "HW video decode acceleration not available without "
Pawel Osciak 2014/08/25 01:13:23 Please use DVLOG or DLOG
+ "EGLGLES2.";
SendCreateDecoderReply(init_done_msg, false);
return;
}
+#endif // USE_X11
+ video_decode_accelerator_.reset(new VaapiVideoDecodeAccelerator(
+ stub_->decoder()->GetGLContext(), make_context_current_));
#elif defined(OS_ANDROID)
video_decode_accelerator_.reset(new AndroidVideoDecodeAccelerator(
stub_->decoder()->AsWeakPtr(),

Powered by Google App Engine
This is Rietveld 408576698