Further improve AA choice
Compared with current master: 1.26% faster in Seal_of_New_Hampshire.svg_1 1.90% faster in native_image_to_raster_surface 2.70% faster in Seal_of_Texas.svg_1 2.76% faster in WestVirginia-StateSeal.svg_1 2.80% faster in chart_aa 3.36% faster in Iowa-StateSeal.svg_1 3.44% faster in Seal_of_Illinois.svg_1 4.37% faster in Seal_of_Maryland_%28reverse%29.svg_1 4.64% faster in Minnesota-StateSeal.svg_1 5.06% faster in Seal_of_Tennessee.svg_1 16.76% faster in clip_strategy_path_100 Compared with the Skia without https://skia-review.googlesource.com/c/skia/+/146220 (no significant slowdowns for any SVGs) 4.69% slower in path_fill_big_rotated_rect_aa_45 2.50% slower in points 1.27% faster in native_image_to_raster_surface 1.39% faster in patch_square_meshlines_0.100000x0.100000 2.09% faster in path_hairline_big_noAA_line 2.62% faster in Seal_of_Maryland_%28reverse%29.svg_1 3.63% faster in rotated_rects_aa_alternating_transparent_and_opaque_darken 3.93% faster in zeroradroundrect 4.60% faster in rotated_rects_aa_same_transparent_darken 4.64% faster in ovals_1 4.73% faster in rotated_rects_aa_changing_opaque_darken 4.74% faster in rotated_rects_aa_changing_transparent_darken 5.01% faster in rotated_rects_aa_same_opaque_darken 5.07% faster in nested_aaclip_AA 6.06% faster in ovals_3 6.25% faster in dash_0_noclip 7.86% faster in rotated_rects_aa_same_transparent_src 7.86% faster in rotated_rects_aa_changing_transparent_src 9.31% faster in rrects_3 9.35% faster in rotated_rects_aa_alternating_transparent_and_opaque_src 10.95% faster in rotated_rects_aa_same_transparent_srcover 10.95% faster in rotated_rects_aa_changing_transparent_srcover 11.46% faster in rotated_rects_aa_alternating_transparent_and_opaque_srcover 11.90% faster in rotated_rects_aa_same_opaque_srcover 11.90% faster in rotated_rects_aa_changing_opaque_srcover 12.09% faster in rotated_rects_aa_same_opaque_src 12.13% faster in rotated_rects_aa_changing_opaque_src 20.89% faster in path_fill_small_triangle Bug: skia:8272 Change-Id: Ic1434ea71660b0d3a7ddf1f63d098cfe7acfd861 Reviewed-on: https://skia-review.googlesource.com/149337 Auto-Submit: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
3853bafbde
commit
04ccd72c1a
@ -694,6 +694,12 @@ static bool ShouldUseAAA(const SkPath& path, SkScalar avgLength, SkScalar comple
|
||||
// AA might be slower than supersampling.
|
||||
return path.countPoints() < SkTMax(bounds.width(), bounds.height()) / 2 - 10;
|
||||
#else
|
||||
if (path.countPoints() >= path.getBounds().height()) {
|
||||
// SAA is faster than AAA in this case even if there are no intersections because AAA will
|
||||
// have too many scan lines. See skbug.com/8272
|
||||
return false;
|
||||
}
|
||||
|
||||
// We will use AAA if the number of verbs < kSampleSize and therefore complexity < 0
|
||||
return complexity < kComplexityThreshold;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user