OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 The Android Open Source Project | 3 * Copyright 2010 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkData.h" | 10 #include "SkData.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 } | 42 } |
43 catalog->addObject(fContentStream.get(), firstPage); | 43 catalog->addObject(fContentStream.get(), firstPage); |
44 resourceDict->getReferencedResources(knownResourceObjects, | 44 resourceDict->getReferencedResources(knownResourceObjects, |
45 newResourceObjects, | 45 newResourceObjects, |
46 true); | 46 true); |
47 } | 47 } |
48 | 48 |
49 off_t SkPDFPage::getPageSize(SkPDFCatalog* catalog, off_t fileOffset) { | 49 off_t SkPDFPage::getPageSize(SkPDFCatalog* catalog, off_t fileOffset) { |
50 SkASSERT(fContentStream.get() != NULL); | 50 SkASSERT(fContentStream.get() != NULL); |
51 catalog->setFileOffset(fContentStream.get(), fileOffset); | 51 catalog->setFileOffset(fContentStream.get(), fileOffset); |
52 return fContentStream->getOutputSize(catalog, true); | 52 return SkToOffT(fContentStream->getOutputSize(catalog, true)); |
53 } | 53 } |
54 | 54 |
55 void SkPDFPage::emitPage(SkWStream* stream, SkPDFCatalog* catalog) { | 55 void SkPDFPage::emitPage(SkWStream* stream, SkPDFCatalog* catalog) { |
56 SkASSERT(fContentStream.get() != NULL); | 56 SkASSERT(fContentStream.get() != NULL); |
57 fContentStream->emitObject(stream, catalog, true); | 57 fContentStream->emitObject(stream, catalog, true); |
58 } | 58 } |
59 | 59 |
60 // static | 60 // static |
61 void SkPDFPage::GeneratePageTree(const SkTDArray<SkPDFPage*>& pages, | 61 void SkPDFPage::GeneratePageTree(const SkTDArray<SkPDFPage*>& pages, |
62 SkPDFCatalog* catalog, | 62 SkPDFCatalog* catalog, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 return fDevice->getFontResources(); | 149 return fDevice->getFontResources(); |
150 } | 150 } |
151 | 151 |
152 const SkPDFGlyphSetMap& SkPDFPage::getFontGlyphUsage() const { | 152 const SkPDFGlyphSetMap& SkPDFPage::getFontGlyphUsage() const { |
153 return fDevice->getFontGlyphUsage(); | 153 return fDevice->getFontGlyphUsage(); |
154 } | 154 } |
155 | 155 |
156 void SkPDFPage::appendDestinations(SkPDFDict* dict) { | 156 void SkPDFPage::appendDestinations(SkPDFDict* dict) { |
157 fDevice->appendDestinations(dict, this); | 157 fDevice->appendDestinations(dict, this); |
158 } | 158 } |
OLD | NEW |