Index: src/effects/SkTableMaskFilter.cpp |
diff --git a/src/effects/SkTableMaskFilter.cpp b/src/effects/SkTableMaskFilter.cpp |
index 602302e503c0c3e5fe9b7f4b408c4e277baf8da3..42b4ab6ff6d41cbdc3b613878cb0b7c17be0fcc3 100644 |
--- a/src/effects/SkTableMaskFilter.cpp |
+++ b/src/effects/SkTableMaskFilter.cpp |
@@ -71,15 +71,23 @@ SkMask::Format SkTableMaskFilter::getFormat() const { |
} |
void SkTableMaskFilter::flatten(SkWriteBuffer& wb) const { |
- this->INHERITED::flatten(wb); |
wb.writeByteArray(fTable, 256); |
} |
-SkTableMaskFilter::SkTableMaskFilter(SkReadBuffer& rb) |
- : INHERITED(rb) { |
+SkFlattenable* SkTableMaskFilter::CreateProc(SkReadBuffer& buffer) { |
+ uint8_t table[256]; |
+ if (!buffer.readByteArray(table, 256)) { |
+ return NULL; |
+ } |
+ return Create(table); |
+} |
+ |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
+SkTableMaskFilter::SkTableMaskFilter(SkReadBuffer& rb) : INHERITED(rb) { |
SkASSERT(256 == rb.getArrayCount()); |
rb.readByteArray(fTable, 256); |
} |
+#endif |
/////////////////////////////////////////////////////////////////////////////// |