diff options
author | Mike Reed <reed@google.com> | 2017-05-31 15:03:02 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-31 19:54:05 +0000 |
commit | 25f3805efa465bc3f804f192fe1ee64450f01d7c (patch) | |
tree | fd32acec7e98cc4793d7488bbb89f582b5770de6 /src/effects/SkLumaColorFilter.cpp | |
parent | d696df74d4b2d70fb7b9078c6092d5eb1858d03d (diff) |
slant colorfilter away from filterSpan4f
rename to make it easy to delete any impl that also had onAppendStages...
i.e. rename to make it clear that it is just an impl trick for rasterpipeline.
Bug: skia:
Change-Id: If3c3b2811eff12d399cdf7a77552c01e72c06996
Reviewed-on: https://skia-review.googlesource.com/18234
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/effects/SkLumaColorFilter.cpp')
-rw-r--r-- | src/effects/SkLumaColorFilter.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp index f0e58c06f8..efe44a4258 100644 --- a/src/effects/SkLumaColorFilter.cpp +++ b/src/effects/SkLumaColorFilter.cpp @@ -36,25 +36,6 @@ void SkLumaColorFilter::filterSpan(const SkPMColor src[], int count, SkPMColor d } } -void SkLumaColorFilter::filterSpan4f(const SkPM4f src[], int count, SkPM4f dst[]) const { - for (int i = 0; i < count; ++i) { - /* - * While LuminanceToAlpha is defined to operate on un-premultiplied - * inputs, due to the final alpha scaling it can be computed based on - * premultipled components: - * - * LumA = (k1 * r / a + k2 * g / a + k3 * b / a) * a - * LumA = (k1 * r + k2 * g + k3 * b) - */ - dst[i].fVec[SkPM4f::R] = 0; - dst[i].fVec[SkPM4f::G] = 0; - dst[i].fVec[SkPM4f::B] = 0; - dst[i].fVec[SkPM4f::A] = src[i].r() * SK_LUM_COEFF_R + - src[i].g() * SK_LUM_COEFF_G + - src[i].b() * SK_LUM_COEFF_B; - } -} - void SkLumaColorFilter::onAppendStages(SkRasterPipeline* p, SkColorSpace* dst, SkArenaAlloc* scratch, |