aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkColor.h2
-rw-r--r--include/core/SkColorFilter.h4
-rw-r--r--include/core/SkShader.h4
3 files changed, 10 insertions, 0 deletions
diff --git a/include/core/SkColor.h b/include/core/SkColor.h
index f18fb7ee5e..3ebd18b7aa 100644
--- a/include/core/SkColor.h
+++ b/include/core/SkColor.h
@@ -169,6 +169,8 @@ struct SkPM4f {
float fVec[4];
float a() const { return fVec[SK_A32_SHIFT/8]; }
+
+ static SkPM4f FromPMColor(SkPMColor);
};
/*
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index 211aae6962..aece22e05a 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -81,6 +81,10 @@ public:
*/
virtual uint32_t getFlags() const { return 0; }
+ bool supports4f() const {
+ return SkToBool(this->getFlags() & kSupports4f_Flag);
+ }
+
/**
* If this subclass can optimally createa composition with the inner filter, return it as
* a new filter (which the caller must unref() when it is done). If no such optimization
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index bf6d6ddb42..297091d542 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -121,6 +121,10 @@ public:
*/
virtual uint32_t getFlags() const { return 0; }
+ bool supports4f() const {
+ return SkToBool(this->getFlags() & kSupports4f_Flag);
+ }
+
/**
* Called for each span of the object being drawn. Your subclass should
* set the appropriate colors (with premultiplied alpha) that correspond