[Pixman] [PATCH 1/4] Change conditions for setting FAST_PATH_SAMPLES_COVER_CLIP flags

Bill Spitzak spitzak at gmail.com
Mon Sep 14 17:24:45 PDT 2015

On Mon, Sep 14, 2015 at 11:52 AM, Søren Sandmann <soren.sandmann at gmail.com>

> A separate possibility is a flag that says "all pixels whose weights are
> non-zero are inside the borders of the source image". Is this useful
> information? It might be, and if so, it could be conveyed through some
> new flag, though I'd echo Siarhei's comment about whether this is
> something that happens in practice.

I believe this *is* what happens in practice, much more often.

The clip regions are not random, they are chosen by programmers for
specific purposes. One thing that is wanted is to scale images up and
preserve sharp edges. In Cairo this requires trimming the partial pixels
off the edge. This will produce a clip that will turn on this flag. The
alternative version of the flag will require the program to clip off at
least one opaque pixel from two edges for scale factors less than 2. There
is far less reason for a program to do that.

Therefore I think this version of the flag will actually be used far more
often, easily making up for the expense of adding the test for the
zero-weight pixel to the bilinear fast paths.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20150914/4ba34cfa/attachment.html>

More information about the Pixman mailing list