summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-08-24 17:34:23 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-08-25 10:02:20 -0400
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
3 - generate pointer_focus (and drag focus) on raise/lower, move 3 - generate pointer_focus (and drag focus) on raise/lower, move
4 windows, all kinds of changes in surface stacking. 4 windows, all kinds of changes in surface stacking.
5 5
6 - make a client side circular buffer of pending ping requests with
7 callbacks and data. if buffer fills up, just iterate until an
8 entry becomes available. wl_display_ping(dpy, func, data), basically.
9 func is called when the reply comes in for the ping request.
10
6 - glyph cache 11 - glyph cache
7 12
8 - dnd, figure out large object transfer: through wayland protocol or 13 - 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)
249 EGLint attribs[] = { 249 EGLint attribs[] = {
250 EGL_WIDTH, 0, 250 EGL_WIDTH, 0,
251 EGL_HEIGHT, 0, 251 EGL_HEIGHT, 0,
252 EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, 252 EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
253 EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SHARE_MESA | 253 EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SHARE_MESA |
254 EGL_IMAGE_USE_SCANOUT_MESA, 254 EGL_DRM_BUFFER_USE_SCANOUT_MESA,
255 EGL_NONE 255 EGL_NONE
256 }; 256 };
257 257
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,
246 EGLint image_attribs[] = { 246 EGLint image_attribs[] = {
247 EGL_WIDTH, 0, 247 EGL_WIDTH, 0,
248 EGL_HEIGHT, 0, 248 EGL_HEIGHT, 0,
249 EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, 249 EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
250 EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA, 250 EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA,
251 EGL_NONE 251 EGL_NONE
252 }; 252 };
253 253
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,
377 EGLint handle, stride, attribs[] = { 377 EGLint handle, stride, attribs[] = {
378 EGL_WIDTH, 0, 378 EGL_WIDTH, 0,
379 EGL_HEIGHT, 0, 379 EGL_HEIGHT, 0,
380 EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, 380 EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
381 EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA, 381 EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA,
382 EGL_NONE 382 EGL_NONE
383 }; 383 };
384 384
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)
334 EGLint attribs[] = { 334 EGLint attribs[] = {
335 EGL_WIDTH, 0, 335 EGL_WIDTH, 0,
336 EGL_HEIGHT, 0, 336 EGL_HEIGHT, 0,
337 EGL_IMAGE_STRIDE_MESA, 0, 337 EGL_DRM_BUFFER_STRIDE_MESA, 0,
338 EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, 338 EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
339 EGL_NONE 339 EGL_NONE
340 }; 340 };
341 341
@@ -413,7 +413,7 @@ x11_compositor_create_output(struct x11_compositor *c, int width, int height)
413 attribs[5] = buffers[0].pitch / 4; 413 attribs[5] = buffers[0].pitch / 4;
414 output->image = 414 output->image =
415 eglCreateImageKHR(c->base.display, c->base.context, 415 eglCreateImageKHR(c->base.display, c->base.context,
416 EGL_DRM_IMAGE_MESA, 416 EGL_DRM_BUFFER_MESA,
417 (EGLClientBuffer) buffers[0].name, 417 (EGLClientBuffer) buffers[0].name,
418 attribs); 418 attribs);
419 free(reply); 419 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)
224 EGLint image_attribs[] = { 224 EGLint image_attribs[] = {
225 EGL_WIDTH, 0, 225 EGL_WIDTH, 0,
226 EGL_HEIGHT, 0, 226 EGL_HEIGHT, 0,
227 EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, 227 EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
228 EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA, 228 EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA,
229 EGL_NONE 229 EGL_NONE
230 }; 230 };
231 231
@@ -1041,7 +1041,11 @@ wl_drag_reset(struct wl_drag *drag)
1041 wl_array_init(&drag->types); 1041 wl_array_init(&drag->types);
1042 1042
1043 drag->source = NULL; 1043 drag->source = NULL;
1044 drag->target = NULL; 1044
1045 /* FIXME: We need to reset drag->target too, but can't right
1046 * now because we need it for send/drop.
1047 *
1048 * drag->target = NULL; */
1045 drag->time = 0; 1049 drag->time = 0;
1046 drag->pointer_focus = NULL; 1050 drag->pointer_focus = NULL;
1047} 1051}
@@ -1134,7 +1138,8 @@ static void
1134drag_send(struct wl_client *client, 1138drag_send(struct wl_client *client,
1135 struct wl_drag *drag, struct wl_array *contents) 1139 struct wl_drag *drag, struct wl_array *contents)
1136{ 1140{
1137 wl_client_post_event(client, &drag->base, WL_DRAG_DROP, contents); 1141 wl_client_post_event(drag->target,
1142 &drag->base, WL_DRAG_DROP, contents);
1138} 1143}
1139 1144
1140static void 1145static 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,
74 EGLint attribs[] = { 74 EGLint attribs[] = {
75 EGL_WIDTH, 0, 75 EGL_WIDTH, 0,
76 EGL_HEIGHT, 0, 76 EGL_HEIGHT, 0,
77 EGL_IMAGE_STRIDE_MESA, 0, 77 EGL_DRM_BUFFER_STRIDE_MESA, 0,
78 EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, 78 EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
79 EGL_NONE 79 EGL_NONE
80 }; 80 };
81 81
@@ -108,7 +108,7 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm_base,
108 buffer->visual = visual; 108 buffer->visual = visual;
109 buffer->image = eglCreateImageKHR(compositor->display, 109 buffer->image = eglCreateImageKHR(compositor->display,
110 compositor->context, 110 compositor->context,
111 EGL_DRM_IMAGE_MESA, 111 EGL_DRM_BUFFER_MESA,
112 (EGLClientBuffer) name, attribs); 112 (EGLClientBuffer) name, attribs);
113 if (buffer->image == NULL) { 113 if (buffer->image == NULL) {
114 /* FIXME: Define a real exception event instead of 114 /* FIXME: Define a real exception event instead of