aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkLumaColorFilter.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2016-11-11 12:51:36 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-12 15:04:47 +0000
commit744908e5e81f81f34288a1b5547aa4ea990ad13d (patch)
treee61d5ca45844cab022a844eec4e764585c4c075c /src/effects/SkLumaColorFilter.cpp
parent83b5b21714fc4eac4a1cb88efe6b6777a40303e1 (diff)
Fix SkModeColorFilter in 565
It has been incorrectly interpreting its SkColor as sRGB all the time. Now, we plumb through the destintation color space and some scratch space, letting it decide how to interpret its SkColor later when it knows about the dst color space. The scratch space is blitter scoped, which lets this be thread safe (this is much like SkShader::Context). This only corrects the gamma transformation for now. I've kept my previous TODO about gamut transformation. Everything assumes sRGB gamut for now. Shaders will get the same treatement in this pipeline. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4725 Change-Id: I55b0c7d5db9ad8d7dcdd6295c9dac61d10aeaed4 Reviewed-on: https://skia-review.googlesource.com/4725 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/effects/SkLumaColorFilter.cpp')
-rw-r--r--src/effects/SkLumaColorFilter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp
index 3061708ba9..94d800a4ff 100644
--- a/src/effects/SkLumaColorFilter.cpp
+++ b/src/effects/SkLumaColorFilter.cpp
@@ -38,7 +38,10 @@ void SkLumaColorFilter::filterSpan(const SkPMColor src[], int count,
}
}
-bool SkLumaColorFilter::onAppendStages(SkRasterPipeline* p, bool shaderIsOpaque) const {
+bool SkLumaColorFilter::onAppendStages(SkRasterPipeline* p,
+ SkColorSpace* dst,
+ SkFallbackAlloc* scratch,
+ bool shaderIsOpaque) const {
p->append(SkRasterPipeline::luminance_to_alpha);
return true;
}