Re: padding cleanup

On Sun, Sep 12, 2010 at 6:21 AM, Havoc Pennington <hp pobox com> wrote:
> Something that occurred to me mid-bisect is that with Benjamin's
> draw() work, it would probably be straightforward to write the
> following test program:
> * instantiate every widget type in GTK (or even various modes of every
> widget type, like different text styles, wrap or not, padding/border
> or not, etc.)
> * dump a giant directory of PNGs representing the paint of every one
> of those in every GtkStateType
Uh, you've found out about one of my secret projects. Actually, what
I'm aiming at is reftests (see for
a description). They are independant of font settings, themes etc if
done right.

A big problem with comparing a rendering to a default image - unless
you do it manually, and then you won't find a lot of issues like 1px
offsets - is that so many things can change that you do not have under
control that end up screwing up your comparisons. Even perceptual
diffs don't help you there. Cairo's test suite works like this
(comparing renderings to a reference image), and we have often have to
regenerate  images for new versions of pixman, freetype or even the
Deja Vu fonts. And every time we do that, it's a tedious manual
process because we have to make sure that the images are at still
correct. We also often have to keep reference images for all the
different surface types because font or gradient rendering algorithms
differ from OS X to Linux or even from Cairo's image surface to X.
So I'd strongly recommend not comparing to reference images if you can avoid it.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]