RE: [AD] acquire_bitmap weirdness

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


This will likely have very negative performance repercussions if all
functions between acquire/release are hardware accelerated.

Allegro apps can't know if the functions they'll call will be
accelerated or not, and they certainly can't know it for all platforms
that Allegro can and might support. In addition, some operations may not
be hardware accelerated yet require the bitmap to be unlocked (DDraw's
BltFast is one of them).

The real solution is d): deprecate acquire/release_bitmap, make them do
nothing in Windows (what about on X11?), then implement all the Allegro
functions using the DDraw portion of the API that does not require
locking.

Everything could be done this way, except perhaps for direct video
bitmaps access and blending. Direct bitmap access can be done via the
"Allegro 5" proposed API. I'm not entirely sure how to deal with
blending. That said, blending is already "known to be slow", to making
it slower shouldn't affect things very much...




> -----Original Message-----
> From: alleg-developers-admin@xxxxxxxxxx [mailto:alleg-
> developers-admin@xxxxxxxxxx] On Behalf Of Peter Wang
> Sent: Friday, December 30, 2005 6:07 PM
> To: alleg-developers@xxxxxxxxxx
> Subject: Re: [AD] acquire_bitmap weirdness
> 
> On 2005-12-30, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> > I was just trying to update a docs patch from some time ago for
> > acquire_bitmap, in response to the mouse freezing thread, but I'm
not
> > sure if that is enough.. acquire_bitmap just seems really weird.
> 
> One reason I never bother to use it.
> 
> > c) Make the behavior sane. What I mean is shown by the example code
> > sequence from allegro.cc:
> ...
> > I would change the behavior to this:
> >
> > // My proposed behavior
> > acquire_bitmap(buffer_for_page_flipping);      // bitmap is locked
> > clear_to_color(buffer_for_page_flipping, 0);   // bitmap is
implicitly
> unlocked and locked
> > circle(buffer_for_page_flipping, ...);         // -
> > line(buffer_for_page_flipping, ...);           // -
> > putpixel(buffer_for_page_flipping, ...);       // -
> > release_bitmap(buffer_for_page_flipping);      // bitmap is unlocked
> >
> > I.e., acquire_bitmap would be the *only* way to permanently lock a
> > bitmap, and release_bitmap would be the *only* way to permanently
unlock
> > a bitmap.
> 
> This is the behaviour I expect as well.  I would go for c).
> 
> Peter
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers




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