blob: 853afb3e9131461fcd8c4543f97047ae924e1970 [file] [log] [blame]
reed@android.combd700c32009-01-05 03:34:50 +00001#include "SkBenchmark.h"
reed@android.com4bc19832009-01-19 20:08:35 +00002#include "SkPaint.h"
3
reed@android.comf523e252009-01-26 23:15:37 +00004template BenchRegistry* BenchRegistry::gHead;
5
reed@android.com4bc19832009-01-19 20:08:35 +00006SkBenchmark::SkBenchmark() {
7 fForceAlpha = 0xFF;
8 fForceAA = true;
9}
reed@android.combd700c32009-01-05 03:34:50 +000010
11const char* SkBenchmark::getName() {
12 return this->onGetName();
13}
14
15SkIPoint SkBenchmark::getSize() {
16 return this->onGetSize();
17}
18
19void SkBenchmark::draw(SkCanvas* canvas) {
20 this->onDraw(canvas);
21}
22
reed@android.com4bc19832009-01-19 20:08:35 +000023void SkBenchmark::setupPaint(SkPaint* paint) {
24 paint->setAlpha(fForceAlpha);
25 paint->setAntiAlias(fForceAA);
26}
27
reed@android.comf523e252009-01-26 23:15:37 +000028///////////////////////////////////////////////////////////////////////////////
reed@android.com4bc19832009-01-19 20:08:35 +000029
reed@android.comf523e252009-01-26 23:15:37 +000030SkIPoint SkBenchmark::onGetSize() {
31 return SkMakeIPoint(640, 480);
32}