[cairo-commit] src/cairo-xlib-fallback-compositor.c

Uli Schlachter psychon at kemper.freedesktop.org
Wed Apr 11 12:44:38 PDT 2012


 src/cairo-xlib-fallback-compositor.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 07fc63676dfdaa57ed919ad7be8f59c97c615473
Author: Uli Schlachter <psychon at znc.in>
Date:   Wed Apr 11 21:37:55 2012 +0200

    xlib: Disable fallback compositor with xlib-xcb
    
    When xlib-xcb is enabled, this is just dead code which is never used. Thus, this
    shouldn't hurt. However, this does include cairo-xlib-private.h. Shouldn't be a
    problem? Well, that header contains static inline functions which some compiler
    on Solaris will emit even when they are unused.
    
    This brings us to the real problem: That static inline function refers to a
    function which isn't compiled with xlib-xcb and thus linking fails with
    undefined symbols.
    
    This can be reproduced with GCC by adding a call to
    _cairo_xlib_screen_put_gc(NULL, NULL, 0, 0); to
    _cairo_xlib_fallback_compositor_get.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48489
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-xlib-fallback-compositor.c b/src/cairo-xlib-fallback-compositor.c
index 5391926..7d45cd1 100644
--- a/src/cairo-xlib-fallback-compositor.c
+++ b/src/cairo-xlib-fallback-compositor.c
@@ -42,6 +42,8 @@
 
 #include "cairoint.h"
 
+#if !CAIRO_HAS_XLIB_XCB_FUNCTIONS
+
 #include "cairo-xlib-private.h"
 
 #include "cairo-compositor-private.h"
@@ -52,3 +54,5 @@ _cairo_xlib_fallback_compositor_get (void)
     /* XXX Do something interesting here to mitigate fallbacks ala xcb */
     return &_cairo_fallback_compositor;
 }
+
+#endif /* !CAIRO_HAS_XLIB_XCB_FUNCTIONS */


More information about the cairo-commit mailing list