[cairo] Bringing back the dead... RGB16_565

Oleg Romashin romaxa at gmail.com
Wed Mar 17 13:56:52 PDT 2010


On Wed, Mar 17, 2010 at 8:03 PM, Soeren Sandmann <sandmann at daimi.au.dk>wrote:

> Oleg Romashin <romaxa at gmail.com> writes:
>
> > Updated cairo 16bpp format support patch:
> > https://bugs.freedesktop.org/attachment.cgi?id=34084&action=edit
> >
> > 1)  Removed CAIRO_CONTENT_COLOR16
> > 2) Fixed rendering from 16bpp image surface -> 16bpp Xlib surface
> >
> > Can we get this version into upstream?
>
> In this:
>
> +           Visual *visual = NULL;
> +           Screen *screen = DefaultScreenOfDisplay(display->display);
> +           int j;
> +           for (j = 0; j < screen->ndepths; j++) {
> +               Depth *d = &screen->depths[j];
> +               if (d->depth == 16 && d->nvisuals && &d->visuals[0]) {
> +                   visual = &d->visuals[0];
> +                   break;
> +               }
> +           }
>
> don't you need to check that the visual is (a) the right class and (b)
> the masks are actually 565 and not, say, 655?
>

Is this version better: ?
https://bugs.freedesktop.org/attachment.cgi?id=34161&action=edit

Br, Oleg


>
>
> Soren
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100317/ba10ccb9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo_best.diff
Type: text/x-diff
Size: 8316 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100317/ba10ccb9/attachment.diff>


More information about the cairo mailing list