aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkColorFilter.h
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 /include/core/SkColorFilter.h
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 'include/core/SkColorFilter.h')
-rw-r--r--include/core/SkColorFilter.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index 346e721c92..a194927799 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -17,6 +17,7 @@ class GrContext;
class GrFragmentProcessor;
class SkBitmap;
class SkColorSpace;
+class SkFallbackAlloc;
class SkRasterPipeline;
/**
@@ -72,7 +73,8 @@ public:
virtual void filterSpan4f(const SkPM4f src[], int count, SkPM4f result[]) const;
- bool appendStages(SkRasterPipeline*, bool shaderIsOpaque) const;
+ bool appendStages(SkRasterPipeline*, SkColorSpace*, SkFallbackAlloc*,
+ bool shaderIsOpaque) const;
enum Flags {
/** If set the filter methods will not change the alpha channel of the colors.
@@ -158,7 +160,8 @@ public:
protected:
SkColorFilter() {}
- virtual bool onAppendStages(SkRasterPipeline*, bool shaderIsOpaque) const;
+ virtual bool onAppendStages(SkRasterPipeline*, SkColorSpace*, SkFallbackAlloc*,
+ bool shaderIsOpaque) const;
private:
/*