Re: [AD] clipping line algorithm |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Eric Botcazou wrote:
But if _putpixel() is more efficient, we can test the bitmap type to see if it allows for _putpixel(), and only otherwise use bmp->vtable->putpixel(). I think the correct test would be if (is_linear_bitmap(bmp) && _drawing_mode == DRAW_MODE_SOLID) use _putpixel else use bmp->vtable->putpixelI guess Bob would not be exactly pleased by that. :-)How do you deal with special screen bitmaps (like that of AllegroGL) that use a custom vtable?
Not sure I understand what you mean: the current code uses bmp->vtable->putpixel, so that should be fine. My suggestion is to detect the special cases where it is possible to use _putpixel, and these cases don't include special screen bitmaps. So for special screen bitmaps, the behaviour would be unchanged. For bitmaps obtained from create_bitmap(), or for the linear VGA screen, it would be faster.
-- Sven
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |