Re: [AD] clipping line algorithm

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


Eric Botcazou wrote:
I'm sorry, but what do you mean by that last sentence? If you mean "use
vtable by default, but as a special case use bmp_read* if the BITMAP
supports that", then I'm with you, that's what I wanted all the time.
Otherwise, please explain what you mean...

No trickery with flags or something like that. We test the signature of the method (aka its address) and, if we recognize it, we can optimize provided that certain conditions are met.

Do you mean we should replace the current implementation of is_linear_bitmap() by

   return (bmp->vtable->putpixel == _linear_putpixel8) ||
          (bmp->vtable->putpixel == _linear_putpixel15) ||
          (bmp->vtable->putpixel == _linear_putpixel16) ||
          (bmp->vtable->putpixel == _linear_putpixel24) ||
          (bmp->vtable->putpixel == _linear_putpixel32);

?

Sven





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