2009-01-05 03:34:50 +00:00
|
|
|
#include "SkBenchmark.h"
|
2009-01-19 20:08:35 +00:00
|
|
|
#include "SkPaint.h"
|
|
|
|
|
2009-01-26 23:15:37 +00:00
|
|
|
template BenchRegistry* BenchRegistry::gHead;
|
|
|
|
|
2009-01-19 20:08:35 +00:00
|
|
|
SkBenchmark::SkBenchmark() {
|
|
|
|
fForceAlpha = 0xFF;
|
|
|
|
fForceAA = true;
|
|
|
|
}
|
2009-01-05 03:34:50 +00:00
|
|
|
|
|
|
|
const char* SkBenchmark::getName() {
|
|
|
|
return this->onGetName();
|
|
|
|
}
|
|
|
|
|
|
|
|
SkIPoint SkBenchmark::getSize() {
|
|
|
|
return this->onGetSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SkBenchmark::draw(SkCanvas* canvas) {
|
|
|
|
this->onDraw(canvas);
|
|
|
|
}
|
|
|
|
|
2009-01-19 20:08:35 +00:00
|
|
|
void SkBenchmark::setupPaint(SkPaint* paint) {
|
|
|
|
paint->setAlpha(fForceAlpha);
|
|
|
|
paint->setAntiAlias(fForceAA);
|
|
|
|
}
|
|
|
|
|
2009-01-26 23:15:37 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2009-01-19 20:08:35 +00:00
|
|
|
|
2009-01-26 23:15:37 +00:00
|
|
|
SkIPoint SkBenchmark::onGetSize() {
|
|
|
|
return SkMakeIPoint(640, 480);
|
|
|
|
}
|