aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/nanobench.cpp
diff options
context:
space:
mode:
authorGravatar liyuqian <liyuqian@google.com>2016-10-04 09:29:51 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-04 09:29:51 -0700
commit7795822807478143120c33228b68d2ab3918af2c (patch)
tree7b84301091da3dbeba6b7785c46443fe1c6b7612 /bench/nanobench.cpp
parentb25c3522446c9f84369dec2327ed9995fdb326de (diff)
Implement AnalyticAA for convex shapes.
Design doc: go/analyticAA A performance test can be found here: https://docs.google.com/a/google.com/spreadsheets/d/1n9LSjFzrQzx0hovFddWey0GSMXNRjl1oFuSypMlHWZk/edit?usp=sharing Our best case is filling big triangles, which according to our experiment has ~2.9x speedup. Our worst case is filling small ovals/circles, which has a ~1.06x slowdown. To see how our new algorithm changes the DM images, see: https://x20web.corp.google.com/~liyuqian/dmdiff/index.html The most significant changes are in convexpaths and analytic_antialias_convex BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221103002 Review-Url: https://codereview.chromium.org/2221103002
Diffstat (limited to 'bench/nanobench.cpp')
-rw-r--r--bench/nanobench.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 433cfa89d9..07486d29a3 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -44,6 +44,7 @@
#include "SkTaskGroup.h"
#include "SkThreadUtils.h"
#include "ThermalManager.h"
+#include "SkScan.h"
#include <stdlib.h>
@@ -127,6 +128,8 @@ DEFINE_string(sourceType, "",
DEFINE_string(benchType, "",
"Apply usual --match rules to bench type: micro, recording, playback, skcodec, etc.");
+DEFINE_bool(analyticAA, false, "Analytic Anati-Alias");
+
static double now_ms() { return SkTime::GetNSecs() * 1e-6; }
static SkString humanize(double ms) {
@@ -1178,6 +1181,10 @@ int nanobench_main() {
start_keepalive();
}
+ if (FLAGS_analyticAA) {
+ GlobalAAConfig::getInstance().fUseAnalyticAA = true;
+ }
+
int runs = 0;
BenchmarkStream benchStream;
while (Benchmark* b = benchStream.next()) {