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

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

Issue 137023008: Add support for Tegra V4L2 VDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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/exynos_v4l2_video_device.cc
diff --git a/content/common/gpu/media/exynos_v4l2_video_device.cc b/content/common/gpu/media/exynos_v4l2_video_device.cc
index ef40cf0e6854e4a7a9b90aa24d038bfb60977432..221f44e5ba8aff11551f86943826d4931865c276 100644
--- a/content/common/gpu/media/exynos_v4l2_video_device.cc
+++ b/content/common/gpu/media/exynos_v4l2_video_device.cc
@@ -12,6 +12,7 @@
#include "base/debug/trace_event.h"
#include "base/posix/eintr_wrapper.h"
#include "content/common/gpu/media/exynos_v4l2_video_device.h"
+#include "ui/gl/gl_bindings.h"
namespace content {
@@ -114,4 +115,23 @@ bool ExynosV4L2Device::Initialize() {
}
return true;
}
+
+EGLImageKHR ExynosV4L2Device::CreateEGLImage(EGLDisplay egl_display,
+ EGLint attrib[],
+ unsigned int texture_id,
+ unsigned int /*buffer_index*/) {
+ EGLImageKHR egl_image = eglCreateImageKHR(
+ egl_display, EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, NULL, attrib);
+ if (egl_image == EGL_NO_IMAGE_KHR) {
+ return egl_image;
+ }
+ glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture_id);
+ glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, egl_image);
+ return egl_image;
+}
+
+unsigned int ExynosV4L2Device::GetTextureTarget() {
+ return GL_TEXTURE_EXTERNAL_OES;
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698