summaryrefslogtreecommitdiff
path: root/src/egl
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c11
-rw-r--r--src/egl/wayland/wayland-egl-priv.h1
-rw-r--r--src/egl/wayland/wayland-egl.c5
-rw-r--r--src/egl/wayland/wayland-egl.h4
4 files changed, 9 insertions, 12 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 9c5f68ef93..48cb5423ee 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -2107,19 +2107,10 @@ wayland_create_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
{
struct dri2_egl_display *dri2_dpy =
dri2_egl_display(dri2_surf->base.Resource.Display);
- struct wl_visual *visual;
-
- switch (buffer->cpp) {
- case 4:
- visual = wl_display_get_premultiplied_argb_visual(dri2_dpy->wl->display);
- break;
- default:
- return NULL;
- }
return wl_drm_create_buffer(dri2_dpy->wl->drm, buffer->name,
dri2_surf->base.Width, dri2_surf->base.Height,
- buffer->pitch, visual);
+ buffer->pitch, dri2_surf->wl->visual);
}
static void
diff --git a/src/egl/wayland/wayland-egl-priv.h b/src/egl/wayland/wayland-egl-priv.h
index 2ee0ee13da..f34ccbcb5a 100644
--- a/src/egl/wayland/wayland-egl-priv.h
+++ b/src/egl/wayland/wayland-egl-priv.h
@@ -34,6 +34,7 @@ struct wl_egl_display {
struct wl_egl_surface {
struct wl_surface *surface;
+ struct wl_visual *visual;
int width;
int height;
diff --git a/src/egl/wayland/wayland-egl.c b/src/egl/wayland/wayland-egl.c
index 3f7c5f7c35..88af0d90bd 100644
--- a/src/egl/wayland/wayland-egl.c
+++ b/src/egl/wayland/wayland-egl.c
@@ -158,7 +158,9 @@ wl_egl_surface_resize(struct wl_egl_surface *egl_surface,
}
WL_EGL_EXPORT struct wl_egl_surface *
-wl_egl_create_native_surface(struct wl_surface *surface, int width, int height)
+wl_egl_create_native_surface(struct wl_surface *surface,
+ int width, int height,
+ struct wl_visual *visual)
{
struct wl_egl_surface *egl_surface;
@@ -167,6 +169,7 @@ wl_egl_create_native_surface(struct wl_surface *surface, int width, int height)
return NULL;
egl_surface->surface = surface;
+ egl_surface->visual = visual;
wl_egl_surface_resize(egl_surface, width, height, 0, 0);
return egl_surface;
diff --git a/src/egl/wayland/wayland-egl.h b/src/egl/wayland/wayland-egl.h
index 6bf1b072fb..ad5248a807 100644
--- a/src/egl/wayland/wayland-egl.h
+++ b/src/egl/wayland/wayland-egl.h
@@ -27,7 +27,9 @@ void *
wl_egl_display_get_user_data(struct wl_egl_display *egl_display);
struct wl_egl_surface *
-wl_egl_create_native_surface(struct wl_surface *, int width, int height);
+wl_egl_create_native_surface(struct wl_surface *,
+ int width, int height,
+ struct wl_visual *);
void
wl_egl_destroy_native_surface(struct wl_egl_surface *);