aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/nanobench.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@google.com>2018-01-27 17:30:04 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-27 17:30:15 +0000
commit88d90714fad0fed2739fb8c5f90fe814c8a274ef (patch)
tree85d26395c1fbcdd21ca0e2029b022862ca09fe79 /bench/nanobench.cpp
parentfc20008819f39e1504aa572e28c56e83e14bff79 (diff)
Revert "hide picture virtuals (no public callers)"
This reverts commit 8005bff7e631a269f0dfaae93ff9963dc0e5ff39. Reason for revert: hwui, flutter, and headless blink in G3 all still using these. Original change's description: > 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> TBR=mtklein@chromium.org,mtklein@google.com,reed@google.com Change-Id: I385789dd420588ea9a9390c8a44c6ecb96c7f358 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/100880 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'bench/nanobench.cpp')
-rw-r--r--bench/nanobench.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 1f275d8cc3..b9ecfa7b51 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -38,7 +38,6 @@
#include "SkLeanWindows.h"
#include "SkOSFile.h"
#include "SkOSPath.h"
-#include "SkPicturePriv.h"
#include "SkPictureRecorder.h"
#include "SkSVGDOM.h"
#include "SkScan.h"
@@ -739,7 +738,8 @@ public:
SkString name = SkOSPath::Basename(path.c_str());
fSourceType = "skp";
fBenchType = "recording";
- fSKPBytes = static_cast<double>(SkPicturePriv::ApproxBytesUsed(pic.get()));
+ fSKPBytes = static_cast<double>(pic->approximateBytesUsed());
+ fSKPOps = pic->approximateOpCount();
return new RecordingBench(name.c_str(), pic.get(), FLAGS_bbh, FLAGS_lite);
}
@@ -753,7 +753,8 @@ public:
SkString name = SkOSPath::Basename(path.c_str());
fSourceType = "skp";
fBenchType = "piping";
- fSKPBytes = static_cast<double>(SkPicturePriv::ApproxBytesUsed(pic.get()));
+ fSKPBytes = static_cast<double>(pic->approximateBytesUsed());
+ fSKPOps = pic->approximateOpCount();
return new PipingBench(name.c_str(), pic.get());
}
@@ -768,6 +769,7 @@ public:
fSourceType = "skp";
fBenchType = "deserial";
fSKPBytes = static_cast<double>(data->size());
+ fSKPOps = 0;
return new DeserializePictureBench(name.c_str(), std::move(data));
}
@@ -1061,6 +1063,7 @@ public:
}
if (0 == strcmp(fBenchType, "recording")) {
log->metric("bytes", fSKPBytes);
+ log->metric("ops", fSKPOps);
}
}
@@ -1090,7 +1093,7 @@ private:
SkScalar fZoomMax;
double fZoomPeriodMs;
- double fSKPBytes;
+ double fSKPBytes, fSKPOps;
const char* fSourceType; // What we're benching: bench, GM, SKP, ...
const char* fBenchType; // How we bench it: micro, recording, playback, ...