diff options
author | Mike Reed <reed@google.com> | 2017-12-24 19:50:57 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-25 02:51:32 +0000 |
commit | 7557bbbe19b0d56484fe039171e4d97b75f209b3 (patch) | |
tree | 8d88d739a1f97553bff2e0ac029f8693e6eed108 /bench/nanobench.cpp | |
parent | 0a9d728851aaef71355b397ac03c1ddcb9e4bf06 (diff) |
Revert "remove approxbytes api from SkPicture"
This reverts commit bfc11853a88cda6951ae97399577fadadf2adcd5.
Bug: skia:
Change-Id: Ied4baad0496a06a52bec6965f9c97e13ebe2ab0a
Reviewed-on: https://skia-review.googlesource.com/89442
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'bench/nanobench.cpp')
-rw-r--r-- | bench/nanobench.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 8cd8e8171f..a50138a624 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -738,6 +738,7 @@ public: SkString name = SkOSPath::Basename(path.c_str()); fSourceType = "skp"; fBenchType = "recording"; + fSKPBytes = static_cast<double>(pic->approximateBytesUsed()); fSKPOps = pic->approximateOpCount(); return new RecordingBench(name.c_str(), pic.get(), FLAGS_bbh, FLAGS_lite); } @@ -752,6 +753,7 @@ public: SkString name = SkOSPath::Basename(path.c_str()); fSourceType = "skp"; fBenchType = "piping"; + fSKPBytes = static_cast<double>(pic->approximateBytesUsed()); fSKPOps = pic->approximateOpCount(); return new PipingBench(name.c_str(), pic.get()); } @@ -766,6 +768,7 @@ public: 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)); } @@ -1059,6 +1062,7 @@ public: } } if (0 == strcmp(fBenchType, "recording")) { + log->metric("bytes", fSKPBytes); log->metric("ops", fSKPOps); } } @@ -1089,7 +1093,7 @@ private: SkScalar fZoomMax; double fZoomPeriodMs; - double fSKPOps; + double fSKPBytes, fSKPOps; const char* fSourceType; // What we're benching: bench, GM, SKP, ... const char* fBenchType; // How we bench it: micro, recording, playback, ... |