Re: [AD] System bitmap bug (fix) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Eric Botcazou wrote:
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?
blit(fake_system_bitmap, screen, ...);
The blit code checks for the presence of a system bitmap, then calls the
system bitmap vtable entries.
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.
Ah, I see. This seems like an overkill though, as having a simple memory
bitmap (with no special flags) seems like the simplest and less
bug-prone option.
--
- Robert Jr Ohannessian
http://bob.allegronetwork.com/