[cairo] Bringing back the dead... RGB16_565

Oleg Romashin romaxa at gmail.com
Thu Mar 18 04:51:29 PDT 2010


Added CAIRO_MUTEX_UNLOCK before return NULL if visual is not found
Fixed small indentation problem.


On Wed, Mar 17, 2010 at 10:56 PM, Oleg Romashin <romaxa at gmail.com> wrote:

>
>
> 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/20100318/f809a383/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo16bpp.diff
Type: text/x-diff
Size: 8497 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100318/f809a383/attachment-0001.diff>


More information about the cairo mailing list