diff options
Diffstat (limited to 'bench/nanobench.cpp')
-rw-r--r-- | bench/nanobench.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 550e0b7744..d475e164e5 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -607,6 +607,7 @@ public: , fGMs(skiagm::GMRegistry::Head()) , fCurrentRecording(0) , fCurrentPiping(0) + , fCurrentDeserialPicture(0) , fCurrentScale(0) , fCurrentSKP(0) , fCurrentSVG(0) @@ -765,6 +766,21 @@ public: return new PipingBench(name.c_str(), pic.get()); } + // Add all .skps as DeserializePictureBenchs. + while (fCurrentDeserialPicture < fSKPs.count()) { + const SkString& path = fSKPs[fCurrentDeserialPicture++]; + sk_sp<SkData> data = SkData::MakeFromFileName(path.c_str()); + if (!data) { + continue; + } + SkString name = SkOSPath::Basename(path.c_str()); + fSourceType = "skp"; + fBenchType = "deserial"; + fSKPBytes = static_cast<double>(data->size()); + fSKPOps = 0; + return new DeserializePictureBench(name.c_str(), std::move(data)); + } + // Then once each for each scale as SKPBenches (playback). while (fCurrentScale < fScales.count()) { while (fCurrentSKP < fSKPs.count()) { @@ -1091,6 +1107,7 @@ private: const char* fBenchType; // How we bench it: micro, recording, playback, ... int fCurrentRecording; int fCurrentPiping; + int fCurrentDeserialPicture; int fCurrentScale; int fCurrentSKP; int fCurrentSVG; |