• 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
..
pixops Loading commit data...
fallback-c89.c Loading commit data...
gdiplus.def Loading commit data...
gdk-pixbuf-animation.c Loading commit data...
gdk-pixbuf-animation.h Loading commit data...
gdk-pixbuf-autocleanups.h Loading commit data...
gdk-pixbuf-buffer-queue-private.h Loading commit data...
gdk-pixbuf-buffer-queue.c Loading commit data...
gdk-pixbuf-core.h Loading commit data...
gdk-pixbuf-csource.c Loading commit data...
gdk-pixbuf-data.c Loading commit data...
gdk-pixbuf-enum-types.c.template Loading commit data...
gdk-pixbuf-enum-types.h.template Loading commit data...
gdk-pixbuf-features.h.in Loading commit data...
gdk-pixbuf-io.c Loading commit data...
gdk-pixbuf-io.h Loading commit data...
gdk-pixbuf-loader.c Loading commit data...
gdk-pixbuf-loader.h Loading commit data...
gdk-pixbuf-macros.h Loading commit data...
gdk-pixbuf-marshal.list Loading commit data...
gdk-pixbuf-pixdata.c Loading commit data...
gdk-pixbuf-private.h Loading commit data...
gdk-pixbuf-scale.c Loading commit data...
gdk-pixbuf-scaled-anim.c Loading commit data...
gdk-pixbuf-scaled-anim.h Loading commit data...
gdk-pixbuf-simple-anim.c Loading commit data...
gdk-pixbuf-simple-anim.h Loading commit data...
gdk-pixbuf-transform.h Loading commit data...
gdk-pixbuf-util.c Loading commit data...
gdk-pixbuf.c Loading commit data...
gdk-pixbuf.h Loading commit data...
gdk-pixdata.c Loading commit data...
gdk-pixdata.h Loading commit data...
gdk_pixbuf.rc.in Loading commit data...
io-ani-animation.c Loading commit data...
io-ani-animation.h Loading commit data...
io-ani.c Loading commit data...
io-bmp.c Loading commit data...
io-gdip-animation.c Loading commit data...
io-gdip-animation.h Loading commit data...
io-gdip-bmp.c Loading commit data...
io-gdip-emf.c Loading commit data...
io-gdip-gif.c Loading commit data...
io-gdip-ico.c Loading commit data...
io-gdip-jpeg.c Loading commit data...
io-gdip-native.h Loading commit data...
io-gdip-png.c Loading commit data...
io-gdip-propertytags.h Loading commit data...
io-gdip-tiff.c Loading commit data...
io-gdip-utils.c Loading commit data...
io-gdip-utils.h Loading commit data...
io-gdip-wmf.c Loading commit data...
io-gif-animation.c Loading commit data...
io-gif-animation.h Loading commit data...
io-gif.c Loading commit data...
io-icns.c Loading commit data...
io-ico.c Loading commit data...
io-jasper.c Loading commit data...
io-jpeg.c Loading commit data...
io-png.c Loading commit data...
io-pnm.c Loading commit data...
io-qtif.c Loading commit data...
io-tga.c Loading commit data...
io-tiff.c Loading commit data...
io-xbm.c Loading commit data...
io-xpm.c Loading commit data...
make-inline-pixbuf.c Loading commit data...
meson.build Loading commit data...
queryloaders.c Loading commit data...
test-gdk-pixbuf.c Loading commit data...
xpm-color-table.h Loading commit data...