aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-02-04 11:35:27 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-04 11:35:27 -0800
commitf7cdb06d62bd732599c7ee407dfd76d32d671755 (patch)
tree52cd10f9671d35d50713f6ca3156f52f5a4e687a /include
parenteb10ed40905173586fc7a926aa2fe405bab66573 (diff)
extend compose-colorfilter to 4f
Diffstat (limited to 'include')
-rw-r--r--include/core/SkColor.h4
-rw-r--r--include/core/SkColorFilter.h5
2 files changed, 9 insertions, 0 deletions
diff --git a/include/core/SkColor.h b/include/core/SkColor.h
index 461a53877d..90453f548c 100644
--- a/include/core/SkColor.h
+++ b/include/core/SkColor.h
@@ -160,6 +160,8 @@ typedef SkPMColor (*SkXfermodeProc)(SkPMColor src, SkPMColor dst);
///////////////////////////////////////////////////////////////////////////////////////////////////
+struct SkColor4f;
+
/*
* The float values are 0...1 premultiplied
*/
@@ -174,6 +176,8 @@ struct SkPM4f {
float a() const { return fVec[A]; }
+ SkColor4f unpremul() const;
+
static SkPM4f FromPMColor(SkPMColor);
#ifdef SK_DEBUG
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index 14192c55ea..ad97a730ee 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -102,6 +102,11 @@ public:
*/
SkColor filterColor(SkColor) const;
+ /**
+ * Filters a single color.
+ */
+ SkColor4f filterColor4f(const SkColor4f&) const;
+
/** Create a colorfilter that uses the specified color and mode.
If the Mode is DST, this function will return NULL (since that
mode will have no effect on the result).