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>
This commit is contained in:
Yuqian Li 2017-08-02 10:32:55 -04:00 committed by Skia Commit-Bot
parent 706a076879
commit db96f256cd

View File

@ -209,7 +209,7 @@ void gen_alpha_deltas(const SkPath& path, const SkRegion& clipRgn, Deltas& resul
// 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);