Index: include/core/SkWriter32.h |
diff --git a/include/core/SkWriter32.h b/include/core/SkWriter32.h |
index fd24ba9ddf9806b03fb67c951c4023081e84785e..737ffd581d0c6bb5c12b04ce156e03daac9f3f63 100644 |
--- a/include/core/SkWriter32.h |
+++ b/include/core/SkWriter32.h |
@@ -12,6 +12,7 @@ |
#include "SkData.h" |
#include "SkMatrix.h" |
+#include "SkPatch.h" |
#include "SkPath.h" |
#include "SkPoint.h" |
#include "SkRRect.h" |
@@ -137,6 +138,12 @@ public: |
void writeRRect(const SkRRect& rrect) { |
rrect.writeToMemory(this->reserve(SkRRect::kSizeInMemory)); |
} |
+ |
+ void writePatch(const SkPatch& patch) { |
+ size_t size = patch.writeToMemory(NULL); |
+ SkASSERT(SkAlign4(size) == size); |
+ patch.writeToMemory(this->reserve(size)); |
+ } |
void writePath(const SkPath& path) { |
size_t size = path.writeToMemory(NULL); |