diff options
author | 2016-02-04 11:35:27 -0800 | |
---|---|---|
committer | 2016-02-04 11:35:27 -0800 | |
commit | f7cdb06d62bd732599c7ee407dfd76d32d671755 (patch) | |
tree | 52cd10f9671d35d50713f6ca3156f52f5a4e687a /include | |
parent | eb10ed40905173586fc7a926aa2fe405bab66573 (diff) |
extend compose-colorfilter to 4f
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1664663003
Review URL: https://codereview.chromium.org/1664663003
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkColor.h | 4 | ||||
-rw-r--r-- | include/core/SkColorFilter.h | 5 |
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). |