Some simple pipeline refactoring.
authorMike Klein <mtklein@chromium.org>
Mon, 28 Nov 2016 14:33:02 +0000 (09:33 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Mon, 28 Nov 2016 15:10:32 +0000 (15:10 +0000)
commitd5de013643789950aef09a9f081ac65c4c965900
tree32ad5a5264dffa8e7e36f9c31dfb40101e3642dc
parent3b66ab6f9fdc6eacdf0ee1921da28751de30c018
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>
src/core/SkRasterPipeline.h
src/core/SkXfermode.cpp
src/image/SkImageShader.cpp
src/opts/SkRasterPipeline_opts.h