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

Unified Diff: src/core/SkValidationUtils.h

Issue 302053002: Revert of setConfig -> setInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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 | « src/core/SkScalerContext.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkValidationUtils.h
diff --git a/src/core/SkValidationUtils.h b/src/core/SkValidationUtils.h
index e9e59866ca991aa6aba5968d20312f390d5eb90d..683da29c187645048420235ba2a39ce74922ee54 100644
--- a/src/core/SkValidationUtils.h
+++ b/src/core/SkValidationUtils.h
@@ -23,6 +23,12 @@
return (mode >= 0) && (mode <= SkXfermode::kLastMode);
}
+/** Returns true if config's value is in the SkBitmap::Config enum.
+ */
+static inline bool SkIsValidConfig(SkBitmap::Config config) {
+ return (config >= 0) && (config <= static_cast<int>(SkBitmap::kConfigCount));
+}
+
/** Returns true if the rect's dimensions are between 0 and SK_MaxS32
*/
static inline bool SkIsValidIRect(const SkIRect& rect) {
« no previous file with comments | « src/core/SkScalerContext.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698