Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: include/core/SkColorFilter.h

Issue 1022673007: Revert of remove colorfilter native-565 support. complicating w/ no real value. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/effects/SkColorMatrixFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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; }
« no previous file with comments | « no previous file | include/effects/SkColorMatrixFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698