skia2/tools/VisualBench/VisualSKPBench.cpp
mtklein a1ebeb25e9 Remove const from const int loops.
This drives me nuts, and prevents `while (loops --> 0)`.

BUG=skia:

Review URL: https://codereview.chromium.org/1379923005
2015-10-01 09:43:39 -07:00

34 lines
726 B
C++

/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
*/
#include "VisualSKPBench.h"
VisualSKPBench::VisualSKPBench(const char* name, const SkPicture* pic)
: fPic(SkRef(pic))
, fName(name) {
fUniqueName.printf("%s", name);
}
const char* VisualSKPBench::onGetName() {
return fName.c_str();
}
const char* VisualSKPBench::onGetUniqueName() {
return fUniqueName.c_str();
}
bool VisualSKPBench::isSuitableFor(Backend backend) {
return backend != kNonRendering_Backend;
}
void VisualSKPBench::onDraw(int loops, SkCanvas* canvas) {
for (int i = 0; i < loops; i++) {
canvas->drawPicture(fPic);
}
}