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

Unified Diff: include/core/SkXfermode.h

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Added ImageFilter derived classes safety checks (retry) Created 7 years, 3 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
Index: include/core/SkXfermode.h
diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h
index ef00f71b75ecb95bf4a900718efb79356e0a1b35..a5321a5bec4c53ce84793b247ebded31f8fe7a59 100644
--- a/include/core/SkXfermode.h
+++ b/include/core/SkXfermode.h
@@ -79,6 +79,10 @@ public:
*/
static bool AsCoeff(const SkXfermode*, Coeff* src, Coeff* dst);
+ /** Returns true if coeff's value is in the Coeff enum.
+ */
+ static bool IsValidCoeff(Coeff coeff);
reed1 2013/09/03 20:25:21 Move this to some validating helper file?
sugoi1 2013/09/04 18:01:10 Done.
+
/** List of predefined xfermodes.
The algebra for the modes uses the following symbols:
Sa, Sc - source alpha and color
@@ -160,6 +164,10 @@ public:
*/
static bool IsMode(const SkXfermode* xfer, Mode mode);
+ /** Returns true if mode's value is in the Mode enum.
+ */
+ static bool IsValidMode(Mode mode);
+
/** Return an SkXfermode object for the specified mode.
*/
static SkXfermode* Create(Mode mode);

Powered by Google App Engine
This is Rietveld 408576698