Skip to content

Commit

Permalink
Remove useless options from bench
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinly authored and Commit bot committed Jul 9, 2014
1 parent db5f7bf commit 762c718
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
7 changes: 2 additions & 5 deletions bench/Benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ template BenchRegistry* BenchRegistry::gHead;

Benchmark::Benchmark() {
fForceAlpha = 0xFF;
fForceAA = true;
fForceFilter = false;
fDither = SkTriState::kDefault;
fOrMask = fClearMask = 0;
}
Expand All @@ -40,9 +38,8 @@ void Benchmark::draw(const int loops, SkCanvas* canvas) {

void Benchmark::setupPaint(SkPaint* paint) {
paint->setAlpha(fForceAlpha);
paint->setAntiAlias(fForceAA);
paint->setFilterLevel(fForceFilter ? SkPaint::kLow_FilterLevel
: SkPaint::kNone_FilterLevel);
paint->setAntiAlias(true);
paint->setFilterLevel(SkPaint::kNone_FilterLevel);

paint->setFlags((paint->getFlags() & ~fClearMask) | fOrMask);

Expand Down
10 changes: 0 additions & 10 deletions bench/Benchmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@ class Benchmark : public SkRefCnt {
fForceAlpha = alpha;
}

void setForceAA(bool aa) {
fForceAA = aa;
}

void setForceFilter(bool filter) {
fForceFilter = filter;
}

void setDither(SkTriState::State state) {
fDither = state;
}
Expand Down Expand Up @@ -115,8 +107,6 @@ class Benchmark : public SkRefCnt {

private:
int fForceAlpha;
bool fForceAA;
bool fForceFilter;
SkTriState::State fDither;
uint32_t fOrMask, fClearMask;

Expand Down
6 changes: 0 additions & 6 deletions bench/benchmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ DEFINE_bool(rotate, false, "Rotate canvas before bench run?");
DEFINE_bool(scale, false, "Scale canvas before bench run?");
DEFINE_bool(clip, false, "Clip canvas before bench run?");

DEFINE_bool(forceAA, true, "Force anti-aliasing?");
DEFINE_bool(forceFilter, false, "Force bitmap filtering?");
DEFINE_string(forceDither, "default", "Force dithering: true, false, or default?");
DEFINE_bool(forceBlend, false, "Force alpha blending?");

Expand Down Expand Up @@ -415,8 +413,6 @@ int tool_main(int argc, char** argv) {
}
writer.option("mode", FLAGS_mode[0]);
writer.option("alpha", SkStringPrintf("0x%02X", alpha).c_str());
writer.option("antialias", SkStringPrintf("%d", FLAGS_forceAA).c_str());
writer.option("filter", SkStringPrintf("%d", FLAGS_forceFilter).c_str());
writer.option("dither", SkTriState::Name[dither]);

writer.option("rotate", SkStringPrintf("%d", FLAGS_rotate).c_str());
Expand Down Expand Up @@ -476,8 +472,6 @@ int tool_main(int argc, char** argv) {
}

bench->setForceAlpha(alpha);
bench->setForceAA(FLAGS_forceAA);
bench->setForceFilter(FLAGS_forceFilter);
bench->setDither(dither);
bench->preDraw();

Expand Down

0 comments on commit 762c718

Please sign in to comment.