29348cb061
move some utils out of effects/ git-svn-id: http://skia.googlecode.com/svn/trunk@307 2bbb7eff-a529-9590-31e7-b0007b416f81
34 lines
695 B
C++
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);
|
|
}
|