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

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


On 2010-08-12, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> The attached patch removes the following four functions from the bitmap
> interface. They are instead implemented with transformations.
> 
> vt->draw_bitmap 
> vt->draw_scaled_bitmap
> vt->draw_rotated_bitmap
> vt->draw_rotated_scaled_bitmap
> 
> This simplifies the OpenGL and D3D drivers somewhat since they have
> fewer functions to implement now. In practice both already cheated by
> simply calling the same function from each vtable entry so it's not a
> big gain.
> 
> The patch also removes the memory versions corresponding to those vtable
> entries, using only transformed version instead. This simplifies the
> higher level code a lot since with neither specialized vtable entries
> not memory implementations the only remaining vtable entry and memory
> function is:
> 
> vt->draw_bitmap_region
> 
> Likely in the case of the mem functions that means reduced performance -
> so not sure if we should apply that latter part. This is what simplifies
> the code most though so I think it would be worth it.

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




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