diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-04-19 18:36:09 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-04-19 18:36:09 +0000 |
commit | 6b7aee387d3b4b2df5894b51fa1c0baf649c6540 (patch) | |
tree | 2bef9aeea8c0894bba365a073963f8ff84e62fc3 /include | |
parent | 34cec2416c70a2fd8e60a9f0831eaddbde7d72b5 (diff) |
optimize when we have a colorfilter, but no shader or xfermode
git-svn-id: http://skia.googlecode.com/svn/trunk@1152 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkColorFilter.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h index 581806bfe5..aee60196f6 100644 --- a/include/core/SkColorFilter.h +++ b/include/core/SkColorFilter.h @@ -65,6 +65,15 @@ public: */ virtual uint32_t getFlags() { return 0; } + /** + * Apply this colorfilter to the specified SkColor. This routine handles + * converting to SkPMColor, calling the filter, and then converting back + * to SkColor. This method is not virtual, but will call filterSpan() + * which is virtual. + */ + SkColor filterColor(SkColor); + + /** 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). @@ -90,7 +99,7 @@ public: are ignored. */ static SkColorFilter* CreateLightingFilter(SkColor mul, SkColor add); - + protected: SkColorFilter() {} SkColorFilter(SkFlattenableReadBuffer& rb) : INHERITED(rb) {} |