|Re: [hatari-devel] Is there a need to keep 2 nearly identical functions into hatari ?|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On perjantai 24 helmikuu 2012, Laurent Sallafranque wrote:
> I think there's no really need to keep both render_screen_noZoom and
> render_screen_Zoom functions.
> They both do the same thing, code is nearly identical.
> I can call all the time render_screen_zoom which works in all case.
> It will slow a little when both zoomX and zoomY = 1, but half the time,
> hatari runs with the zoom renderer (every time I'm in 320*xxx for
> example, hatari uses the zoom renderer).
> I think it would be easier to keep only one.
It's OK to me to have just one (some numbers of the slowdown
would be nice though).
There are some optimizations that could be done to the current code:
* Make VIDEL_memset_* functions "static inline" instead
of just "static".
* use a variable instead of regetting bgcolor inside loop:
Uint8/16/32 bgcolor HostScreen_getPaletteColor(0);
(compiler cannot know that it's always the same value.)