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

Unified Diff: include/core/SkFlattenableSerialization.h

Issue 44573002: Enabling validation code in serialization and adding serialization to fuzzer (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fixed SkValidatingReadBuffer's constructor Created 7 years, 2 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 | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkFlattenableSerialization.h
diff --git a/include/core/SkFlattenableSerialization.h b/include/core/SkFlattenableSerialization.h
index 2ed244c1ed1d0d6e5f3f45894151da3c8afa7388..870d9fe2bf2edbe4ab3293c91c91f30a0935b55c 100644
--- a/include/core/SkFlattenableSerialization.h
+++ b/include/core/SkFlattenableSerialization.h
@@ -8,12 +8,19 @@
#ifndef SkFlattenableSerialization_DEFINED
#define SkFlattenableSerialization_DEFINED
-#include "SkTypes.h"
+#include "SkFlattenable.h"
class SkData;
-class SkFlattenable;
-SK_API SkData* SkSerializeFlattenable(SkFlattenable*);
-SK_API SkFlattenable* SkDeserializeFlattenable(const void* data, size_t size);
+SK_API SkData* SkValidatingSerializeFlattenable(SkFlattenable*);
+SK_API SkFlattenable* SkValidatingDeserializeFlattenable(const void* data, size_t size,
+ SkFlattenable::Type type);
+
+// Temporary fix for canary build
+#define SkSerializeFlattenable(flattenable) \
+SkValidatingSerializeFlattenable(flattenable)
+
+#define SkDeserializeFlattenable(data, size) \
+SkValidatingDeserializeFlattenable(data, size, SkFlattenable::kSkImageFilter_Type)
#endif
« no previous file with comments | « no previous file | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698