• Brion Vibber (personal)'s avatar
    Speed up saving PNGs by skipping a null transform · b83e18e4
    Brion Vibber (personal) authored
    Calling png_set_shift to set the number of significant bits of input
    triggers a transform operation inside libpng which shifts bits around,
    even if it's a null operation of 8 bits to 8 bits.
    
    I measured this slowdown as about 30% of total saving runtime on a
    large 7680x2160 screenshot.
    
    In addition, only 8 bits per channel are supported in gdk-pixbuf so
    this is never actually needed in practice...
    
    Skipping the png_set_shift call altogether doesn't change output and
    speeds it up nicely.
    
    Fixes #90
    b83e18e4
Name
Last commit
Last update
.gitlab/ci Loading commit data...
build-aux Loading commit data...
contrib/gdk-pixbuf-xlib Loading commit data...
docs Loading commit data...
gdk-pixbuf Loading commit data...
po Loading commit data...
tests Loading commit data...
thumbnailer Loading commit data...
.gitlab-ci.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
README.msvc Loading commit data...
gdk-pixbuf.doap Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...