diff options
author | Kristian Høgsberg <[email protected]> | 2012-10-16 14:30:53 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2012-10-17 16:32:13 -0400 |
commit | e20a0f14b5fdbff9afa5d0d6ee35de8728f6a200 (patch) | |
tree | 3e0274ea7bc65494747a2da9580bbe0894f07bb0 /src/gallium/state_trackers/egl | |
parent | 2b8e90a33826dcd30b0cbbf464fbd191bf299d38 (diff) |
wayland: Drop support for ill-defined, unused wl_egl_pixmap
It doesn't provide the cross-process buffer sharing that a window system
pixmap could otherwise support and we don't have anything left that uses
this type of surface.
Diffstat (limited to 'src/gallium/state_trackers/egl')
-rw-r--r-- | src/gallium/state_trackers/egl/wayland/native_wayland.c | 105 | ||||
-rw-r--r-- | src/gallium/state_trackers/egl/wayland/native_wayland.h | 2 |
2 files changed, 0 insertions, 107 deletions
diff --git a/src/gallium/state_trackers/egl/wayland/native_wayland.c b/src/gallium/state_trackers/egl/wayland/native_wayland.c index 635b65f7285..62c87f3b943 100644 --- a/src/gallium/state_trackers/egl/wayland/native_wayland.c +++ b/src/gallium/state_trackers/egl/wayland/native_wayland.c @@ -99,7 +99,6 @@ wayland_display_get_configs(struct native_display *ndpy, int *num_configs) (1 << NATIVE_ATTACHMENT_BACK_LEFT); nconf->window_bit = TRUE; - nconf->pixmap_bit = TRUE; nconf->color_format = wayland_formats[i].format; display->num_configs++; @@ -138,49 +137,6 @@ wayland_display_get_param(struct native_display *ndpy, return val; } -static boolean -wayland_display_get_pixmap_format(struct native_display *ndpy, - EGLNativePixmapType pix, - enum pipe_format *format) -{ - /* all wl_egl_pixmaps are supported */ - *format = PIPE_FORMAT_NONE; - - return TRUE; -} - -static void -wayland_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap) -{ - struct pipe_resource *resource = egl_pixmap->driver_private; - - assert(resource); - - pipe_resource_reference(&resource, NULL); - if (egl_pixmap->buffer) { - wl_buffer_destroy(egl_pixmap->buffer); - egl_pixmap->buffer = NULL; - } - - egl_pixmap->driver_private = NULL; - egl_pixmap->destroy = NULL; -} - -static void -wayland_pixmap_surface_initialize(struct wayland_surface *surface) -{ - struct wayland_display *display = wayland_display(&surface->display->base); - const enum native_attachment front_natt = NATIVE_ATTACHMENT_FRONT_LEFT; - - if (surface->pix->buffer != NULL) - return; - - surface->pix->buffer = display->create_buffer(display, surface, front_natt); - surface->pix->destroy = wayland_pixmap_destroy; - surface->pix->driver_private = - resource_surface_get_single_resource(surface->rsurf, front_natt); -} - static void wayland_release_pending_resource(void *data, struct wl_callback *callback, @@ -262,9 +218,6 @@ wayland_surface_validate(struct native_surface *nsurf, uint attachment_mask, resource_surface_get_size(surface->rsurf, (uint *) width, (uint *) height); - if (surface->type == WL_PIXMAP_SURFACE) - wayland_pixmap_surface_initialize(surface); - return TRUE; } @@ -407,61 +360,6 @@ wayland_surface_destroy(struct native_surface *nsurf) } - -static struct native_surface * -wayland_create_pixmap_surface(struct native_display *ndpy, - EGLNativePixmapType pix, - const struct native_config *nconf) -{ - struct wayland_display *display = wayland_display(ndpy); - struct wayland_surface *surface; - struct wl_egl_pixmap *egl_pixmap = (struct wl_egl_pixmap *) pix; - enum native_attachment natt = NATIVE_ATTACHMENT_FRONT_LEFT; - uint bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW | - PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SCANOUT; - - surface = CALLOC_STRUCT(wayland_surface); - if (!surface) - return NULL; - - surface->display = display; - - surface->pending_resource = NULL; - surface->type = WL_PIXMAP_SURFACE; - surface->pix = egl_pixmap; - - if (nconf) - surface->color_format = nconf->color_format; - else /* FIXME: derive format from wl_visual */ - surface->color_format = PIPE_FORMAT_B8G8R8A8_UNORM; - - surface->attachment_mask = (1 << NATIVE_ATTACHMENT_FRONT_LEFT); - - surface->rsurf = resource_surface_create(display->base.screen, - surface->color_format, bind); - - if (!surface->rsurf) { - FREE(surface); - return NULL; - } - - resource_surface_set_size(surface->rsurf, - egl_pixmap->width, egl_pixmap->height); - - /* the pixmap is already allocated, so import it */ - if (surface->pix->buffer != NULL) - resource_surface_import_resource(surface->rsurf, natt, - surface->pix->driver_private); - - surface->base.destroy = wayland_surface_destroy; - surface->base.present = wayland_surface_present; - surface->base.validate = wayland_surface_validate; - surface->base.wait = wayland_surface_wait; - - return &surface->base; -} - - static struct native_surface * wayland_create_window_surface(struct native_display *ndpy, EGLNativeWindowType win, @@ -536,10 +434,7 @@ native_create_display(void *dpy, boolean use_sw) display->base.get_param = wayland_display_get_param; display->base.get_configs = wayland_display_get_configs; - display->base.get_pixmap_format = wayland_display_get_pixmap_format; - display->base.copy_to_pixmap = native_display_copy_to_pixmap; display->base.create_window_surface = wayland_create_window_surface; - display->base.create_pixmap_surface = wayland_create_pixmap_surface; display->own_dpy = own_dpy; diff --git a/src/gallium/state_trackers/egl/wayland/native_wayland.h b/src/gallium/state_trackers/egl/wayland/native_wayland.h index 268b3b764aa..b623feed117 100644 --- a/src/gallium/state_trackers/egl/wayland/native_wayland.h +++ b/src/gallium/state_trackers/egl/wayland/native_wayland.h @@ -67,7 +67,6 @@ enum wayland_buffer_type { enum wayland_surface_type { WL_WINDOW_SURFACE, - WL_PIXMAP_SURFACE, WL_PBUFFER_SURFACE }; @@ -76,7 +75,6 @@ struct wayland_surface { struct wayland_display *display; struct wl_egl_window *win; - struct wl_egl_pixmap *pix; enum wayland_surface_type type; int dx, dy; struct resource_surface *rsurf; |