diff options
author | Mike Klein <mtklein@chromium.org> | 2017-10-25 12:38:25 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-31 21:11:34 +0000 |
commit | 3cbcb738456f72a9e2aedd96b5e5f20d4074aba0 (patch) | |
tree | 355691eba6ebd1da0ee5c2dbaa0ef4c2fce686a6 /src/core/SkRasterPipeline.h | |
parent | 5c19631c77dacf5d57be62ea24bb886da99d0d5b (diff) |
Some lowp refactoring
1) Move a couple stages around in the enum to places
that make more sense, and guass_a_to_rbga in the code too.
2) mirror the SkRasterPipeline stage enum with either:
LOWP(st): the stage is implemented in low precision
TODO(st): the stage should be lowp, but isn't
NOPE(st): the stage shouldn't be done in lowp.
3) statically enforce that all stages are covered by one of
LOWP, TODO, or NOPE.
Change-Id: I06c7a7e470663ef73bf652c1b65c0d3c89f0d767
Reviewed-on: https://skia-review.googlesource.com/63800
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkRasterPipeline.h')
-rw-r--r-- | src/core/SkRasterPipeline.h | 113 |
1 files changed, 57 insertions, 56 deletions
diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h index f826f391ee..60464b0d44 100644 --- a/src/core/SkRasterPipeline.h +++ b/src/core/SkRasterPipeline.h @@ -36,62 +36,63 @@ struct SkJumper_Engine; * If you'd like to see how this works internally, you want to start digging around src/jumper. */ -#define SK_RASTER_PIPELINE_STAGES(M) \ - M(callback) \ - M(move_src_dst) M(move_dst_src) \ - M(clamp_0) M(clamp_1) M(clamp_a) M(clamp_a_dst) \ - M(unpremul) M(premul) M(premul_dst) \ - M(set_rgb) M(swap_rb) M(invert) \ - M(from_srgb) M(from_srgb_dst) M(to_srgb) \ - M(black_color) M(white_color) M(uniform_color) \ - M(seed_shader) M(dither) \ - M(load_a8) M(load_a8_dst) M(store_a8) M(gather_a8) \ - M(load_g8) M(load_g8_dst) M(gather_g8) \ - M(load_565) M(load_565_dst) M(store_565) M(gather_565) \ - M(load_4444) M(load_4444_dst) M(store_4444) M(gather_4444) \ - M(load_f16) M(load_f16_dst) M(store_f16) M(gather_f16) \ - M(load_f32) M(load_f32_dst) M(store_f32) \ - M(load_8888) M(load_8888_dst) M(store_8888) M(gather_8888) \ - M(load_bgra) M(load_bgra_dst) M(store_bgra) M(gather_bgra) \ - M(load_u16_be) M(load_rgb_u16_be) M(store_u16_be) \ - M(load_tables_u16_be) M(load_tables_rgb_u16_be) \ - M(load_tables) M(load_rgba) M(store_rgba) \ - M(scale_u8) M(scale_565) M(scale_1_float) \ - M( lerp_u8) M( lerp_565) M( lerp_1_float) \ - M(dstatop) M(dstin) M(dstout) M(dstover) \ - M(srcatop) M(srcin) M(srcout) M(srcover) \ - M(clear) M(modulate) M(multiply) M(plus_) M(screen) M(xor_) \ - M(colorburn) M(colordodge) M(darken) M(difference) \ - M(exclusion) M(hardlight) M(lighten) M(overlay) M(softlight) \ - M(hue) M(saturation) M(color) M(luminosity) \ - M(srcover_rgba_8888) M(srcover_bgra_8888) \ - M(luminance_to_alpha) \ - M(matrix_translate) M(matrix_scale_translate) \ - M(matrix_2x3) M(matrix_3x4) M(matrix_4x5) M(matrix_4x3) \ - M(matrix_perspective) \ - M(parametric_r) M(parametric_g) M(parametric_b) \ - M(parametric_a) M(gamma) \ - M(table_r) M(table_g) M(table_b) M(table_a) \ - M(lab_to_xyz) \ - M(mirror_x) M(repeat_x) \ - M(mirror_y) M(repeat_y) \ - M(clamp_x_1) M(mirror_x_1) M(repeat_x_1) \ - 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) \ - M(save_xy) M(accumulate) \ - M(evenly_spaced_gradient) \ - M(gauss_a_to_rgba) M(gradient) \ - M(evenly_spaced_2_stop_gradient) \ - M(xy_to_unit_angle) \ - M(xy_to_radius) \ - M(xy_to_2pt_conical_quadratic_min) \ - M(xy_to_2pt_conical_quadratic_max) \ - M(xy_to_2pt_conical_linear) \ - M(mask_2pt_conical_degenerates) M(apply_vector_mask) \ - M(byte_tables) M(byte_tables_rgb) \ - M(rgb_to_hsl) M(hsl_to_rgb) \ - M(clut_3D) M(clut_4D) +#define SK_RASTER_PIPELINE_STAGES(M) \ + M(callback) \ + M(move_src_dst) M(move_dst_src) \ + M(clamp_0) M(clamp_1) M(clamp_a) M(clamp_a_dst) \ + M(unpremul) M(premul) M(premul_dst) \ + M(set_rgb) M(swap_rb) M(invert) \ + M(from_srgb) M(from_srgb_dst) M(to_srgb) \ + M(black_color) M(white_color) M(uniform_color) \ + M(seed_shader) M(dither) \ + M(load_a8) M(load_a8_dst) M(store_a8) M(gather_a8) \ + M(load_g8) M(load_g8_dst) M(gather_g8) \ + M(load_565) M(load_565_dst) M(store_565) M(gather_565) \ + M(load_4444) M(load_4444_dst) M(store_4444) M(gather_4444) \ + M(load_f16) M(load_f16_dst) M(store_f16) M(gather_f16) \ + M(load_f32) M(load_f32_dst) M(store_f32) \ + M(load_8888) M(load_8888_dst) M(store_8888) M(gather_8888) \ + M(load_bgra) M(load_bgra_dst) M(store_bgra) M(gather_bgra) \ + M(load_u16_be) M(load_rgb_u16_be) M(store_u16_be) \ + M(load_tables_u16_be) M(load_tables_rgb_u16_be) M(load_tables) \ + M(load_rgba) M(store_rgba) \ + M(scale_u8) M(scale_565) M(scale_1_float) \ + M( lerp_u8) M( lerp_565) M( lerp_1_float) \ + M(dstatop) M(dstin) M(dstout) M(dstover) \ + M(srcatop) M(srcin) M(srcout) M(srcover) \ + M(clear) M(modulate) M(multiply) M(plus_) M(screen) M(xor_) \ + M(colorburn) M(colordodge) M(darken) M(difference) \ + M(exclusion) M(hardlight) M(lighten) M(overlay) M(softlight) \ + M(hue) M(saturation) M(color) M(luminosity) \ + M(srcover_rgba_8888) M(srcover_bgra_8888) \ + M(luminance_to_alpha) \ + M(matrix_translate) M(matrix_scale_translate) \ + M(matrix_2x3) M(matrix_3x4) M(matrix_4x5) M(matrix_4x3) \ + M(matrix_perspective) \ + M(parametric_r) M(parametric_g) M(parametric_b) \ + M(parametric_a) M(gamma) \ + M(table_r) M(table_g) M(table_b) M(table_a) \ + M(lab_to_xyz) \ + M(mirror_x) M(repeat_x) \ + M(mirror_y) M(repeat_y) \ + M(clamp_x_1) M(mirror_x_1) M(repeat_x_1) \ + 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) \ + M(save_xy) M(accumulate) \ + M(evenly_spaced_gradient) \ + M(gradient) \ + M(evenly_spaced_2_stop_gradient) \ + M(xy_to_unit_angle) \ + M(xy_to_radius) \ + M(xy_to_2pt_conical_quadratic_min) \ + M(xy_to_2pt_conical_quadratic_max) \ + M(xy_to_2pt_conical_linear) \ + M(mask_2pt_conical_degenerates) M(apply_vector_mask) \ + M(byte_tables) M(byte_tables_rgb) \ + M(rgb_to_hsl) M(hsl_to_rgb) \ + M(clut_3D) M(clut_4D) \ + M(gauss_a_to_rgba) class SkRasterPipeline { public: |