gfx/cairo/buggy-repeat.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/cairo/buggy-repeat.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +diff --git a/gfx/cairo/cairo/src/cairo-xlib-display.c b/gfx/cairo/cairo/src/cairo-xlib-display.c
     1.5 +--- a/gfx/cairo/cairo/src/cairo-xlib-display.c
     1.6 ++++ b/gfx/cairo/cairo/src/cairo-xlib-display.c
     1.7 +@@ -216,6 +216,8 @@ _cairo_xlib_display_get (Display *dpy)
     1.8 +     XExtCodes *codes;
     1.9 +     int major_unused, minor_unused;
    1.10 + 
    1.11 ++    static int buggy_repeat_force = -1;
    1.12 ++
    1.13 +     /* There is an apparent deadlock between this mutex and the
    1.14 +      * mutex for the display, but it's actually safe. For the
    1.15 +      * app to call XCloseDisplay() while any other thread is
    1.16 +@@ -308,6 +310,26 @@ _cairo_xlib_display_get (Display *dpy)
    1.17 + 	if (VendorRelease (dpy) <= 40500000)
    1.18 + 	    display->buggy_repeat = TRUE;
    1.19 +     }
    1.20 ++
    1.21 ++    /* XXX workaround; see https://bugzilla.mozilla.org/show_bug.cgi?id=413583 */
    1.22 ++    /* If buggy_repeat_force == -1, then initialize.
    1.23 ++     *    - set to -2, meaning "nothing was specified", and we trust the above detection.
    1.24 ++     *    - if MOZ_CAIRO_BUGGY_REPEAT is '0' (exactly), then force buggy repeat off
    1.25 ++     *    - if MOZ_CAIRO_BUGGY_REPEAT is '1' (exactly), then force buggy repeat on
    1.26 ++     */
    1.27 ++    if (buggy_repeat_force == -1) {
    1.28 ++        const char *flag = getenv("MOZ_CAIRO_FORCE_BUGGY_REPEAT");
    1.29 ++
    1.30 ++        buggy_repeat_force = -2;
    1.31 ++
    1.32 ++        if (flag && flag[0] == '0')
    1.33 ++            buggy_repeat_force = 0;
    1.34 ++        else if (flag && flag[0] == '1')
    1.35 ++            buggy_repeat_force = 1;
    1.36 ++    }
    1.37 ++
    1.38 ++    if (buggy_repeat_force != -2)
    1.39 ++        display->buggy_repeat = (buggy_repeat_force == 1);
    1.40 + 
    1.41 +     display->next = _cairo_xlib_display_list;
    1.42 +     _cairo_xlib_display_list = display;

mercurial