Reduce SORT_THRESHOLD to 256
perf.skia.org showed that reducing the threshold would only harm
path_fill_small_sawtooth, but will benefit many many skps and svgs
playback.
Bug: skia:
Change-Id: I38904548206521d78a7c9c5804c0d989b23dc405
TBR: caryclark@google.com, reed@google.com
Reviewed-on: https://skia-review.googlesource.com/29882
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
diff --git a/src/core/SkScan_DAAPath.cpp b/src/core/SkScan_DAAPath.cpp
index 0c199f4..68bc15d 100644
--- a/src/core/SkScan_DAAPath.cpp
+++ b/src/core/SkScan_DAAPath.cpp
@@ -209,7 +209,7 @@
// SkCoverageDeltaList. And we don't want to sort more than SORT_THRESHOLD edges where
// the log(count) factor of the quick sort may become a bottleneck; when there are so
// many edges, we're unlikely to make deltas sorted anyway.
- constexpr int SORT_THRESHOLD = 4096;
+ constexpr int SORT_THRESHOLD = 256;
if (std::is_same<Deltas, SkCoverageDeltaList>::value && count < SORT_THRESHOLD) {
XLessThan lessThan;
SkTQSort(list, list + count - 1, lessThan);