OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkColorSpace_Base.h" | 8 #include "SkColorSpace_Base.h" |
9 #include "SkPDFCanon.h" | |
10 #include "SkPDFCanvas.h" | 9 #include "SkPDFCanvas.h" |
11 #include "SkPDFDevice.h" | 10 #include "SkPDFDevice.h" |
12 #include "SkPDFDocument.h" | 11 #include "SkPDFDocument.h" |
13 #include "SkPDFFont.h" | |
14 #include "SkPDFStream.h" | 12 #include "SkPDFStream.h" |
15 #include "SkPDFUtils.h" | 13 #include "SkPDFUtils.h" |
16 #include "SkStream.h" | 14 #include "SkStream.h" |
17 | 15 |
18 SkPDFObjectSerializer::SkPDFObjectSerializer() : fBaseOffset(0), fNextToBeSerial
ized(0) {} | 16 SkPDFObjectSerializer::SkPDFObjectSerializer() : fBaseOffset(0), fNextToBeSerial
ized(0) {} |
19 | 17 |
20 template <class T> static void renew(T* t) { t->~T(); new (t) T; } | 18 template <class T> static void renew(T* t) { t->~T(); new (t) T; } |
21 | 19 |
22 SkPDFObjectSerializer::~SkPDFObjectSerializer() { | 20 SkPDFObjectSerializer::~SkPDFObjectSerializer() { |
23 for (int i = 0; i < fObjNumMap.objects().count(); ++i) { | 21 for (int i = 0; i < fObjNumMap.objects().count(); ++i) { |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 } | 416 } |
419 | 417 |
420 sk_sp<SkDocument> SkDocument::MakePDF(SkWStream* stream, | 418 sk_sp<SkDocument> SkDocument::MakePDF(SkWStream* stream, |
421 SkScalar dpi, | 419 SkScalar dpi, |
422 const SkDocument::PDFMetadata& metadata, | 420 const SkDocument::PDFMetadata& metadata, |
423 sk_sp<SkPixelSerializer> jpegEncoder, | 421 sk_sp<SkPixelSerializer> jpegEncoder, |
424 bool pdfa) { | 422 bool pdfa) { |
425 return SkPDFMakeDocument(stream, nullptr, dpi, metadata, | 423 return SkPDFMakeDocument(stream, nullptr, dpi, metadata, |
426 std::move(jpegEncoder), pdfa); | 424 std::move(jpegEncoder), pdfa); |
427 } | 425 } |
OLD | NEW |