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

Unified Diff: src/pdf/SkPDFStream.cpp

Issue 1227913008: SkPDF: Memory improvements for PDF Streams (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-19 (Wednesday) 17:47:45 EDT Created 5 years, 4 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/SkPDFFont.cpp ('k') | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFStream.cpp
diff --git a/src/pdf/SkPDFStream.cpp b/src/pdf/SkPDFStream.cpp
index 69ce317bb9ccd50aafa8d1c5f149e8dd8decc795..b8f2e4e92b896d656e9a63d50ae7e8574f99ea1f 100644
--- a/src/pdf/SkPDFStream.cpp
+++ b/src/pdf/SkPDFStream.cpp
@@ -20,7 +20,7 @@ void SkPDFStream::emitObject(SkWStream* stream,
const SkPDFSubstituteMap& substitutes) const {
SkASSERT(fCompressedData);
this->INHERITED::emitObject(stream, objNumMap, substitutes);
- // Note: emitObject isn't marked const, but could be in the future
+ // duplicate (a cheap operation) preserves const on fCompressedData.
SkAutoTDelete<SkStreamRewindable> dup(fCompressedData->duplicate());
SkASSERT(dup);
SkASSERT(dup->hasLength());
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698