diff options
author | Mike Reed <reed@google.com> | 2018-01-26 13:26:38 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-27 04:02:55 +0000 |
commit | 8005bff7e631a269f0dfaae93ff9963dc0e5ff39 (patch) | |
tree | 7bb38b497f219b8890e2a574e208777861e919be /bench/nanobench.cpp | |
parent | 5bcef359b2d223a7c67e286850ecfd5c19d8b6c7 (diff) |
hide picture virtuals (no public callers)
This prepares the way for a clean impl of a "placeholder" picture that never unrolls
Bug: skia:
Change-Id: I3b5785c5c94432b54e9a7dc280b2a6e716592473
Reviewed-on: https://skia-review.googlesource.com/100260
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'bench/nanobench.cpp')
-rw-r--r-- | bench/nanobench.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index b9ecfa7b51..1f275d8cc3 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -38,6 +38,7 @@ #include "SkLeanWindows.h" #include "SkOSFile.h" #include "SkOSPath.h" +#include "SkPicturePriv.h" #include "SkPictureRecorder.h" #include "SkSVGDOM.h" #include "SkScan.h" @@ -738,8 +739,7 @@ public: SkString name = SkOSPath::Basename(path.c_str()); fSourceType = "skp"; fBenchType = "recording"; - fSKPBytes = static_cast<double>(pic->approximateBytesUsed()); - fSKPOps = pic->approximateOpCount(); + fSKPBytes = static_cast<double>(SkPicturePriv::ApproxBytesUsed(pic.get())); return new RecordingBench(name.c_str(), pic.get(), FLAGS_bbh, FLAGS_lite); } @@ -753,8 +753,7 @@ public: SkString name = SkOSPath::Basename(path.c_str()); fSourceType = "skp"; fBenchType = "piping"; - fSKPBytes = static_cast<double>(pic->approximateBytesUsed()); - fSKPOps = pic->approximateOpCount(); + fSKPBytes = static_cast<double>(SkPicturePriv::ApproxBytesUsed(pic.get())); return new PipingBench(name.c_str(), pic.get()); } @@ -769,7 +768,6 @@ public: fSourceType = "skp"; fBenchType = "deserial"; fSKPBytes = static_cast<double>(data->size()); - fSKPOps = 0; return new DeserializePictureBench(name.c_str(), std::move(data)); } @@ -1063,7 +1061,6 @@ public: } if (0 == strcmp(fBenchType, "recording")) { log->metric("bytes", fSKPBytes); - log->metric("ops", fSKPOps); } } @@ -1093,7 +1090,7 @@ private: SkScalar fZoomMax; double fZoomPeriodMs; - double fSKPBytes, fSKPOps; + double fSKPBytes; const char* fSourceType; // What we're benching: bench, GM, SKP, ... const char* fBenchType; // How we bench it: micro, recording, playback, ... |