compositing: minor optimizations
authorAndrew Chadwick <andrewc-git@piffle.org>
Sat, 17 Mar 2012 15:26:51 +0000 (15:26 +0000)
committerAndrew Chadwick <andrewc-git@piffle.org>
Sun, 18 Mar 2012 16:47:13 +0000 (16:47 +0000)
commit0d0af20edf9d84655f99f1639643208bb38a41b0
treef3577c1017ba80668203c1b3c946ae66720bee19
parent27c0757e4057c157f31e0a5d364163eb02e0ba44
compositing: minor optimizations

Some macro-based optimisations. Not really a single code path now, but
both the RGBU and RGBA versions are at least defined in the same place.
Also use bitshifts instead of divs; conditional compilation of certain
sections. Slight win vs. master:

memory_zoomed_out_5x            <1%
scroll_nozoom                       -3%
paint_rotated                       -1%
scroll_zoomed_out_1x_onelayer   <1%
save_png                            -2%
startup                         <1%
memory_after_startup            <1%
scroll_zoomed_out_2x_onelayer   <1%
brushengine_paint_hires         <1%
paint                               -2%
save_ora                        <1%
scroll_zoomed_out_5x                -1%
layerpaint_nozoom                   -2%
paint_zoomed_out_5x             <1%
scroll_nozoom_onelayer              -2%
layerpaint_zoomed_out_5x        <1%
save_png_layer                  <1%
save_ora_again                      -1%
load_ora                        <1%
lib/composite.hpp [new file with mode: 0644]
lib/composite_rgbx.hpp [new file with mode: 0644]
lib/pixops.hpp