[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Curious regression in ftview on MacOS X
From: |
Werner LEMBERG |
Subject: |
Re: [Devel] Curious regression in ftview on MacOS X |
Date: |
Mon, 13 Dec 2004 07:26:31 +0100 (CET) |
> I saw this problem awhile back when I was adding rgb32 support to
> the mac version of the graphics surface, and found it to be due to
> the assumption in the existing mono- and gray-to-RGB32 code that RGB
> bytes are stored first, with the unused byte following (i.e. RGBx).
> Since on MacOS X, the GDI requires that for RGB32, the unused byte
> must come first (i.e. xRGB), the easiest solution was to offset the
> MacOS X GDI base address by -1; [...]
>
> Well, now 256-gray glyphs are rendered with the GBlender code, which
> is very nice, but its code stores RGB32 as xRGB already, so my GDI
> offset is wrong for that case.
>
> However, the original mono-to-RGB32 conversion is still used when
> antialiasing is turned off, which still assumes an RGBx alignment.
>
> So we probably ought to resolve this; suggestions?
What about a union and macros to access its elements? Can you provide
a patch?
> PS.: There are two bugs in grblit.c:blit_mono_to_rgb32(), lines 453
> and 459, which should be "_read++", without which the
> non-antialiased glyph doesn't render properly anyway; my apologies
> for not having noticed this when submitting the original patch.
Applied, thanks.
Werner