diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-27 15:20:57 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-27 15:20:57 -0800 |
commit | 51ae20febe99a15e2ebfc1145ba29e92a0f81792 (patch) | |
tree | 21e6221948f029a8e46bd1b388c71e6fb1796955 | |
parent | a5243b43651a44df897537f1ee4b45f4a7c6350e (diff) |
silence poppler stdout output, so it is suitable as a benchmark
-rw-r--r-- | tests/poppler/utils/pdftoppm.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/poppler/utils/pdftoppm.cc b/tests/poppler/utils/pdftoppm.cc index f600e5ba..4df0f5d8 100644 --- a/tests/poppler/utils/pdftoppm.cc +++ b/tests/poppler/utils/pdftoppm.cc @@ -183,6 +183,10 @@ static void savePageSlice(PDFDoc *doc, bitmap->writePNMFile(ppmFile); } } else { +#if EMSCRIPTEN // XXX EMSCRIPTEN: avoid writing to stdout, better for benchmarking + printf("avoiding writing to stdout\n"); +#else + #ifdef _WIN32 setmode(fileno(stdout), O_BINARY); #endif @@ -194,6 +198,7 @@ static void savePageSlice(PDFDoc *doc, } else { bitmap->writePNMFile(stdout); } +#endif } } |