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

Unified Diff: src/pdf/SkPDFImage.cpp

Issue 354043005: Revert of Switch SkPDFStream's internal storage from SkStream to SkData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | « src/pdf/SkPDFGraphicState.cpp ('k') | src/pdf/SkPDFPage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/pdf/SkPDFGraphicState.cpp ('k') | src/pdf/SkPDFPage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698