summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-08-24 21:34:23 (GMT)
committerKristian Høgsberg <krh@bitplanet.net>2010-08-25 14:02:20 (GMT)
commitb12fcceeb740094e98deb31dfc330002d7369baf (patch)
tree87cf74b215589f1ddb759638cf65c0b196d3d2a0
parentd6a4787ed71136eac2894fd72f7dac7fc4fb6fab (diff)
Update to EGL_MESA_drm_image from mesa master
Woo, running on stock mesa now.
-rw-r--r--TODO5
-rw-r--r--clients/gears.c6
-rw-r--r--clients/window.c4
-rw-r--r--compositor-drm.c4
-rw-r--r--compositor-x11.c6
-rw-r--r--compositor.c13
-rw-r--r--drm.c6
7 files changed, 27 insertions, 17 deletions
diff --git a/TODO b/TODO
index 49fe190..7c58898 100644
--- a/TODO
+++ b/TODO
@@ -3,6 +3,11 @@ Core wayland protocol
- generate pointer_focus (and drag focus) on raise/lower, move
windows, all kinds of changes in surface stacking.
+ - make a client side circular buffer of pending ping requests with
+ callbacks and data. if buffer fills up, just iterate until an
+ entry becomes available. wl_display_ping(dpy, func, data), basically.
+ func is called when the reply comes in for the ping request.
+
- glyph cache
- dnd, figure out large object transfer: through wayland protocol or
diff --git a/clients/gears.c b/clients/gears.c
index 7d97e23..0426f20 100644
--- a/clients/gears.c
+++ b/clients/gears.c
@@ -249,9 +249,9 @@ resize_window(struct gears *gears)
EGLint attribs[] = {
EGL_WIDTH, 0,
EGL_HEIGHT, 0,
- EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
- EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SHARE_MESA |
- EGL_IMAGE_USE_SCANOUT_MESA,
+ EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
+ EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SHARE_MESA |
+ EGL_DRM_BUFFER_USE_SCANOUT_MESA,
EGL_NONE
};
diff --git a/clients/window.c b/clients/window.c
index a56bcfa..2b88e09 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -246,8 +246,8 @@ display_create_surface(struct display *display,
EGLint image_attribs[] = {
EGL_WIDTH, 0,
EGL_HEIGHT, 0,
- EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
- EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA,
+ EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
+ EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA,
EGL_NONE
};
diff --git a/compositor-drm.c b/compositor-drm.c
index b054bc6..57802d3 100644
--- a/compositor-drm.c
+++ b/compositor-drm.c
@@ -377,8 +377,8 @@ create_output_for_connector(struct drm_compositor *ec,
EGLint handle, stride, attribs[] = {
EGL_WIDTH, 0,
EGL_HEIGHT, 0,
- EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
- EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA,
+ EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
+ EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA,
EGL_NONE
};
diff --git a/compositor-x11.c b/compositor-x11.c
index f310d9c..1aa45d9 100644
--- a/compositor-x11.c
+++ b/compositor-x11.c
@@ -334,8 +334,8 @@ x11_compositor_create_output(struct x11_compositor *c, int width, int height)
EGLint attribs[] = {
EGL_WIDTH, 0,
EGL_HEIGHT, 0,
- EGL_IMAGE_STRIDE_MESA, 0,
- EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
+ EGL_DRM_BUFFER_STRIDE_MESA, 0,
+ EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
EGL_NONE
};
@@ -413,7 +413,7 @@ x11_compositor_create_output(struct x11_compositor *c, int width, int height)
attribs[5] = buffers[0].pitch / 4;
output->image =
eglCreateImageKHR(c->base.display, c->base.context,
- EGL_DRM_IMAGE_MESA,
+ EGL_DRM_BUFFER_MESA,
(EGLClientBuffer) buffers[0].name,
attribs);
free(reply);
diff --git a/compositor.c b/compositor.c
index 9c5ee9b..2155d42 100644
--- a/compositor.c
+++ b/compositor.c
@@ -224,8 +224,8 @@ create_pointer_images(struct wlsc_compositor *ec)
EGLint image_attribs[] = {
EGL_WIDTH, 0,
EGL_HEIGHT, 0,
- EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
- EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA,
+ EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
+ EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA,
EGL_NONE
};
@@ -1041,7 +1041,11 @@ wl_drag_reset(struct wl_drag *drag)
wl_array_init(&drag->types);
drag->source = NULL;
- drag->target = NULL;
+
+ /* FIXME: We need to reset drag->target too, but can't right
+ * now because we need it for send/drop.
+ *
+ * drag->target = NULL; */
drag->time = 0;
drag->pointer_focus = NULL;
}
@@ -1134,7 +1138,8 @@ static void
drag_send(struct wl_client *client,
struct wl_drag *drag, struct wl_array *contents)
{
- wl_client_post_event(client, &drag->base, WL_DRAG_DROP, contents);
+ wl_client_post_event(drag->target,
+ &drag->base, WL_DRAG_DROP, contents);
}
static void
diff --git a/drm.c b/drm.c
index b4e2401..d10e20b 100644
--- a/drm.c
+++ b/drm.c
@@ -74,8 +74,8 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm_base,
EGLint attribs[] = {
EGL_WIDTH, 0,
EGL_HEIGHT, 0,
- EGL_IMAGE_STRIDE_MESA, 0,
- EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
+ EGL_DRM_BUFFER_STRIDE_MESA, 0,
+ EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
EGL_NONE
};
@@ -108,7 +108,7 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm_base,
buffer->visual = visual;
buffer->image = eglCreateImageKHR(compositor->display,
compositor->context,
- EGL_DRM_IMAGE_MESA,
+ EGL_DRM_BUFFER_MESA,
(EGLClientBuffer) name, attribs);
if (buffer->image == NULL) {
/* FIXME: Define a real exception event instead of