static struct native_surface * ximage_display_create_pixmap_surface(struct native_display *ndpy, EGLNativePixmapType pix, const struct native_config *nconf) { struct ximage_surface *xsurf; /* find the config */ if (!nconf) { struct ximage_display *xdpy = ximage_display(ndpy); enum pipe_format fmt = get_pixmap_format(&xdpy->base, pix); int i; if (fmt != PIPE_FORMAT_NONE) { for (i = 0; i < xdpy->num_configs; i++) { if (xdpy->configs[i].base.color_format == fmt) { nconf = &xdpy->configs[i].base; break; } } } if (!nconf) return NULL; } xsurf = ximage_display_create_surface(ndpy, (Drawable) pix, nconf); return (xsurf) ? &xsurf->base : NULL; }
static struct native_surface * ximage_display_create_window_surface(struct native_display *ndpy, EGLNativeWindowType win, const struct native_config *nconf) { struct ximage_surface *xsurf; xsurf = ximage_display_create_surface(ndpy, (Drawable) win, nconf); return (xsurf) ? &xsurf->base : NULL; }
static struct native_surface * ximage_display_create_pixmap_surface(struct native_display *ndpy, EGLNativePixmapType pix, const struct native_config *nconf) { struct ximage_surface *xsurf; xsurf = ximage_display_create_surface(ndpy, XIMAGE_SURFACE_TYPE_PIXMAP, (Drawable) pix, nconf); return (xsurf) ? &xsurf->base : NULL; }