diff options
author | 2016-11-28 09:33:02 -0500 | |
---|---|---|
committer | 2016-11-28 15:10:32 +0000 | |
commit | d5de013643789950aef09a9f081ac65c4c965900 (patch) | |
tree | 32ad5a5264dffa8e7e36f9c31dfb40101e3642dc /src/core/SkRasterPipeline.h | |
parent | 3b66ab6f9fdc6eacdf0ee1921da28751de30c018 (diff) |
Some simple pipeline refactoring.
This is a batch of little tweaks that all preserve the existing logical behavior:
- rename dst to move_dst_src to parallel move_src_dst
- remove unused swap_src_dst
- move swap_rb up with the other utility stages
- factor out from_8888() to parallel from_565() and from_4444()
- factor out gather() from the accum_* stages
This changes the order of the math in accum_8888[_srgb] ever so slightly, from (scale * C) * (1/255.0f) to scale * (1/255.0f * C). It causes a few pixel diffs, but nothing noticeable. This makes the 8888 bilerp logic consistent with the other formats, which all convert to [0,1] float first before being scaled.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: Id37857b91be3086565169dcc9b1a537574e532aa
Reviewed-on: https://skia-review.googlesource.com/5226
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkRasterPipeline.h')
-rw-r--r-- | src/core/SkRasterPipeline.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h index 3f146be493..daf4b78b42 100644 --- a/src/core/SkRasterPipeline.h +++ b/src/core/SkRasterPipeline.h @@ -56,8 +56,9 @@ #define SK_RASTER_PIPELINE_STAGES(M) \ M(trace) M(registers) \ - M(move_src_dst) M(swap_src_dst) \ - M(clamp_0) M(clamp_a) M(clamp_1) M(unpremul) M(premul) \ + M(move_src_dst) M(move_dst_src) M(swap_rb) \ + M(clamp_0) M(clamp_a) M(clamp_1) \ + M(unpremul) M(premul) \ M(constant_color) M(store_f32) \ M(load_s_565) M(load_d_565) M(store_565) \ M(load_s_srgb) M(load_d_srgb) M(store_srgb) \ @@ -65,7 +66,6 @@ M(load_s_8888) M(store_8888) \ M(scale_u8) M(scale_constant_float) \ M(lerp_u8) M(lerp_565) M(lerp_constant_float) \ - M(dst) \ 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_) \ @@ -76,7 +76,7 @@ M(matrix_perspective) \ M(parametric_r) M(parametric_g) M(parametric_b) \ M(table_r) M(table_g) M(table_b) \ - M(color_lookup_table) M(lab_to_xyz) M(swap_rb) \ + M(color_lookup_table) M(lab_to_xyz) \ M(clamp_x) M(mirror_x) M(repeat_x) \ M(clamp_y) M(mirror_y) M(repeat_y) \ M(accum_f16) M(accum_a8) \ |