Re: [AD] No more video/system bitmaps |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2005-05-31, Robert Ohannessian <ROhannessian@xxxxxxxxxx> wrote:
> > I wonder if it would be simpler to have an explicit call like
> > al_define_bitmap(). Promotion/demotion would only happen at those
> > calls, and only to the bitmap for which it was called. Otherwise I'm
> > afraid al_flip_display() may have too much work to do on some frames.
>
>
> How about making bitmap operations update the usage counters of that
> bitmap, Then, if they're above some threshold, register it in some
> fixed-size (32?) list of bitmaps to promote/demote. al_flip_display()
> can then just look at those bitmaps and move them around in memory.
Maybe. You would need something like a priority queue in order to find
out which bitmap to demote, right?
I'm not sure why migration has to be done at al_flip_display() though.
It would be more orthogonal to have a separate function to migrate
bitmaps, although it's extra work for the user.
Peter