diff options
author | Mike Klein <mtklein@chromium.org> | 2017-05-08 19:49:22 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-09 17:54:54 +0000 |
commit | 59da068d6431d8bfc0137f4e5989bbf08cd01091 (patch) | |
tree | 557fb6164536ca657e984b74cfb9610bdd6a1d02 /dm/DM.cpp | |
parent | 94fd06f074016e3ca6a82b88dfdc0ec61d24e67e (diff) |
Tune down libpng in DM.
Timing `out/dm --src gm --config srgb -w foo` on my desktop,
- wall time drops from 3.72 -> 2.17 seconds; and
- CPU time drops from 64.9 -> 27.9 seconds.
So again, close to 2x speedup.
(In exchange, the .pngs of our GMs grow from 57M to 73M.)
Change-Id: I6e2e8c8bda6371e857c8db41ca3119402a9056ae
Reviewed-on: https://skia-review.googlesource.com/16000
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r-- | dm/DM.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1033,6 +1033,8 @@ static bool dump_png(SkBitmap bitmap, const char* path, const char* md5) { png_set_IHDR(png, info, (png_uint_32)w, (png_uint_32)h, 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); + png_set_filter(png, PNG_FILTER_TYPE_BASE, PNG_FILTER_NONE); + png_set_compression_level(png, 1); png_write_info(png, info); for (int j = 0; j < h; j++) { png_bytep row = (png_bytep)(rgba + w*j); |