[Pixman] sRGB processing for pixman

Antti Lankila alankila at bel.fi
Sat Jul 28 04:33:56 PDT 2012


Søren Sandmann <sandmann at cs.au.dk> kirjoitti 14.7.2012 kello 12.02:

> Antti Lankila <alankila at bel.fi> writes:
> 
>> From 693af3995b46d531342d68ac83b794113d0a7a90 Mon Sep 17 00:00:00 2001
>> From: "Antti S. Lankila" <alankila at bel.fi>
>> Date: Sun, 10 Jun 2012 22:31:38 +0300
>> Subject: [PATCH] Add support for sRGB surfaces
> 
> This mostly looks good to me. The main highlevel comment I have is that
> I'd like the changes to composite.c and the addition of srgb-test.c to
> happen in separate commits.

Okay. I'll start splitting the work into pieces. I'll submit each as a separate mail/patch as I get the changes done. Here's the first, probably the least controversial change:

>> -    pixman_color_t fill;
>>     color_t expected, tdst, tsrc, tmsk;
>>     pixel_checker_t checker;
>> -    pixman_image_t *solid;
>> -
>> -    /* Initialize dst */
>> -    compute_pixman_color (dst->color, &fill);
>> -    solid = pixman_image_create_solid_fill (&fill);
>> -    pixman_image_composite32 (PIXMAN_OP_SRC, solid, NULL, dst->image,
>> -			      0, 0, 0, 0, 0, 0, dst->size, dst->size);
>> -    pixman_image_unref (solid);
> 
> Where did this initialization go? If this is an unrelated bugfix, it
> should go in its own commit.

I noticed that the image_init() already performed these steps, so it was unnecessary. The dst is always initialized as a real surface instead of a fill thanks to the constant 1 passed as size, but perhaps that was not the case sometime earlier.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-unnecessary-dst-initialization.patch
Type: application/octet-stream
Size: 1025 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20120728/e90379ea/attachment.obj>
-------------- next part --------------


-- 
Antti

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2748 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20120728/e90379ea/attachment.bin>


More information about the Pixman mailing list