Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1230)

Unified Diff: bench/SKPBench.cpp

Issue 1203193002: Add loopSKP flag to nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/SKPBench.h ('k') | bench/nanobench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SKPBench.cpp
diff --git a/bench/SKPBench.cpp b/bench/SKPBench.cpp
index 757ee4655ed3d3bad777e7625941d04b96ab23b5..ef7f644dd786a3e36efdc048e2dbc6786138fa84 100644
--- a/bench/SKPBench.cpp
+++ b/bench/SKPBench.cpp
@@ -18,12 +18,13 @@ DEFINE_int32(GPUbenchTileW, 1600, "Tile width used for GPU SKP playback.");
DEFINE_int32(GPUbenchTileH, 512, "Tile height used for GPU SKP playback.");
SKPBench::SKPBench(const char* name, const SkPicture* pic, const SkIRect& clip, SkScalar scale,
- bool useMultiPictureDraw)
+ bool useMultiPictureDraw, bool doLooping)
: fPic(SkRef(pic))
, fClip(clip)
, fScale(scale)
, fName(name)
- , fUseMultiPictureDraw(useMultiPictureDraw) {
+ , fUseMultiPictureDraw(useMultiPictureDraw)
+ , fDoLooping(doLooping) {
fUniqueName.printf("%s_%.2g", name, scale); // Scale makes this unqiue for perf.skia.org traces.
if (useMultiPictureDraw) {
fUniqueName.append("_mpd");
@@ -104,6 +105,7 @@ SkIPoint SKPBench::onGetSize() {
}
void SKPBench::onDraw(const int loops, SkCanvas* canvas) {
+ SkASSERT(fDoLooping || 1 == loops);
if (fUseMultiPictureDraw) {
for (int i = 0; i < loops; i++) {
this->drawMPDPicture();
« no previous file with comments | « bench/SKPBench.h ('k') | bench/nanobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698