diff options
author | Yuqian Li <liyuqian@google.com> | 2018-01-04 10:08:42 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-05 19:33:25 +0000 |
commit | d208a8847777d4643188813f03a15dfed4887365 (patch) | |
tree | 2e32f528f77bb3b3ac04bc6b551a16463af4cac9 /src/core/SkRasterPipeline.h | |
parent | fa3783f17dba971e3204ba950965d9c65eb8711d (diff) |
Update 2pt conical gradient in raster pipeline
The updated algorithm matches our new GPU algorithm
(https://skia.org/dev/design/conical) and it brings
about 7%-26% speedup. In the next CL, I'll simplify
the GPU code by reusing the CPU code in this CL.
7.20% faster in gradient_conical_clamp_hicolor
8.94% faster in gradient_conicalZero_clamp_hicolor
10.00% faster in gradient_conicalOut_clamp_hicolor
11.72% faster in gradient_conicalOutZero_clamp_hicolor
13.62% faster in gradient_conical_clamp_3color
16.52% faster in gradient_conicalZero_clamp_3color
17.48% faster in gradient_conical_clamp
17.70% faster in gradient_conical_clamp_shallow
20.60% faster in gradient_conicalOut_clamp_3color
20.98% faster in gradient_conicalOutZero_clamp_3color
21.79% faster in gradient_conicalZero_clamp
22.48% faster in gradient_conicalOut_clamp
26.13% faster in gradient_conicalOutZero_clamp
Bug: skia:
Change-Id: Ia159495e1c77658cb28e48c9edf84938464e501c
Reviewed-on: https://skia-review.googlesource.com/90262
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkRasterPipeline.h')
-rw-r--r-- | src/core/SkRasterPipeline.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h index 28fb5cb361..702fc415be 100644 --- a/src/core/SkRasterPipeline.h +++ b/src/core/SkRasterPipeline.h @@ -36,6 +36,8 @@ struct SkJumper_Engine; * If you'd like to see how this works internally, you want to start digging around src/jumper. */ +// TODO (liyuqian): remove xy_to_2pt_conical_quadratic_first, xy_to_2pt_conical_quadratic_second, +// xy_to_2pt_conical_linear, and mask_2pt_conical_degenerates_legacy once rebaselined. #define SK_RASTER_PIPELINE_STAGES(M) \ M(callback) \ M(move_src_dst) M(move_dst_src) \ @@ -76,6 +78,7 @@ struct SkJumper_Engine; M(lab_to_xyz) \ M(mirror_x) M(repeat_x) \ M(mirror_y) M(repeat_y) \ + M(negate_x) \ M(bilinear_nx) M(bilinear_px) M(bilinear_ny) M(bilinear_py) \ M(bicubic_n3x) M(bicubic_n1x) M(bicubic_p1x) M(bicubic_p3x) \ M(bicubic_n3y) M(bicubic_n1y) M(bicubic_p1y) M(bicubic_p3y) \ @@ -89,6 +92,15 @@ struct SkJumper_Engine; M(xy_to_2pt_conical_quadratic_first) \ M(xy_to_2pt_conical_quadratic_second) \ M(xy_to_2pt_conical_linear) \ + M(mask_2pt_conical_degenerates_legacy) \ + M(xy_to_2pt_conical_strip) \ + M(xy_to_2pt_conical_focal_on_circle) \ + M(xy_to_2pt_conical_well_behaved) \ + M(xy_to_2pt_conical_smaller) \ + M(xy_to_2pt_conical_greater) \ + M(alter_2pt_conical_compensate_focal) \ + M(alter_2pt_conical_unswap) \ + M(mask_2pt_conical_nan) \ M(mask_2pt_conical_degenerates) M(apply_vector_mask) \ M(byte_tables) M(byte_tables_rgb) \ M(rgb_to_hsl) M(hsl_to_rgb) \ |