aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkColorFilter.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-07-05 15:43:15 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-05 20:16:27 +0000
commit412cda7379626ee3acfd1dbb1441adde81efddc3 (patch)
tree2e57666502214c97a1b48d11ce7c2bfc1f20d0f9 /include/core/SkColorFilter.h
parent2d171397f863699eb7804b814994d4c2fcb00cb7 (diff)
add srgb gamma colorfilters
... faster and more accurate than using SkTableColorFilter todo: update blink after this lands Bug:737981 Change-Id: I55b5c60dd23b9d2cbe9d60f83c74be1a8f3dcfcf Reviewed-on: https://skia-review.googlesource.com/21368 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'include/core/SkColorFilter.h')
-rw-r--r--include/core/SkColorFilter.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index 1033a7268e..68142a29de 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -113,6 +113,14 @@ public:
*/
static sk_sp<SkColorFilter> MakeMatrixFilterRowMajor255(const SkScalar array[20]);
+ /** Construct a colorfilter that applies the srgb gamma curve to the RGB channels */
+ static sk_sp<SkColorFilter> MakeLinearToSRGBGamma();
+
+ /** Construct a colorfilter that applies the inverse of the srgb gamma curve to the
+ * RGB channels
+ */
+ static sk_sp<SkColorFilter> MakeSRGBToLinearGamma();
+
#if SK_SUPPORT_GPU
/**
* A subclass may implement this factory function to work with the GPU backend. It returns