[cairo] [PATCH] pixman: Implement PIXMAN_REPEAT_REFLECT for images

Soeren Sandmann sandmann at daimi.au.dk
Fri Feb 6 17:06:07 PST 2009


Thomas Jaeger <thjaeger at gmail.com> writes:

> Sorry, I missed a special case that is present in git but not in 0.13.2.
> An updated patch is attached.
> 
> Thomas Jaeger wrote:
> > In the case of EXTEND_REFLECT, it won't work at all unless the driver
> > accelerates it, since pixman currently doesn't have support for REFLECT
> > at all.  I've attached a patch that addresses the issue (hope this is
> > the right mailing list).  Caveats: I wasn't familiar with the pixman
> > source.  When it didn't work right away after changing
> > pixman-transformed.c, I simply made sure that REFLECT uses the same path
> > as PAD everywhere.  This isn't very well-tested (I basically just tested
> >  [2]) and there's probably room for optimization, but I doubt REFLECT is
> > used very much anyway.
> > 
> > 
> > Zack Weinberg wrote:
> >> ... because whether or not Render's equivalent of
> >> EXTEND_PAD/EXTEND_REFLECT actually *work* is dependent on the exact
> >> version of your X server and video drivers.  Render protocol 0.10 isn't
> >> good enough.  There are some cairo-only test cases in [2].
> >>
> >> [2] https://bugzilla.mozilla.org/show_bug.cgi?id=468496
> > 
> 
> From 8286d11e5e42f9f16780519195724ceca496df43 Mon Sep 17 00:00:00 2001
> From: Thomas Jaeger <ThJaeger at gmail.com>
> Date: Tue, 20 Jan 2009 18:40:46 -0500
> Subject: [PATCH] Implement PIXMAN_REPEAT_REFLECT for images

Looks good to me, pushed.

This hack from cairo-pattern.c:

    /* XXX: Hack:
     *
     * The way we currently support CAIRO_EXTEND_REFLECT is to create
     * an image twice bigger on each side, and create a pattern of four
     * images such that the new image, when repeated, has the same effect
     * of reflecting the original pattern.
     */

can now be removed with a dependency on pixman 0.15.1



Thanks,
Soren


More information about the cairo mailing list