[cairo-bugs] [Bug 43397] EXTEND_NONE is used instead of EXTEND_PAD when src sample area is entirely within the surface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jan 23 06:24:29 PST 2012


--- Comment #35 from Michel Dänzer <michel at daenzer.net> 2012-01-23 06:24:29 PST ---
(In reply to comment #29)
> Please notice that this change is *NOT* observable from outside Cairo in any
> way.

Other than being orders of magnitude slower in some cases. ;)

> In the first case this happens because, since any of
> Repeat{None,Pad,Reflect,Normal} would produce the same result, Cairo goes for
> the default one, hoping/expecting that defaults are optimized as much as
> possible in the underlying layers.

Well, again, that's flawed in the case of RepeatNone. Its being default is an
accident at best.

(In reply to comment #34)
> commit ff258ac2783203ed2a7698894d951391d1aecebc
> Author: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> Date:   Thu Oct 6 23:45:29 2005 +0000
>     Clients tend to set picture->repeat when not necessary. Most HW cannot
>         accelerate repeat NPOT thus triggering software fallback (this is the
>         case with gnome desktop for example). This adds a simple optimisation
>         to exa that removes "repeat" when it's obviously useless, that is, the
>         single picture instance covers the entire rectangle beeing used
> If it does not matter, it sets the "repeat" field to 0, which implies that the
> repeatType is RepeatNone.

Hmm, that code was intended to avoid RepeatNormal, which older hardware cannot
handle with non-power-of-two sources. It should also try RepeatPad before

It looks like there's still some code in exa_render.c that treats pSrc->repeat
as RepeatNormal without checking pSrc->repeatType...

> I am now working on a patch which detects if "any" repeat mode is ok and in
> this case it tries to perform the compositing with every available repeat mode
> until one succeeds.

With transformed (and arguably also untransformed) sources, this test should
only be performed if the driver seems unable to handle the specified repeat
mode in the first place, to avoid adding more of the same overhead madness this
bug report is about.

> The reason for this is that I'm trying to only fix exaComposite, leaving
> exaCompositeRects alone.

exaCompositeRects is only called from exaGlyphs, I don't think it's relevant
for this.

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.

More information about the cairo-bugs mailing list