From 762c7188247332a7ee4d108d0c4291b92815aec2 Mon Sep 17 00:00:00 2001 From: kelvinly Date: Wed, 9 Jul 2014 12:25:27 -0700 Subject: [PATCH] Remove useless options from bench BUG=skia: R=jcgregorio@google.com, bensong@google.com, bsalomon@google.com, robertphillips@google.com, reed@google.com Author: kelvinly@google.com Review URL: https://codereview.chromium.org/375863006 --- bench/Benchmark.cpp | 7 ++----- bench/Benchmark.h | 10 ---------- bench/benchmain.cpp | 6 ------ 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/bench/Benchmark.cpp b/bench/Benchmark.cpp index ae614f04f9c4..04223dca4309 100644 --- a/bench/Benchmark.cpp +++ b/bench/Benchmark.cpp @@ -16,8 +16,6 @@ template BenchRegistry* BenchRegistry::gHead; Benchmark::Benchmark() { fForceAlpha = 0xFF; - fForceAA = true; - fForceFilter = false; fDither = SkTriState::kDefault; fOrMask = fClearMask = 0; } @@ -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); diff --git a/bench/Benchmark.h b/bench/Benchmark.h index db70bbe49caf..8e8eeff4f2d1 100644 --- a/bench/Benchmark.h +++ b/bench/Benchmark.h @@ -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; } @@ -115,8 +107,6 @@ class Benchmark : public SkRefCnt { private: int fForceAlpha; - bool fForceAA; - bool fForceFilter; SkTriState::State fDither; uint32_t fOrMask, fClearMask; diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp index c1c1e3fb0cbf..f3fdb9f8da6c 100644 --- a/bench/benchmain.cpp +++ b/bench/benchmain.cpp @@ -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?"); @@ -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()); @@ -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();