Re: [hatari-devel] Is there a need to keep 2 nearly identical functions into hatari ? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Thanks for this reply:
It's OK to me to have just one (some numbers of the slowdown
would be nice though).
If nobody is against, I'll remove the rendering_no_zoom one this week.
Thomas, do you agree too (I think you're the one who implemented the 2 functions).
There are some optimizations that could be done to the current code:
* Make VIDEL_memset_* functions "static inline" instead
of just "static".
Ok, I'll do it
* 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.)
I agree here, but later, I'd like to implement the "rasters" (changing of the color of the border0).
I will read the value from a table.
So, I've not created the variable actualy to remove it later.
Laurent
- Eero
Le 26/02/2012 21:19, Eero Tamminen a écrit :
Hi,
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.)
- Eero