diff options
author | 2017-07-11 09:47:12 -0400 | |
---|---|---|
committer | 2017-07-12 13:15:56 +0000 | |
commit | 016eef47d78091bab7fbd6a445996f252e3283fc (patch) | |
tree | 446eab0640c2d0edc06909a8d5e3207908a263ba /src/core | |
parent | febbd23eb75d71e5238a607a56450deac85d2e5f (diff) |
Always enable Analytic AA for rects
Previously, suitableForAAA disabled Analytic AA for small rects.
But that's a mistake. Re-enabling AAA will bring 10-20% speedup for small rects
(~800ns -> ~700ns measured by path_fill_small_rect nanobench).
Bug: skia:
Change-Id: I943f1c754669391f55e46471781fa65840629377
Reviewed-on: https://skia-review.googlesource.com/22205
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkScan_AntiPath.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index be91007ecb..093de43403 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -638,6 +638,11 @@ static bool suitableForAAA(const SkPath& path) { if (gSkForceAnalyticAA.load()) { return true; } +#ifndef SK_SUPPORT_LEGACY_RECT + if (path.isRect(nullptr)) { + return true; + } +#endif const SkRect& bounds = path.getBounds(); // When the path have so many points compared to the size of its bounds/resolution, // it indicates that the path is not quite smooth in the current resolution: |