[Mesa-dev] [RFC 3/3] egl: remove EGL_NOK_swap_region
Emil Velikov
emil.l.velikov at gmail.com
Sun Jun 4 23:52:10 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
Analogous to previous commit - only one platform (of 6?) implements
this, and there's no implementations seen in the wild that use this.
Hmm the extension isn't even available anywhere :-\
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/egl/drivers/dri2/egl_dri2.c | 9 --------
src/egl/drivers/dri2/egl_dri2.h | 4 ----
src/egl/drivers/dri2/egl_dri2_fallbacks.h | 8 -------
src/egl/drivers/dri2/platform_android.c | 1 -
src/egl/drivers/dri2/platform_drm.c | 1 -
src/egl/drivers/dri2/platform_surfaceless.c | 1 -
src/egl/drivers/dri2/platform_wayland.c | 2 --
src/egl/drivers/dri2/platform_x11.c | 33 -----------------------------
src/egl/drivers/dri2/platform_x11_dri3.c | 1 -
src/egl/main/eglapi.c | 29 -------------------------
src/egl/main/eglapi.h | 4 ----
src/egl/main/egldisplay.h | 1 -
src/egl/main/eglentrypoint.h | 1 -
src/egl/main/eglfallbacks.c | 2 --
14 files changed, 97 deletions(-)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 977482f4b55..384b8043e4a 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1505,14 +1505,6 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv, _EGLDisplay *dpy,
}
static EGLBoolean
-dri2_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
- EGLint numRects, const EGLint *rects)
-{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->swap_buffers_region(drv, dpy, surf, numRects, rects);
-}
-
-static EGLBoolean
dri2_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
void *native_pixmap_target)
{
@@ -3133,7 +3125,6 @@ _eglBuiltInDriverDRI2(const char *args)
dri2_drv->base.API.SwapInterval = dri2_swap_interval;
dri2_drv->base.API.SwapBuffers = dri2_swap_buffers;
dri2_drv->base.API.SwapBuffersWithDamageEXT = dri2_swap_buffers_with_damage;
- dri2_drv->base.API.SwapBuffersRegionNOK = dri2_swap_buffers_region;
dri2_drv->base.API.CopyBuffers = dri2_copy_buffers,
dri2_drv->base.API.QueryBufferAge = dri2_query_buffer_age;
dri2_drv->base.API.CreateImageKHR = dri2_create_image;
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index 8cc0d87acde..27722ef7322 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -118,10 +118,6 @@ struct dri2_egl_display_vtbl {
_EGLSurface *surface,
const EGLint *rects, EGLint n_rects);
- EGLBoolean (*swap_buffers_region)(_EGLDriver *drv, _EGLDisplay *dpy,
- _EGLSurface *surf, EGLint numRects,
- const EGLint *rects);
-
EGLBoolean (*copy_buffers)(_EGLDriver *drv, _EGLDisplay *dpy,
_EGLSurface *surf, void *native_pixmap_target);
diff --git a/src/egl/drivers/dri2/egl_dri2_fallbacks.h b/src/egl/drivers/dri2/egl_dri2_fallbacks.h
index 44d50dd3925..8f7debfdf51 100644
--- a/src/egl/drivers/dri2/egl_dri2_fallbacks.h
+++ b/src/egl/drivers/dri2/egl_dri2_fallbacks.h
@@ -72,14 +72,6 @@ dri2_fallback_swap_buffers_with_damage(_EGLDriver *drv, _EGLDisplay *dpy,
}
static inline EGLBoolean
-dri2_fallback_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *dpy,
- _EGLSurface *surf,
- EGLint numRects, const EGLint *rects)
-{
- return EGL_FALSE;
-}
-
-static inline EGLBoolean
dri2_fallback_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy,
_EGLSurface *surf,
void *native_pixmap_target)
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 08037e34de2..6365755af6d 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -1065,7 +1065,6 @@ static const struct dri2_egl_display_vtbl droid_display_vtbl = {
.swap_interval = dri2_fallback_swap_interval,
.swap_buffers = droid_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
- .swap_buffers_region = dri2_fallback_swap_buffers_region,
.copy_buffers = dri2_fallback_copy_buffers,
.query_buffer_age = droid_query_buffer_age,
.query_surface = droid_query_surface,
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index 017e77fae75..97338058d17 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -657,7 +657,6 @@ static const struct dri2_egl_display_vtbl dri2_drm_display_vtbl = {
.swap_interval = dri2_fallback_swap_interval,
.swap_buffers = dri2_drm_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
- .swap_buffers_region = dri2_fallback_swap_buffers_region,
.copy_buffers = dri2_fallback_copy_buffers,
.query_buffer_age = dri2_drm_query_buffer_age,
.create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index 8cdb00b2191..15322c1c037 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -236,7 +236,6 @@ static const struct dri2_egl_display_vtbl dri2_surfaceless_display_vtbl = {
.swap_interval = dri2_fallback_swap_interval,
.swap_buffers = surfaceless_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
- .swap_buffers_region = dri2_fallback_swap_buffers_region,
.copy_buffers = dri2_fallback_copy_buffers,
.query_buffer_age = dri2_fallback_query_buffer_age,
.create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 0450fb2d359..d48b3578dac 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1079,7 +1079,6 @@ static const struct dri2_egl_display_vtbl dri2_wl_display_vtbl = {
.swap_interval = dri2_wl_swap_interval,
.swap_buffers = dri2_wl_swap_buffers,
.swap_buffers_with_damage = dri2_wl_swap_buffers_with_damage,
- .swap_buffers_region = dri2_fallback_swap_buffers_region,
.copy_buffers = dri2_fallback_copy_buffers,
.query_buffer_age = dri2_wl_query_buffer_age,
.create_wayland_buffer_from_image = dri2_wl_create_wayland_buffer_from_image,
@@ -1772,7 +1771,6 @@ static const struct dri2_egl_display_vtbl dri2_wl_swrast_display_vtbl = {
.swap_interval = dri2_wl_swap_interval,
.swap_buffers = dri2_wl_swrast_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
- .swap_buffers_region = dri2_fallback_swap_buffers_region,
.copy_buffers = dri2_fallback_copy_buffers,
.query_buffer_age = dri2_fallback_query_buffer_age,
.create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 9d87c9f4c1a..d7ad2a7aebc 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -902,36 +902,6 @@ dri2_x11_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
}
static EGLBoolean
-dri2_x11_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *draw,
- EGLint numRects, const EGLint *rects)
-{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
- struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
- EGLBoolean ret;
- xcb_xfixes_region_t region;
- xcb_rectangle_t rectangles[16];
- int i;
-
- if (numRects > (int)ARRAY_SIZE(rectangles))
- return dri2_copy_region(drv, disp, draw, dri2_surf->region);
-
- for (i = 0; i < numRects; i++) {
- rectangles[i].x = rects[i * 4];
- rectangles[i].y = dri2_surf->base.Height - rects[i * 4 + 1] - rects[i * 4 + 3];
- rectangles[i].width = rects[i * 4 + 2];
- rectangles[i].height = rects[i * 4 + 3];
- }
-
- region = xcb_generate_id(dri2_dpy->conn);
- xcb_xfixes_create_region(dri2_dpy->conn, region, numRects, rectangles);
- ret = dri2_copy_region(drv, disp, draw, region);
- xcb_xfixes_destroy_region(dri2_dpy->conn, region);
-
- return ret;
-}
-
-static EGLBoolean
dri2_x11_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint interval)
{
@@ -1125,7 +1095,6 @@ static const struct dri2_egl_display_vtbl dri2_x11_swrast_display_vtbl = {
.create_image = dri2_fallback_create_image_khr,
.swap_interval = dri2_fallback_swap_interval,
.swap_buffers = dri2_x11_swap_buffers,
- .swap_buffers_region = dri2_fallback_swap_buffers_region,
.copy_buffers = dri2_x11_copy_buffers,
.query_buffer_age = dri2_fallback_query_buffer_age,
.query_surface = dri2_query_surface,
@@ -1144,7 +1113,6 @@ static const struct dri2_egl_display_vtbl dri2_x11_display_vtbl = {
.swap_interval = dri2_x11_swap_interval,
.swap_buffers = dri2_x11_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
- .swap_buffers_region = dri2_x11_swap_buffers_region,
.copy_buffers = dri2_x11_copy_buffers,
.query_buffer_age = dri2_fallback_query_buffer_age,
.query_surface = dri2_query_surface,
@@ -1440,7 +1408,6 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
dri2_x11_setup_swap_interval(dri2_dpy);
disp->Extensions.KHR_image_pixmap = EGL_TRUE;
- disp->Extensions.NOK_swap_region = EGL_TRUE;
disp->Extensions.NOK_texture_from_pixmap = EGL_TRUE;
disp->Extensions.CHROMIUM_sync_control = EGL_TRUE;
diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c
index 3d459f27416..61f8be07f18 100644
--- a/src/egl/drivers/dri2/platform_x11_dri3.c
+++ b/src/egl/drivers/dri2/platform_x11_dri3.c
@@ -457,7 +457,6 @@ struct dri2_egl_display_vtbl dri3_x11_display_vtbl = {
.swap_interval = dri3_set_swap_interval,
.swap_buffers = dri3_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
- .swap_buffers_region = dri2_fallback_swap_buffers_region,
.copy_buffers = dri3_copy_buffers,
.query_buffer_age = dri3_query_buffer_age,
.query_surface = dri3_query_surface,
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 7e680161f31..7169f4e83a7 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -517,7 +517,6 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
_EGL_CHECK_EXTENSION(MESA_drm_image);
_EGL_CHECK_EXTENSION(MESA_image_dma_buf_export);
- _EGL_CHECK_EXTENSION(NOK_swap_region);
_EGL_CHECK_EXTENSION(NOK_texture_from_pixmap);
_EGL_CHECK_EXTENSION(WL_bind_wayland_display);
@@ -1985,34 +1984,6 @@ eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSync sync)
RETURN_EGL_EVAL(disp, ret);
}
-static EGLBoolean EGLAPIENTRY
-eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface,
- EGLint numRects, const EGLint *rects)
-{
- _EGLContext *ctx = _eglGetCurrentContext();
- _EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLSurface *surf = _eglLookupSurface(surface, disp);
- _EGLDriver *drv;
- EGLBoolean ret;
-
- _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
-
- _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
-
- if (!disp->Extensions.NOK_swap_region)
- RETURN_EGL_EVAL(disp, EGL_FALSE);
-
- /* surface must be bound to current context in EGL 1.4 */
- if (_eglGetContextHandle(ctx) == EGL_NO_CONTEXT ||
- surf != ctx->DrawSurface)
- RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
-
- ret = drv->API.SwapBuffersRegionNOK(drv, disp, surf, numRects, rects);
-
- RETURN_EGL_EVAL(disp, ret);
-}
-
-
static EGLImage EGLAPIENTRY
eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attr_list)
{
diff --git a/src/egl/main/eglapi.h b/src/egl/main/eglapi.h
index 0c46b51df62..aebdda7659b 100644
--- a/src/egl/main/eglapi.h
+++ b/src/egl/main/eglapi.h
@@ -149,10 +149,6 @@ struct _egl_api
EGLint (*DupNativeFenceFDANDROID)(_EGLDriver *drv, _EGLDisplay *dpy,
_EGLSync *sync);
- EGLBoolean (*SwapBuffersRegionNOK)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surf, EGLint numRects,
- const EGLint *rects);
-
_EGLImage *(*CreateDRMImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
const EGLint *attr_list);
EGLBoolean (*ExportDRMImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 5fb8a3a026d..59c7a4f43b9 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -125,7 +125,6 @@ struct _egl_extensions
EGLBoolean MESA_drm_image;
EGLBoolean MESA_image_dma_buf_export;
- EGLBoolean NOK_swap_region;
EGLBoolean NOK_texture_from_pixmap;
EGLBoolean WL_bind_wayland_display;
diff --git a/src/egl/main/eglentrypoint.h b/src/egl/main/eglentrypoint.h
index d8d85d1c35e..89c8c8a78d0 100644
--- a/src/egl/main/eglentrypoint.h
+++ b/src/egl/main/eglentrypoint.h
@@ -65,7 +65,6 @@ EGL_ENTRYPOINT(eglReleaseThread)
EGL_ENTRYPOINT(eglSignalSyncKHR)
EGL_ENTRYPOINT(eglSurfaceAttrib)
EGL_ENTRYPOINT(eglSwapBuffers)
-EGL_ENTRYPOINT(eglSwapBuffersRegionNOK)
EGL_ENTRYPOINT(eglSwapBuffersWithDamageEXT)
EGL_ENTRYPOINT(eglSwapBuffersWithDamageKHR)
EGL_ENTRYPOINT(eglSwapInterval)
diff --git a/src/egl/main/eglfallbacks.c b/src/egl/main/eglfallbacks.c
index 017d337133e..4081754e842 100644
--- a/src/egl/main/eglfallbacks.c
+++ b/src/egl/main/eglfallbacks.c
@@ -97,8 +97,6 @@ _eglInitDriverFallbacks(_EGLDriver *drv)
drv->API.CreateDRMImageMESA = NULL;
drv->API.ExportDRMImageMESA = NULL;
- drv->API.SwapBuffersRegionNOK = NULL;
-
drv->API.ExportDMABUFImageQueryMESA = NULL;
drv->API.ExportDMABUFImageMESA = NULL;
}
--
2.13.0
More information about the mesa-dev
mailing list