skia2/bench/SkBenchmark.cpp
reed@android.com 29348cb061 add -forceFilter to bench tool
move some utils out of effects/



git-svn-id: http://skia.googlecode.com/svn/trunk@307 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-04 18:17:15 +00:00

34 lines
695 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);
paint->setFilterBitmap(fForceFilter);
}
///////////////////////////////////////////////////////////////////////////////
SkIPoint SkBenchmark::onGetSize() {
return SkMakeIPoint(640, 480);
}