diff options
author | 2016-07-29 10:13:18 -0700 | |
---|---|---|
committer | 2016-07-29 10:13:18 -0700 | |
commit | fa25106f02f26d7a149cfe57c1d4756372e0755c (patch) | |
tree | 01736ac9c78333d51ababc1cf2f48422979319e1 /src/pdf/SkPDFDocument.cpp | |
parent | d05a8752738f84b0115678b3cdad89237173e904 (diff) |
SkPDF: PDFStream has-a not is-a PDFDict
Motivation:
SkPDFStream and SkPDFSharedStream now work the same.
Also:
- move SkPDFStream into SkPDFTypes (it's a fundamental PDF type).
- minor refactor of SkPDFSharedStream
- SkPDFSharedStream takes unique_ptr to represent ownership
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190883003
Review-Url: https://codereview.chromium.org/2190883003
Diffstat (limited to 'src/pdf/SkPDFDocument.cpp')
-rw-r--r-- | src/pdf/SkPDFDocument.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp index 95857c1846..dd68b5bb39 100644 --- a/src/pdf/SkPDFDocument.cpp +++ b/src/pdf/SkPDFDocument.cpp @@ -9,7 +9,6 @@ #include "SkPDFCanvas.h" #include "SkPDFDevice.h" #include "SkPDFDocument.h" -#include "SkPDFStream.h" #include "SkPDFUtils.h" #include "SkStream.h" @@ -321,7 +320,7 @@ static sk_sp<SkData> SkSrgbIcm() { static sk_sp<SkPDFStream> make_srgb_color_profile() { sk_sp<SkPDFStream> stream = sk_make_sp<SkPDFStream>(SkSrgbIcm()); - stream->insertInt("N", 3); + stream->dict()->insertInt("N", 3); sk_sp<SkPDFArray> array = sk_make_sp<SkPDFArray>(); array->appendScalar(0.0f); array->appendScalar(1.0f); @@ -329,7 +328,7 @@ static sk_sp<SkPDFStream> make_srgb_color_profile() { array->appendScalar(1.0f); array->appendScalar(0.0f); array->appendScalar(1.0f); - stream->insertObject("Range", std::move(array)); + stream->dict()->insertObject("Range", std::move(array)); return stream; } |