Re: [AD] About the speed of flat polygon primitives |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
> I made a proposal: adding a new field to the GFX_VTABLE structure, namely > > AL_METHOD(void, hfiller, (struct BITMAP *bmp, int x1, int y, int x2, > int color)); The patch is attached (the new method is dubbed hfill() because there are already rectfill, circlefill and so on). It has been tested under DOS, Windows and Linux/X11. For hardware-accelerated drivers (DirectDraw, DGA2, BeOS), the patch doesn't modify anything so that the hfill() method is connected to the software drawing routine by default (that's of course what was intended under Windows). Here are some results under Windows: DirectDraw accel vs DirectDraw soft Before: putpixel() = 99% hline() = 121% vline() = 132% line() = 99% rectfill() = 565% circle() = 100% circlefill() = 13% ellipse() = 100% ellipsefill() = 15% arc() = 99% triangle() = 13% After: putpixel() = 98% hline() = 117% vline() = 134% line() = 99% rectfill() = 506% circle() = 100% circlefill() = 99% ellipse() = 99% ellipsefill() = 99% arc() = 99% triangle() = 99% Further testing is needed for the BeOS and DGA2 drivers. -- Eric Botcazou ebotcazou@xxxxxxxxxx
Attachment:
hfill.zip
Description: Zip compressed data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |