srsa_4c
One detail I'm not happy with is the vid_bitmap_refresh() implementation. This function is now called at least 10 times a second and it writes 2 entries in camera log. This is normally not a problem, except when it takes away space from useful log content. My attempts to find a suitable replacement failed so far.
vid_bitmap_refresh should only get called if CHDK has changed something on its draw layer.
If you are frequently drawing something on the screen then it will trigger vid_bitmap_refresh calls.
One problem area I know of at the moment is the CHDK icons for battery, file space and USB.
The icon commands overdraw the same pixels with different colours which triggers an update even though the end result is the same as the previous frame.
I'm looking at adding an intermediate buffer to render the icons before drawing them on the screen which should reduce this overhead.