Added ifdef to force fast (less compressed) PNG rendering only when asked.

This commit is contained in:
Michael Jumper 2011-03-20 23:02:28 -07:00
parent b16eda0d48
commit 18e01ee74c

View File

@ -330,11 +330,13 @@ int guac_send_png(GUACIO* io, int layer, int x, int y, png_byte** png_rows, int
return -1; return -1;
} }
#ifdef GUAC_FAST_PNG
/* Do not filter (speed) */ /* Do not filter (speed) */
png_set_filter(png, PNG_FILTER_TYPE_BASE, PNG_FILTER_VALUE_NONE); png_set_filter(png, PNG_FILTER_TYPE_BASE, PNG_FILTER_VALUE_NONE);
/* Fast compression level */ /* Fast compression level */
png_set_compression_level(png, 1); png_set_compression_level(png, 1);
#endif
/* Set error handler */ /* Set error handler */
if (setjmp(png_jmpbuf(png))) { if (setjmp(png_jmpbuf(png))) {