Bug 41535 - pseudocolor dosn't work in cairo (1.10.2)
Summary: pseudocolor dosn't work in cairo (1.10.2)
Alias: None
Product: cairo
Classification: Unclassified
Component: xlib backend (show other bugs)
Version: 1.10.2
Hardware: Other All
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
Depends on:
Reported: 2011-10-06 12:34 UTC by Martin Hoehle
Modified: 2012-02-09 11:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Martin Hoehle 2011-10-06 12:34:48 UTC
An old problem comes as new:
The pseudo color implementation dosn't work.

after the following change the colors will work at least in cairo 1.10.2:

In File cairo-xlib-surface.c change:

else if ((image_masks.alpha_mask == surface->a_mask || surface->a_mask == 0) &&
         (image_masks.red_mask   == surface->r_mask || surface->r_mask == 0) &&
         (image_masks.green_mask == surface->g_mask || surface->g_mask == 0) &&
         (image_masks.blue_mask  == surface->b_mask || surface->b_mask == 0))


else if ((image_masks.alpha_mask == surface->a_mask ) &&  
         (image_masks.red_mask   == surface->r_mask ) &&
         (image_masks.green_mask == surface->g_mask ) &&
         (image_masks.blue_mask  == surface->b_mask ))

solves the problem
Comment 1 Chris Wilson 2012-02-09 11:54:11 UTC
Should have been fixed with:

commit 8996287d94b159c922282e0b6434b0637f8f32aa
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Jun 25 20:02:47 2011 +0100

    xlib: Create an exact match for the image surface if possible using Xrender
    In order to defer the pixel conversion till as late in the pipeline as
    possible, we want to try and preserve the pixman image format whilst
    uploading the pixel data. To do this, we want to create an XRender
    surface with a matching PictFormat to the source image. Then we need to
    make sure we take the quick path through _draw_image_surface for none
    and direct conversions.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.