diff options
author | Yuqian Li <liyuqian@google.com> | 2016-12-12 16:24:47 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-12 22:08:38 +0000 |
commit | 131c1fb96328ee00cb18f629eddfb665b36e9463 (patch) | |
tree | dceab172ffdb2ed7e9328609cb5f3d236c6324f9 /bench/PathBench.cpp | |
parent | 9d1cc66b6065e7aafc4e999a36c9ec680e4f13b7 (diff) |
Add GMs and benchs for concave Analytic AA
BUG=skia:
Change-Id: I2ed6e2c4f81dc9d5c53b07332c0063f42c6b3c79
Reviewed-on: https://skia-review.googlesource.com/5771
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'bench/PathBench.cpp')
-rw-r--r-- | bench/PathBench.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/bench/PathBench.cpp b/bench/PathBench.cpp index 67e002ba24..4ca4401163 100644 --- a/bench/PathBench.cpp +++ b/bench/PathBench.cpp @@ -173,6 +173,47 @@ private: typedef PathBench INHERITED; }; +// Test max speedup of Analytic AA for concave paths +class AAAConcavePathBench : public PathBench { +public: + AAAConcavePathBench(Flags flags) : INHERITED(flags) {} + + void appendName(SkString* name) override { + name->append("concave_aaa"); + } + + void makePath(SkPath* path) override { + path->moveTo(10, 10); + path->lineTo(15, 10); + path->lineTo(15, 5); + path->lineTo(40, 40); + path->close(); + } + +private: + typedef PathBench INHERITED; +}; + +// Test max speedup of Analytic AA for convex paths +class AAAConvexPathBench : public PathBench { +public: + AAAConvexPathBench(Flags flags) : INHERITED(flags) {} + + void appendName(SkString* name) override { + name->append("convex_aaa"); + } + + void makePath(SkPath* path) override { + path->moveTo(10, 10); + path->lineTo(15, 10); + path->lineTo(40, 50); + path->close(); + } + +private: + typedef PathBench INHERITED; +}; + class SawToothPathBench : public PathBench { public: SawToothPathBench(Flags flags) : INHERITED(flags) {} @@ -1049,6 +1090,11 @@ DEF_BENCH( return new CirclePathBench(FLAGS01); ) DEF_BENCH( return new CirclePathBench(FLAGS10); ) DEF_BENCH( return new CirclePathBench(FLAGS11); ) +DEF_BENCH( return new AAAConcavePathBench(FLAGS00); ) +DEF_BENCH( return new AAAConcavePathBench(FLAGS10); ) +DEF_BENCH( return new AAAConvexPathBench(FLAGS00); ) +DEF_BENCH( return new AAAConvexPathBench(FLAGS10); ) + DEF_BENCH( return new SawToothPathBench(FLAGS00); ) DEF_BENCH( return new SawToothPathBench(FLAGS01); ) |