[cairo-commit] 2 commits - src/cairo-xlib-surface-shm.c src/cairo-xlib-xcb-surface.c

Uli Schlachter psychon at kemper.freedesktop.org
Fri Nov 6 12:01:58 PST 2015


 src/cairo-xlib-surface-shm.c |    8 ++++----
 src/cairo-xlib-xcb-surface.c |    3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 98d01cd119eaa7d50cf0ec6c6cc32ee170397ad5
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Fri Nov 6 18:13:05 2015 +0100

    xlib: fix mixing xcb & xlib calls
    
    NextRequest is a macro that doesn't mix well with xcb, since
    dpy->request is not updated. Instead use XNextRequest() that was fixed
    to do the right thing with xcb in libX11 commit:
    http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=7f8f9a36ef901f31279c385caf960a22daeb33fe
    
    This may solve application X errors when a shmdt() is called by cairo
    before the Attach request is processed.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
index 3187223..a339d0c 100644
--- a/src/cairo-xlib-surface-shm.c
+++ b/src/cairo-xlib-surface-shm.c
@@ -441,7 +441,7 @@ static void send_event(cairo_xlib_display_t *display,
 
     ev.type = display->shm->event;
     ev.send_event = 1; /* XXX or lie? */
-    ev.serial = NextRequest (display->display);
+    ev.serial = XNextRequest (display->display);
     ev.drawable = display->shm->window;
     ev.major_code = display->shm->opcode;
     ev.minor_code = X_ShmPutImage;
@@ -599,7 +599,7 @@ _cairo_xlib_shm_pool_create(cairo_xlib_display_t *display,
 	goto cleanup;
     }
 
-    pool->attached = NextRequest (dpy);
+    pool->attached = XNextRequest (dpy);
     success = XShmAttach (dpy, &pool->shm);
 #if !IPC_RMID_DEFERRED_RELEASE
     XSync (dpy, FALSE);
@@ -1200,7 +1200,7 @@ _cairo_xlib_shm_surface_mark_active (cairo_surface_t *_shm)
     cairo_xlib_shm_surface_t *shm = (cairo_xlib_shm_surface_t *) _shm;
     cairo_xlib_display_t *display = (cairo_xlib_display_t *) _shm->device;
 
-    shm->active = NextRequest (display->display);
+    shm->active = XNextRequest (display->display);
 }
 
 void
@@ -1242,7 +1242,7 @@ _cairo_xlib_shm_surface_get_obdata (cairo_surface_t *surface)
     cairo_xlib_display_t *display = (cairo_xlib_display_t *) surface->device;
     cairo_xlib_shm_surface_t *shm = (cairo_xlib_shm_surface_t *) surface;
 
-    display->shm->last_event = shm->active = NextRequest (display->display);
+    display->shm->last_event = shm->active = XNextRequest (display->display);
     return &shm->info->pool->shm;
 }
 
commit bf41cc397f460978eaf0aa35bc7341cefc9817b5
Author: Uli Schlachter <psychon at znc.in>
Date:   Fri Nov 6 20:50:47 2015 +0100

    Fix cairo-xlib-xcb compilation
    
    This is broken since:
    
    commit b1192beac7c5b56a8ff356d20af5ebfb65404109
    Author: Adrian Johnson <ajohnson at redneon.com>
    Date:   Mon Sep 21 21:35:05 2015 +0930
    
        Don't cull very thin lines on vector surfaces
    
        On vector surfaces, use a minimum line width when calculating extents.
    
        Bug 77298
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-xlib-xcb-surface.c b/src/cairo-xlib-xcb-surface.c
index af3e155..0bf4261 100644
--- a/src/cairo-xlib-xcb-surface.c
+++ b/src/cairo-xlib-xcb-surface.c
@@ -447,7 +447,8 @@ _cairo_xlib_xcb_surface_create (void *dpy,
     _cairo_surface_init (&surface->base,
 			 &_cairo_xlib_xcb_surface_backend,
 			 _cairo_xlib_xcb_device_create (dpy, xcb->device),
-			 xcb->content);
+			 xcb->content,
+			 FALSE); /* is_vector */
 
     /* _cairo_surface_init() got another reference to the device, drop ours */
     cairo_device_destroy (surface->base.device);


More information about the cairo-commit mailing list