skia2/bench/SkBenchmark.cpp
reed@android.com f523e25da0 add BitmapBench
git-svn-id: http://skia.googlecode.com/svn/trunk@83 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-26 23:15:37 +00:00

33 lines
653 B
C++

#include "SkBenchmark.h"
#include "SkPaint.h"
template BenchRegistry* BenchRegistry::gHead;
SkBenchmark::SkBenchmark() {
fForceAlpha = 0xFF;
fForceAA = true;
}
const char* SkBenchmark::getName() {
return this->onGetName();
}
SkIPoint SkBenchmark::getSize() {
return this->onGetSize();
}
void SkBenchmark::draw(SkCanvas* canvas) {
this->onDraw(canvas);
}
void SkBenchmark::setupPaint(SkPaint* paint) {
paint->setAlpha(fForceAlpha);
paint->setAntiAlias(fForceAA);
}
///////////////////////////////////////////////////////////////////////////////
SkIPoint SkBenchmark::onGetSize() {
return SkMakeIPoint(640, 480);
}