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

Unified Diff: src/pdf/SkPDFGraphicState.cpp

Issue 2190643002: SkPDF: refactor font subset: fewer copies (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-07-27 (Wednesday) 16:22:36 EDT Created 4 years, 5 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/SkPDFStream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFGraphicState.cpp
diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp
index 0752eac32834bb3f5f67545b125f454414249791..17129bb79d46e5a2edc5e2f92b4e512620d909c5 100644
--- a/src/pdf/SkPDFGraphicState.cpp
+++ b/src/pdf/SkPDFGraphicState.cpp
@@ -135,10 +135,8 @@ sk_sp<SkPDFStream> SkPDFGraphicState::MakeInvertFunction() {
static const char psInvert[] = "{1 exch sub}";
// Do not copy the trailing '\0' into the SkData.
- sk_sp<SkData> psInvertStream(
- SkData::NewWithoutCopy(psInvert, strlen(psInvert)));
-
- auto invertFunction = sk_make_sp<SkPDFStream>(psInvertStream.get());
+ auto invertFunction = sk_make_sp<SkPDFStream>(
+ SkData::MakeWithoutCopy(psInvert, strlen(psInvert)));
invertFunction->insertInt("FunctionType", 4);
invertFunction->insertObject("Domain", domainAndRange);
invertFunction->insertObject("Range", std::move(domainAndRange));
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/pdf/SkPDFStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698