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 0475abf9c6af5bd6278824a1dc5cb18848b238f2..2e9322704475d7f2cbcf1a05d38dc89a3118c100 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" |
#include "ui/gl/gl_surface_egl.h" |
@@ -204,6 +205,7 @@ bool GLImageOzoneNativePixmap::ScheduleOverlayPlane( |
const gfx::Rect& bounds_rect, |
const gfx::RectF& crop_rect) { |
DCHECK(pixmap_); |
+ |
reveman
2016/07/11 18:59:06
nit: no need to add this blank line
|
return pixmap_->ScheduleOverlayPlane(widget, z_order, transform, bounds_rect, |
crop_rect); |
} |
@@ -247,4 +249,19 @@ unsigned GLImageOzoneNativePixmap::GetInternalFormatForTesting( |
return GL_NONE; |
} |
+void GLImageOzoneNativePixmap::Flush() { |
reveman
2016/07/11 18:59:06
nit: move below ScheduleOverlayPlane
|
+ if (GLSurfaceEGL::HasEGLExtension("EGL_EXT_image_flush_external")) { |
piman
2016/07/11 16:06:26
nit: parsing strings on every frame seems a bit un
|
+ EGLDisplay display = GLSurfaceEGL::GetHardwareDisplay(); |
+ const EGLAttrib attribs[] = { |
+ EGL_NONE, |
+ }; |
+ if (!eglImageFlushExternalEXT(display, egl_image_, attribs)) { |
+ LOG(ERROR) << "Failed to flush rendering"; |
+ return; |
+ } |
+ } |
+ |
+ return; |
reveman
2016/07/11 18:59:06
nit: remove unnecessary return statement
|
+} |
+ |
} // namespace gl |