Index: src/core/SkPicture.cpp |
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp |
index 02d495e4c6955d9a5308ee46e0e6c8a0aa52f521..26ec76184edcce8e0c74866752330897b0016bae 100644 |
--- a/src/core/SkPicture.cpp |
+++ b/src/core/SkPicture.cpp |
@@ -139,11 +139,18 @@ SkPicture* SkPicture::Forwardport(const SkPictInfo& info, const SkPictureData* d |
} |
SkPicture* SkPicture::CreateFromStream(SkStream* stream, InstallPixelRefProc proc) { |
+ return CreateFromStream(stream, proc, nullptr); |
+} |
+ |
+SkPicture* SkPicture::CreateFromStream(SkStream* stream, |
+ InstallPixelRefProc proc, |
+ SkTypefacePlayback* typefaces) { |
SkPictInfo info; |
if (!InternalOnly_StreamIsSKP(stream, &info) || !stream->readBool()) { |
return nullptr; |
} |
- SkAutoTDelete<SkPictureData> data(SkPictureData::CreateFromStream(stream, info, proc)); |
+ SkAutoTDelete<SkPictureData> data( |
+ SkPictureData::CreateFromStream(stream, info, proc, typefaces)); |
return Forwardport(info, data); |
} |
@@ -166,13 +173,19 @@ SkPictureData* SkPicture::backport() const { |
} |
void SkPicture::serialize(SkWStream* stream, SkPixelSerializer* pixelSerializer) const { |
+ this->serialize(stream, pixelSerializer, nullptr); |
+} |
+ |
+void SkPicture::serialize(SkWStream* stream, |
+ SkPixelSerializer* pixelSerializer, |
+ SkRefCntSet* typefaceSet) const { |
SkPictInfo info = this->createHeader(); |
SkAutoTDelete<SkPictureData> data(this->backport()); |
stream->write(&info, sizeof(info)); |
if (data) { |
stream->writeBool(true); |
- data->serialize(stream, pixelSerializer); |
+ data->serialize(stream, pixelSerializer, typefaceSet); |
} else { |
stream->writeBool(false); |
} |