summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorErik Kurzinger <ekurzinger@nvidia.com>2021-01-07 07:00:33 -0800
committerErik Kurzinger <ekurzinger@nvidia.com>2021-01-08 06:17:51 -0800
commita9269808f394955f213e34303c2c14fd61c35ab5 (patch)
treeb518ddebbc29d3ed0344c9861ef63485df0985aa /hw
parent532245798085a67b5ff906778f88373d5bcd2e4c (diff)
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.
Diffstat (limited to 'hw')
-rw-r--r--hw/xwayland/xwayland-glamor-eglstream.c4
-rw-r--r--hw/xwayland/xwayland-glamor-gbm.c11
-rw-r--r--hw/xwayland/xwayland-glamor.c6
-rw-r--r--hw/xwayland/xwayland-glamor.h6
-rw-r--r--hw/xwayland/xwayland-present.c2
-rw-r--r--hw/xwayland/xwayland-window.c3
6 files changed, 9 insertions, 23 deletions
diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c
index c99d70744..9b2c2c43f 100644
--- a/hw/xwayland/xwayland-glamor-eglstream.c
+++ b/hw/xwayland/xwayland-glamor-eglstream.c
@@ -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;
}
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index d6a560ac7..221bf268a 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -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;
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 9dc7b9b92..bcd07a1a5 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -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;
}
diff --git a/hw/xwayland/xwayland-glamor.h b/hw/xwayland/xwayland-glamor.h
index 029b5dbd1..e017fce80 100644
--- a/hw/xwayland/xwayland-glamor.h
+++ b/hw/xwayland/xwayland-glamor.h
@@ -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,
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
index d36b47149..666ea15e7 100644
--- a/hw/xwayland/xwayland-present.c
+++ b/hw/xwayland/xwayland-present.c
@@ -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;
diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c
index 00a81848a..d0c7c581d 100644
--- a/hw/xwayland/xwayland-window.c
+++ b/hw/xwayland/xwayland-window.c
@@ -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);