[Pixman] [PATCH 4/8] Better support for NONE repeat in nearest scaling main loop template
Bill Spitzak
spitzak at gmail.com
Thu Feb 10 11:08:33 PST 2011
It sounds to me like you are proposing that a binary zero-or-source
decision be made for each pixel in the output space. I don't think this
will work.
The pixel sampling of the source needs to do this, otherwise filtering
cannot be used to produce an antialiased edge where the image
transitions to NONE.
Soeren Sandmann wrote:
> Siarhei Siamashka <siarhei.siamashka at gmail.com> writes:
>
>> From: Siarhei Siamashka <siarhei.siamashka at nokia.com>
>>
>> Scaling function now gets an extra boolean argument, which is set
>> to TRUE when we are fetching padding pixels for NONE repeat. This
>> allows to make a decision whether to interpret alpha as 0xFF or 0x00
>> for such pixels when working with formats which don't have alpha
>> channel (for example x8r8g8b8 and r5g6b5).
>
> Another way to do this would be to clip away zeros up front for source
> images. For example, a new function pointer could be added to the
> image struct:
>
> clip_zeros (pixman_image_t *image, pixman_region_t *region)
>
> that would clip away those parts of region where the image is known to
> be zero. Then, in pixman.c, this function could be called for both
> source and mask if the operator was one where zeros had no effect.
>
> That would benefit all operations and avoid cluttering these
> macros. It would also cause the SAMPLES_COVER_CLIP to be set in more
> cases.
>
> I'm fine with this patch as is too though.
>
>
> Soren
> _______________________________________________
> Pixman mailing list
> Pixman at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pixman
More information about the Pixman
mailing list