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

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: AnotherPatchSet 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
Index: src/pdf/SkPDFImage.cpp
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp
index 77fd84eff94d0be5911f5bc67232d81fafe42453..5a280c20b927dfb845bba5e06887ca8d974d337b 100644
--- a/src/pdf/SkPDFImage.cpp
+++ b/src/pdf/SkPDFImage.cpp
@@ -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());
+ setData(data.get());
mtklein 2014/06/25 18:12:31 this-> everywhere possible?
hal.canary 2014/06/25 18:56:26 Done.
insertName("Filter", "DCTDecode");
insertInt("ColorTransform", kNoColorTransform);
- insertInt("Length", getData()->getLength());
+ insertInt("Length", this->dataSize());
setState(kCompressed_State);
return true;
}
« src/pdf/SkPDFFont.cpp ('K') | « src/pdf/SkPDFFont.cpp ('k') | src/pdf/SkPDFStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698