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

Unified Diff: include/core/SkFlattenableBuffers.h

Issue 61913002: Adding error checks to SkRBuffer (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Added doc Created 7 years, 1 month 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 | src/core/SkBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkFlattenableBuffers.h
diff --git a/include/core/SkFlattenableBuffers.h b/include/core/SkFlattenableBuffers.h
index 8a94bb1db252d08d8c319e2705bc2b6bb2918344..575dec8917661d3356f0e2035aecb0033c5dceeb 100644
--- a/include/core/SkFlattenableBuffers.h
+++ b/include/core/SkFlattenableBuffers.h
@@ -144,7 +144,15 @@ public:
return SkData::NewFromMalloc(buffer, len);
}
- virtual void validate(bool isValid) {}
+ /** This function validates that the isValid input parameter is true
+ * If isValidating() is false, then true is always returned
+ * If isValidating() is true, then true is returned until validate() is called with isValid
+ * set to false. When isValid is false, an error flag will be set internally and, from that
+ * point on, validate() will return false. The error flag cannot be unset.
+ *
+ * @param isValid result of a test that is expected to be true
+ */
+ virtual bool validate(bool isValid);
private:
template <typename T> T* readFlattenableT();
« no previous file with comments | « no previous file | src/core/SkBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698