aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-09-16 13:36:12 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-16 13:36:12 -0700
commitd664c21a38de98d8db210c46f7a8c4187f1534da (patch)
treea321b1770987b852dc87f2ef265675dce625ab07 /bench
parent170f90b4576f291879371ecd6ae4bc2b1d85c64a (diff)
nanobench: lazily decode bitmaps from SKPs
This makes it considerably cheaper to run SKP recording benchmarks, without affecting their measurements and without really affecting SKP playback benchmarks at all. On my machine, running out/Release/nanobench --match skp --config nondrendering drops in run time from 6.7s to 2.5s, and the peak RAM usage drops from 129M to 50M. I'm strongly considering making this lazy decoding the default. BUG=skia: R=robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/572933006
Diffstat (limited to 'bench')
-rw-r--r--bench/nanobench.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 67646c2667..eff0b2f782 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -10,6 +10,7 @@
#include "Benchmark.h"
#include "CrashHandler.h"
#include "GMBench.h"
+#include "LazyDecodeBitmap.h"
#include "ProcStats.h"
#include "ResultsWriter.h"
#include "RecordingBench.h"
@@ -450,7 +451,7 @@ public:
return false;
}
- pic->reset(SkPicture::CreateFromStream(stream.get()));
+ pic->reset(SkPicture::CreateFromStream(stream.get(), sk_tools::LazyDecodeBitmap));
if (pic->get() == NULL) {
SkDebugf("Could not read %s as an SkPicture.\n", path);
return false;