gfx/cairo/handle-a1.patch
author Ryan VanderMeulen <ryanvm@gmail.com>
Fri, 01 Sep 2017 15:37:08 -0400
changeset 430269 1d02aa80f2f8c283428f0a8a6310e7d1fec3936c
parent 40464 2b9a4c865737a743e89d81ccff6931abd5ea6137
permissions -rw-r--r--
Backed out 9 changesets (bug 1383880) for decision task bustage. Backed out changeset 53f5d47a7cb0 (bug 1383880) Backed out changeset a0abda41172a (bug 1383880) Backed out changeset 729a7e2091e8 (bug 1383880) Backed out changeset a33f5a14a471 (bug 1383880) Backed out changeset 5b10d321cfee (bug 1383880) Backed out changeset 8056488d8aed (bug 1383880) Backed out changeset e62c90e3c1e8 (bug 1383880) Backed out changeset 91f116ce6c2a (bug 1383880) Backed out changeset 045498bc36c4 (bug 1383880)

commit 82aab44a9005047743538d52e9fbc27fd6ce408a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Mar 19 17:23:20 2010 -0400

    commit f07195860620959c27d43080a7b987e28222735a
    
        xlib: Handle a1 image uploads through converter
    
        Fixes test/large-source [xlib]

diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 1a053d0..8f773b0 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -1155,7 +1155,9 @@ _draw_image_surface (cairo_xlib_surface_t   *surface,
 		int dither_adjustment = dither_row[x_off];
 		int a, r, g, b;
 
-		if (image_masks.bpp <= 8)
+		if (image_masks.bpp == 1)
+		    in_pixel = !! (((uint8_t*)row)[x/8] & (1 << (x & 7)));
+		else if (image_masks.bpp <= 8)
 		    in_pixel = ((uint8_t*)row)[x];
 		else if (image_masks.bpp <= 16)
 		    in_pixel = ((uint16_t*)row)[x];