Index: src/pdf/SkPDFImage.cpp |
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp |
index 7e17f98a1577b968171fecb9a45cba79aa730e16..77fd84eff94d0be5911f5bc67232d81fafe42453 100644 |
--- a/src/pdf/SkPDFImage.cpp |
+++ b/src/pdf/SkPDFImage.cpp |
@@ -512,7 +512,7 @@ |
} |
if (stream != NULL) { |
- this->setData(stream); |
+ setData(stream); |
fStreamValid = true; |
} else { |
fStreamValid = false; |
@@ -598,11 +598,13 @@ |
SkAutoTUnref<SkData> data(fEncoder(&pixelRefOffset, subset)); |
if (data.get() && data->size() < get_uncompressed_size(fBitmap, |
fSrcRect)) { |
- this->setData(data.get()); |
+ SkAutoTUnref<SkStream> stream(SkNEW_ARGS(SkMemoryStream, |
+ (data))); |
+ setData(stream.get()); |
insertName("Filter", "DCTDecode"); |
insertInt("ColorTransform", kNoColorTransform); |
- insertInt("Length", this->dataSize()); |
+ insertInt("Length", getData()->getLength()); |
setState(kCompressed_State); |
return true; |
} |
@@ -611,7 +613,7 @@ |
if (!fStreamValid) { |
SkAutoTUnref<SkStream> stream( |
extract_image_data(fBitmap, fSrcRect, fIsAlpha, NULL)); |
- this->setData(stream); |
+ setData(stream); |
fStreamValid = true; |
} |
return INHERITED::populate(catalog); |