Re: [AD] RE: [AD] RLE clipping speedup patch

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


On 2002-09-09, Vincent <Vincent.Penquerch@xxxxxxxxxx> wrote:
> > This looks like the only downside, so it would probably be okay to
> > drop `get_rle_sprite_ex'.
> 
> Sounds sensible.

I looked at your patch again, and now I'm thinking it's _criminal_ to do
without the lines array ;-)  O(n) to find the first line...

> Would you want to keep the old clipping code
> intact, in case someone actually needs it 

It shouldn't be necessary, right?  I only glanced at the code, so I
don't know.

> (eg if building RLE sprites by hand for some reason) ?

Does anyone do this?


(from previous post)
> So I added a lines pointer to the RLE struct, so top and right
> clipping is in O(1) now (related to the sprite's width). eg, it
> doesn't need to trace the sprite data to find the next line.

AFAICS the code under the "Clip right." comments are still O(n).
Am I missing something?

-- 
王浩禎



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