On Thu, 27 Feb 2003, Kendall Bennett wrote:
> Keith Packard <[EMAIL PROTECTED]> wrote:
>
> > I think the interfaces currently provided by XAA will probably remain
> > usable, so you might as well implement them.
>
> Ok.
>
> > Plus, we should have XAA expose special higher level functions for
> > glyph rendering to the driver so that the graphics card can use the
> > higher level data structures to speed this operation, rather than
> > having the MI layer break the text operation into a (long) sequence
> > of primitive Composite operations.
What are you guys talking about? XAA already has hooks all over
the place.
>
> Yes, most definitely. The current mechanism is not exactly efficient, and
> in fact is the reason why I want to hook some functions at a higher level
> so we can make this faster.
>
> Also when it comes to rendering text, one of the fastest ways of doing
> this is the way that OS/2 does it. Instead of caching any glyphs in
> offscreen video memory (terribly wasteful of offscreen video memory and
> no faster than using system memory bitmaps), you maintain a single large
> bitmap that matches the physical resolution of the screen (ie: 1280x1024
> mono bitmap). When you need to draw text, you render the text into the
> mono bitmap in software at the necessary place on the screen, and when
> that is done pass the entire bitmap to be drawn to the hardware with a
> clip rectangle that covers just the text you just rendered into the
> bitmap. The clipping is real easy to do in the software setup stages for
> text rendering, and then you can blit the entire string to the hardware
> in one shot.
XAA already does this!!! XAA has never cached glyphs in video ram.
>
> So fast, efficient text could be done in XFree86 if a single function was
> used to transfer an entire bitmap in the driver code (pre-clipping could
> easily be done before the driver code is called), and some high level
> code to maintain and render the glyphs into the pre-allocated large
> bitmap.
>
> > > Also I have been wondering about the accelerated anti-aliased text. Is
> > > all anti-aliased text in XFree86 done via the XRENDER extension and alpha
> > > blits? It is possible to implement accelerated anti-aliased text using
> > > simple 4-8 levels of mono bitmap blits using FreeType (that is what we
> > > used for it in our MGL graphics library).
> >
> > Yes, all AA text is done with the Render glyph operations which
> > are defined in terms of the basic image composition primitive.
> > Once you have hardware acceleration for image compositing, that's
> > going to be a lot faster than any non-standard rendering path.
That's why XAA hooks "Glyphs" and doesn't do it that way.
XAA does not break glyph rendering into the Composite operator.
>
> Granted, if you have hardware alpha blits that will be the fastest way to
> do this. But if you don't have hardware alpha blits (and lots of cards
> supported by XFree86 do not), you can still speed up anti-aliased text
> quite a lot by using a 4 or 8 level scheme using multiple mono bitmaps.
No you can't. This text is ALPHA BLENDED into whatever the background
is. It is not text "ImageText" - ie. it is not an alpha blended string
on top of a solid backing rectangle.
Mark
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel