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

Unified Diff: include/core/SkBitmap.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/SkBitmap.h
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 887169ccb522c2820c8c2f0ff3f78e454d0d00cf..4e539a270e2af8c08c1655571718c9ee0dd8cb04 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -220,6 +220,10 @@ public:
static Sk64 ComputeSize64(Config, int width, int height);
static size_t ComputeSize(Config, int width, int height);
+ /** Returns true if config's Value is in the Config enum.
+ */
+ static bool IsValidConfig(Config config);
reed1 2013/09/03 20:25:21 can we put this in some helper file for validation
sugoi1 2013/09/04 18:01:10 Done.
+
/**
* This will brute-force return true if all of the pixels in the bitmap
* are opaque. If it fails to read the pixels, or encounters an error,

Powered by Google App Engine
This is Rietveld 408576698