Re: [AD] X primitives patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wednesday 04 August 2004 04:18, Chris wrote:
> Attached is a patch that improves the performance of the primitive 
> drawing routines for Allegro's X11 driver, when the screen and X display 
> are in matching depths. What it does is use the X drawing primtiives 
> directly, instead of doing the X equivilant of blit, after drawing onto 
> the memory bitmap screen. The functions I have so far done are putpixel 
> (which has almost doubled in speed), hline/vline (which /have/ more than 
> doubled in speed), rectfill, and clear_to_color (by using X's rectfill). 
> I will try to do more in time.

I haven't tested it yet (I will in a moment and check the drawing mode for 
rectfill while I'm at it), but one question regarding the line algorithm: 
does a line drawn by the X11 primitive look the same as a line drawn by 
Allegro (ie, does it actually select the same pixels)? I think this was an 
issue a while back when Allegro's line drawing code was replaced by a new 
algorithm (see line vs. fastline in the API).
Also, what about these:
-   vtable->blit_to_memory = _xwin_blit_anywhere;
    vtable->blit_from_system = _xwin_blit_anywhere;
-   vtable->blit_to_system = _xwin_blit_anywhere;
?
aren't blit_to_memory and blit_to_system needed anymore with your patch?

As an aside, do you think it's feasable to use a Pixmap as a system bitmap 
in X11? Or are there no benefits to be gained there?

Evert





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/