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

Unified Diff: src/utils/SkPDFRasterizer.cpp

Issue 849103004: Make SkStream *not* ref counted. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase, just in case. Created 5 years, 11 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/utils/SkPDFRasterizer.h ('k') | src/utils/mac/SkStream_mac.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkPDFRasterizer.cpp
diff --git a/src/utils/SkPDFRasterizer.cpp b/src/utils/SkPDFRasterizer.cpp
index 1cb792fb817084cd002af0f68905a6776daf6ce8..d44dfa30b95c6f44ce5aed09930c2e86d7437874 100644
--- a/src/utils/SkPDFRasterizer.cpp
+++ b/src/utils/SkPDFRasterizer.cpp
@@ -27,6 +27,7 @@
#ifdef SK_BUILD_POPPLER
bool SkPopplerRasterizePDF(SkStream* pdf, SkBitmap* output) {
+ SkAutoTDelete<SkStream> streamDeleter(pdf);
size_t size = pdf->getLength();
SkAutoFree buffer(sk_malloc_throw(size));
pdf->read(buffer.get(), size);
@@ -81,6 +82,7 @@ bool SkPopplerRasterizePDF(SkStream* pdf, SkBitmap* output) {
#ifdef SK_BUILD_NATIVE_PDF_RENDERER
bool SkNativeRasterizePDF(SkStream* pdf, SkBitmap* output) {
+ SkAutoTDelete<SkStream> streamDeleter(pdf);
return SkPDFNativeRenderToBitmap(pdf, output);
}
#endif // SK_BUILD_NATIVE_PDF_RENDERER
« no previous file with comments | « src/utils/SkPDFRasterizer.h ('k') | src/utils/mac/SkStream_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698