On Sun, Feb 24, 2008 at 05:13:48AM +1300, Ralph Versteegen wrote:
> Top posting bonanza!
> 
> >From what I gather, to get hardware accelerated scaling of bitmaps, it
> seems we would have to go all the way to OpenGL. But if we abstracted
> graphics sprites a bit more, it would probably still be much much
> faster to use SDL's (and fbgfx's?) software blitting.
> 
> It should only take a couple minutes to improve the slow loops inside
> gfx_showpage and drawohr significantly (why hasn't anyone bothered?
> The comments even mention what's wrong). As for sprite_draw... well,
> amazingly
>       spix = (int((ty-syfrom) / scale) * .w) + int((tx-sxfrom) / scale)
> translates into only 43 instructions! And an example of the mess -exx causes:
>       sptr[pix] = pal->col(.image[spix])
> also in the same inner loop, generates 3 calls to [EMAIL PROTECTED]
> and one to [EMAIL PROTECTED]

I'll take a shot at it (unless you are already)

When I compile with -profile, gprof tells me that 46% of the time is 
spent in drawohr (25% when -exx is enabled)

----------------------
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  ms/call  ms/call  name    
 46.12      1.07     1.07    56450     0.02     0.02  DRAWOHR
 27.16      1.70     0.63    30768     0.02     0.02  GRABRECT
  8.19      1.89     0.19      309     0.61     0.61  GFX_SHOWPAGE
  4.74      2.00     0.11     1000     0.11     0.13  DRAWSPRITEX
  3.02      2.07     0.07                             
blit8to32BGR_x_loop
  1.72      2.11     0.04   255633     0.00     0.00  READBLOCK
  1.72      2.15     0.04                             fb_DevFileRead
  1.72      2.19     0.04                             fb_FileGetDataEx
[clipped]


---
James Paige
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to