Re: [AD] update bitmap drawing after addition of transformations

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


On 2010-08-14, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> On Fri, 2010-08-13 at 10:29 -0400, Pavel Sountsov wrote:
> > > I have not benchmarked it yet, but I imagine the performance loss 
> > will be
> > > significant.  If it is, can we not make the memory draw_bitmap_region
> > > implementation infer the rotate/scale special cases from the 
> > transformation
> > > matrix and call the specialised functions?
> > >
> > > Peter
> > 
> > As Elias said, there are only the pure scaling and identity special 
> > cases that need to be detected. Everything else (rotated/rotated + 
> > scaled/affine) is sent to the parallelogram drawer.
> > 
> 
> Oh, and I also just saw, you already did the same thing as my patch with
> using transformations - except only for memory bitmaps. Anyway, new
> patch attached. This should now detect when the transformation consists
> only of scales and translates and uses the faster memory blitting in
> such cases.

I found a couple of problems (didn't try to debug them)

* run ex_subbitmap, 's' for scaling mode
  When the source subbitmap is outside the parent bitmap there is
  garbage drawn to the destination, and/or an assertion failure.

src/bitmap.c:372: al_lock_bitmap_region: Assertion `y+height <= bitmap->h' failed.

* run ex_scale, press 's' to use memory source bitmap
  A black line sometimes flickers across the screen just under the
  scaled bitmap.

Peter




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