[cairo] problem painting 0 into 1-bit surfaces

Holger Hans Peter Freyther holger at freyther.de
Mon Nov 8 14:55:47 PST 2010


On 11/08/2010 11:51 PM, Holger Hans Peter Freyther wrote:

> If there is any interest, I can run a git bisection from 1.8 to 1.10 and see
> where it broke, also 1.8 is going through a different path, when I see it
> correctly not ending in pixman_fill at all.

The below is 'fixing' my issue. I have no idea about the performance impact of
this change and if it is faster/slower than cairo-1.8 or if i make other parts
slower...

diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 09248f8..6c908ef 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -2551,6 +2551,9 @@ pattern_to_pixel (const cairo_solid_pattern_t *solid,
                  pixman_format_code_t format,
                  uint32_t *pixel)
 {
+    if (format == PIXMAN_a1)
+         return FALSE;
+
     if (op == CAIRO_OPERATOR_CLEAR) {
        *pixel = 0;
        return TRUE;


More information about the cairo mailing list