Re: [AD] clipping line algorithm

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


Eric Botcazou wrote:
Well, no. Those who put the 'linear' flag (or rather who don't put the 'planar' flag, this is admittedly not very well designed) on their bitmaps are supposed to know what this implies, i.e essentially that the user can call _putpixel() and bmp_write() on them.

But, in my opinion, setting this linear flag doesn't preclude them from wiring a custom vtable, which should be guaranteed not to be bypassed by the first drawing primitive they call.

Huh, sorry but doesn't your second paragraph contradict your first? _putpixel() and bmp_write() are not in the vtable. (And they should not be in the vtable either, because then they cannot be inlined. The reason for anyone to use _putpixel() and bmp_write() is that they are fast, and they are fast because they are inlined.)

So it seems contradictory that users setting the linear flag both:
(1) must count with the possibility that _putpixel()/bmp_write() can be used on it, and (2) can be assured the bitmap is never accessed without going through the vtable.

Me misunderstood you?

/Sven





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