Index: ui/gl/gl_image_ozone_native_pixmap.cc |
diff --git a/ui/gl/gl_image_ozone_native_pixmap.cc b/ui/gl/gl_image_ozone_native_pixmap.cc |
index dd2fb3e1a4bbd9dc6f8f7fdf9d0b78af3e6bd1cb..91d27ec587ab03d4cb1d8cc6eacdfa8bf4459cb5 100644 |
--- a/ui/gl/gl_image_ozone_native_pixmap.cc |
+++ b/ui/gl/gl_image_ozone_native_pixmap.cc |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include "ui/gfx/buffer_format_util.h" |
+#include "ui/gl/gl_fence.h" |
#include "ui/gl/gl_image_ozone_native_pixmap.h" |
#define FOURCC(a, b, c, d) \ |
@@ -242,4 +243,19 @@ unsigned GLImageOzoneNativePixmap::GetInternalFormatForTesting( |
return GL_NONE; |
} |
+void GLImageOzoneNativePixmap::Flush() { |
+ const EGLAttrib attribs[] = {EGL_IMAGE_EXTERNAL_TARGET_NVX, |
+ EGL_DECOMPRESSED_NVX, EGL_NONE}; |
+ |
+ EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY); |
dnicoara
2016/06/29 14:21:56
I believe you should be using "GLSurfaceEGL::GetHa
vinceh
2016/06/30 09:22:48
OK, will fix.
|
+ if (!eglImageFlushExternalEXT(display, egl_image_, attribs)) { |
piman
2016/06/29 17:34:50
What if the extension is not supported?
vinceh
2016/06/30 09:22:48
I should add check for the extension. Thanks.
|
+ LOG(ERROR) << "Failed to flush rendering"; |
+ return; |
+ } |
+ |
+ GLFence* fence = GLFence::Create(); |
piman
2016/06/29 17:34:50
nit: use std::unique_ptr<GLFence>
|
+ fence->ClientWait(); |
piman
2016/06/29 17:34:50
So, you're doing this on all drivers, even though
vinceh
2016/06/30 09:22:48
I should do this only when the extension is suppor
piman
2016/06/30 18:18:58
Commented there. I think this should integrate wit
|
+ delete fence; |
+} |
+ |
} // namespace gl |