[Mesa-dev] [PATCH] egl: remove unneeded _eglGetNativePlatform check
Emil Velikov
emil.l.velikov at gmail.com
Mon Nov 13 14:04:59 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
There's little point in calling _eglGetNativePlatform() in
eglCopyBuffers. The platform return is identical to the one already
stored in our _EGLDisplay.
Modulo subtle memory corruption of course. But in these cases returning
EGL_BAD_NATIVE_PIXMAP doesn't sound right.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/egl/main/eglapi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index c1bf5bbfe19..4aa93db829b 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -1396,8 +1396,6 @@ eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
native_pixmap_ptr = (void*) target;
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
- if (disp->Platform != _eglGetNativePlatform(disp->PlatformDisplay))
- RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_PIXMAP, EGL_FALSE);
ret = drv->API.CopyBuffers(drv, disp, surf, native_pixmap_ptr);
RETURN_EGL_EVAL(disp, ret);
--
2.15.0
More information about the mesa-dev
mailing list