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 |