Subject: Re: kern/35739: recent addition of RASOPS_ROTATION breaks wsfont
To: None <netbsd-bugs@netbsd.org>
From: Miod Vallat <miod@online.fr>
List: netbsd-bugs
Date: 02/21/2007 22:29:03
>>Description:
> The RASOPS_ROTATION stuff breaks the wsfont abstraction, since callers now
> mess with the font data on their own. If I recall, this means fonts in use
> by other displays can have their glyphs changed.

No, they don't. Rotation is done in wsfont and in a copy of the original
font data. Rasops maintains a list of (normal, rotated) font cookies
tuples, in order to avoid requesting the same rotated font from wsfont
twice.

>>How-To-Repeat:
> Code inspection

You might want to read it again.

>>Fix:
> rasops shouldn't mess with the font data. The 'rotation' should be another

It doesn't.

> attribute encoded in the cookie returned by wsfont_find(), and if the font
> needs to be rotated it should be done by wsfont_lock(), not the caller. Once
> that's done, the rotation code in wsfont shouldn't be conditionalized - it's
> small enough.

This looks indeed like a good way to fold this code in the existing
interfaces.