f523e25da0
git-svn-id: http://skia.googlecode.com/svn/trunk@83 2bbb7eff-a529-9590-31e7-b0007b416f81
33 lines
653 B
C++
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);
|
|
}
|