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/SkTableColorFilter.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/SkTableColorFilter.cpp')
-rw-r--r-- | src/effects/SkTableColorFilter.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp index b5156ae5bf..93d784fe60 100644 --- a/src/effects/SkTableColorFilter.cpp +++ b/src/effects/SkTableColorFilter.cpp @@ -90,7 +90,6 @@ public: #endif void filterSpan(const SkPMColor src[], int count, SkPMColor dst[]) const override; - void filterSpan4f(const SkPM4f src[], int count, SkPM4f result[]) const override; SK_TO_STRING_OVERRIDE() @@ -185,41 +184,6 @@ void SkTable_ColorFilter::filterSpan(const SkPMColor src[], int count, SkPMColor } } -void SkTable_ColorFilter::filterSpan4f(const SkPM4f src[], int count, SkPM4f dst[]) const { - const uint8_t* table = fStorage; - const uint8_t* tableA = gIdentityTable; - const uint8_t* tableR = gIdentityTable; - const uint8_t* tableG = gIdentityTable; - const uint8_t* tableB = gIdentityTable; - if (fFlags & kA_Flag) { - tableA = table; table += 256; - } - if (fFlags & kR_Flag) { - tableR = table; table += 256; - } - if (fFlags & kG_Flag) { - tableG = table; table += 256; - } - if (fFlags & kB_Flag) { - tableB = table; - } - - const float oneOver255 = 1.0f / 255; - for (int i = 0; i < count; ++i) { - SkColor4f c = src[i].unpremul(); - int r = (int)(c.fR * 255.999) & 0xFF; - int g = (int)(c.fG * 255.999) & 0xFF; - int b = (int)(c.fB * 255.999) & 0xFF; - int a = (int)(c.fA * 255.999) & 0xFF; - - SkColor4f d { - tableR[r] * oneOver255, tableG[g] * oneOver255, - tableB[b] * oneOver255, tableA[a] * oneOver255, - }; - dst[i] = d.premul(); - } -} - #ifndef SK_IGNORE_TO_STRING void SkTable_ColorFilter::toString(SkString* str) const { const uint8_t* table = fStorage; |