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

Unified Diff: src/pdf/SkPDFImage.cpp

Issue 340783013: Switch SkPDFStream's internal storage from SkStream to SkData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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 77fd84eff94d0be5911f5bc67232d81fafe42453..7e17f98a1577b968171fecb9a45cba79aa730e16 100644
--- a/src/pdf/SkPDFImage.cpp
+++ b/src/pdf/SkPDFImage.cpp
@@ -512,7 +512,7 @@ SkPDFImage::SkPDFImage(SkStream* stream,
}
if (stream != NULL) {
- setData(stream);
+ this->setData(stream);
fStreamValid = true;
} else {
fStreamValid = false;
@@ -598,13 +598,11 @@ bool SkPDFImage::populate(SkPDFCatalog* catalog) {
SkAutoTUnref<SkData> data(fEncoder(&pixelRefOffset, subset));
if (data.get() && data->size() < get_uncompressed_size(fBitmap,
fSrcRect)) {
- SkAutoTUnref<SkStream> stream(SkNEW_ARGS(SkMemoryStream,
- (data)));
- setData(stream.get());
+ this->setData(data.get());
insertName("Filter", "DCTDecode");
insertInt("ColorTransform", kNoColorTransform);
- insertInt("Length", getData()->getLength());
+ insertInt("Length", this->dataSize());
setState(kCompressed_State);
return true;
}
@@ -613,7 +611,7 @@ bool SkPDFImage::populate(SkPDFCatalog* catalog) {
if (!fStreamValid) {
SkAutoTUnref<SkStream> stream(
extract_image_data(fBitmap, fSrcRect, fIsAlpha, NULL));
- setData(stream);
+ this->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