Commit a9269808 authored by Erik Kurzinger's avatar Erik Kurzinger
Browse files

xwayland: remove unused parameter of xwl_glamor_pixmap_get_wl_buffer

There are currently no callers that make use of the "created" output parameter
of xwl_glamor_pixmap_get_wl_buffer. Remove it, along with the corresponding
argument of the associated EGL backend entrypoint.
parent 53224579
Pipeline #253099 passed with stages
in 5 minutes and 39 seconds
......@@ -331,10 +331,8 @@ xwl_glamor_eglstream_destroy_pixmap(PixmapPtr pixmap)
}
static struct wl_buffer *
xwl_glamor_eglstream_get_wl_buffer_for_pixmap(PixmapPtr pixmap,
Bool *created)
xwl_glamor_eglstream_get_wl_buffer_for_pixmap(PixmapPtr pixmap)
{
/* XXX created? */
return xwl_pixmap_get(pixmap)->buffer;
}
......
......@@ -270,8 +270,7 @@ static const struct wl_buffer_listener xwl_glamor_gbm_buffer_listener = {
};
static struct wl_buffer *
xwl_glamor_gbm_get_wl_buffer_for_pixmap(PixmapPtr pixmap,
Bool *created)
xwl_glamor_gbm_get_wl_buffer_for_pixmap(PixmapPtr pixmap)
{
struct xwl_screen *xwl_screen = xwl_screen_get(pixmap->drawable.pScreen);
struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap);
......@@ -292,16 +291,10 @@ xwl_glamor_gbm_get_wl_buffer_for_pixmap(PixmapPtr pixmap,
return NULL;
if (xwl_pixmap->buffer) {
/* Buffer already exists. Return it and inform caller if interested. */
if (created)
*created = FALSE;
/* Buffer already exists. */
return xwl_pixmap->buffer;
}
/* Buffer does not exist yet. Create now and inform caller if interested. */
if (created)
*created = TRUE;
if (!xwl_pixmap->bo)
return NULL;
......
......@@ -106,14 +106,12 @@ xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen,
}
struct wl_buffer *
xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap,
Bool *created)
xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap)
{
struct xwl_screen *xwl_screen = xwl_screen_get(pixmap->drawable.pScreen);
if (xwl_screen->egl_backend->get_wl_buffer_for_pixmap)
return xwl_screen->egl_backend->get_wl_buffer_for_pixmap(pixmap,
created);
return xwl_screen->egl_backend->get_wl_buffer_for_pixmap(pixmap);
return NULL;
}
......
......@@ -76,8 +76,7 @@ struct xwl_egl_backend {
* wl_buffer for a currently buffer-less pixmap, or simply return the
* pixmap they've prepared beforehand.
*/
struct wl_buffer *(*get_wl_buffer_for_pixmap)(PixmapPtr pixmap,
Bool *created);
struct wl_buffer *(*get_wl_buffer_for_pixmap)(PixmapPtr pixmap);
/* Called by Xwayland to perform any pre-wl_surface damage routines
* that are required by the backend. If your backend is poorly
......@@ -107,8 +106,7 @@ Bool xwl_screen_set_drm_interface(struct xwl_screen *xwl_screen,
uint32_t id, uint32_t version);
Bool xwl_screen_set_dmabuf_interface(struct xwl_screen *xwl_screen,
uint32_t id, uint32_t version);
struct wl_buffer *xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap,
Bool *created);
struct wl_buffer *xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap);
void xwl_glamor_init_wl_registry(struct xwl_screen *xwl_screen,
struct wl_registry *registry,
uint32_t id, const char *interface,
......
......@@ -447,7 +447,7 @@ xwl_present_flip(WindowPtr present_window,
return FALSE;
pixmap->refcnt++;
buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap, NULL);
buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap);
event->event_id = event_id;
event->xwl_present_window = xwl_present_window;
......
......@@ -800,8 +800,7 @@ xwl_window_post_damage(struct xwl_window *xwl_window)
#ifdef XWL_HAS_GLAMOR
if (xwl_screen->glamor)
buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap,
NULL);
buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap);
else
#endif
buffer = xwl_shm_pixmap_get_wl_buffer(pixmap);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment