[AD] [WIN] windowed driver patch |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Hi, I've tried to improve the dirty rectangles mechanism used in the refreshing process by the DirectDraw windowed driver: the drawing calls are now, as much as possible, grouped and there is no more need for entire window updates. The best results are achieved with non hardware-accelerated block-blitting functions: Allegro 3.9.34 (CVS), Mingw32 profile results (ATI Xpert@xxxxxxxxxx 98 AGP) Graphics driver: DirectDraw window Description: DirectDraw window Screen size: 640x480 Virtual screen size: 640x480 Color depth: 15 bpp Hardware acceleration: solid scanline fills solid area fills vram->vram blits masked vram->vram blits system->vram blits masked system->vram blits DRAW_MODE_SOLID results: 3.9.34 3.9.34++ putpixel() - 5317 5426 hline() - 7002 6946 vline() - 6656 6830 line() - 305 1882 rectfill() - 5147 5148 circle() - 295 1373 circlefill() - 89 123 ellipse() - 291 1286 ellipsefill() - 84 118 arc() - 298 1892 triangle() - 85 114 Other functions: textout() - 300 3103 vram->vram blit() - 5426 5451 aligned vram->vram blit() - 5533 5525 blit() from memory - 261 1791 aligned blit() from memory - 265 1937 vram->vram masked_blit() - 5356 5334 masked_blit() from memory - 261 1859 draw_sprite() - 295 2242 draw_rle_sprite() - 294 2313 draw_compiled_sprite() - 297 2409 draw_trans_sprite() - 266 1235 draw_trans_rle_sprite() - 263 1199 draw_lit_sprite() - 286 1730 draw_lit_rle_sprite() - 284 1738 However, in real world games, the speed improvement may be less obvious, heavily depending on the animation method: Allegro demo game, 640x480 15bpp window (color conversion - MMX disabled) 3.9.34 3.9.34++ double buffering 12 33 page flipping 50 50 triple buffering 34 48 dirty rectangles 60 60 BtW, I've also added a new description string to the driver (a la X-Window). -- Eric Botcazou (ebotcazou@xxxxxxxxxx) Web Site: http://www.multimania.com/ebotcazou
Attachment:
wd_patch2.zip
Description: Zip compressed data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |