Index: include/core/SkColorFilter.h |
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h |
index ea314811bae85fcaf09b9a28c801668fadfc6b29..fe151a2533fe71b07f110e6def629fc340b1105a 100644 |
--- a/include/core/SkColorFilter.h |
+++ b/include/core/SkColorFilter.h |
@@ -68,15 +68,31 @@ |
@param count the number of entries in the src[] and result[] arrays |
@param result written by the filter |
*/ |
- virtual void filterSpan(const SkPMColor src[], int count, SkPMColor result[]) const = 0; |
+ virtual void filterSpan(const SkPMColor src[], int count, |
+ SkPMColor result[]) const = 0; |
+ /** Called with a scanline of colors, as if there was a shader installed. |
+ The implementation writes out its filtered version into result[]. |
+ Note: shader and result may be the same buffer. |
+ @param src array of colors, possibly generated by a shader |
+ @param count the number of entries in the src[] and result[] arrays |
+ @param result written by the filter |
+ */ |
+ virtual void filterSpan16(const uint16_t shader[], int count, |
+ uint16_t result[]) const; |
enum Flags { |
- /** If set the filter methods will not change the alpha channel of the colors. |
+ /** If set the filter methods will not change the alpha channel of the |
+ colors. |
*/ |
kAlphaUnchanged_Flag = 0x01, |
+ /** If set, this subclass implements filterSpan16(). If this flag is |
+ set, then kAlphaUnchanged_Flag must also be set. |
+ */ |
+ kHasFilter16_Flag = 0x02 |
}; |
- /** Returns the flags for this filter. Override in subclasses to return custom flags. |
+ /** Returns the flags for this filter. Override in subclasses to return |
+ custom flags. |
*/ |
virtual uint32_t getFlags() const { return 0; } |