Re: [AD] System bitmap bug (fix)

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


> This patch (applied) fixes a crash bug related to user programs using
> system bitmaps on graphic drivers that don't support system bitmaps
> (namely, AllegroGL).

This shoudn't lead to a crash in the first place. If the driver doesn't 
support system bitmaps, Allegro should be able to automatically piggy back 
on the memory bitmaps engine. If this is not the case, the bug is in the 
piggyback code.

What are the circumstances of the crash?

> If create_system_bitmap() fails, it (according to the docs) should
> create a memory bitmap instead.

That's not the exact wording. Quoting the docs:
" Not every platform implements this type of bitmap: if they aren't 
available, create_system_bitmap() will function identically to 
create_bitmap()."

My interpretation (and probably the original intent) is that it must pretend 
the bitmap is a system bitmap anyway, i.e calling create_system_bitmap() 
always returns a bitmap for which the BMP_ID_SYSTEM flag is set.

The rationale is that the user-visible behaviour of Allegro should stay the 
same, whatever really happens under the hood.

-- 
Eric Botcazou




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