Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
SkPDFDocument Class Reference

#include <SkPDFDocumentPriv.h>

Inheritance diagram for SkPDFDocument:
SkDocument SkRefCnt SkRefCntBase

Public Member Functions

 SkPDFDocument (SkWStream *, SkPDF::Metadata)
 
 ~SkPDFDocument () override
 
SkCanvasonBeginPage (SkScalar, SkScalar) override
 
void onEndPage () override
 
void onClose (SkWStream *) override
 
void onAbort () override
 
SkPDFIndirectReference emit (const SkPDFObject &, SkPDFIndirectReference)
 
SkPDFIndirectReference emit (const SkPDFObject &o)
 
template<typename T >
void emitStream (const SkPDFDict &dict, T writeStream, SkPDFIndirectReference ref)
 
const SkPDF::Metadatametadata () const
 
SkPDFIndirectReference getPage (size_t pageIndex) const
 
bool hasCurrentPage () const
 
SkPDFIndirectReference currentPage () const
 
SkPDFTagTree::Mark createMarkIdForNodeId (int nodeId, SkPoint)
 
int createStructParentKeyForNodeId (int nodeId)
 
void addNodeTitle (int nodeId, SkSpan< const char >)
 
std::unique_ptr< SkPDFArraygetAnnotations ()
 
SkPDFIndirectReference reserveRef ()
 
SkString nextFontSubsetTag ()
 
SkExecutorexecutor () const
 
void incrementJobCount ()
 
void signalJobComplete ()
 
size_t currentPageIndex ()
 
size_t pageCount ()
 
const SkMatrixcurrentPageTransform () const
 
- Public Member Functions inherited from SkDocument
SkCanvasbeginPage (SkScalar width, SkScalar height, const SkRect *content=nullptr)
 
void endPage ()
 
void close ()
 
void abort ()
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Public Attributes

skia_private::THashMap< SkPDFImageShaderKey, SkPDFIndirectReference, SkPDFImageShaderKey::HashfImageShaderMap
 
skia_private::THashMap< SkPDFGradientShader::Key, SkPDFIndirectReference, SkPDFGradientShader::KeyHashfGradientPatternMap
 
skia_private::THashMap< SkBitmapKey, SkPDFIndirectReferencefPDFBitmapMap
 
skia_private::THashMap< SkPDFIccProfileKey, SkPDFIndirectReference, SkPDFIccProfileKey::HashfICCProfileMap
 
skia_private::THashMap< uint32_t, std::unique_ptr< SkAdvancedTypefaceMetrics > > fTypefaceMetrics
 
skia_private::THashMap< uint32_t, std::vector< SkString > > fType1GlyphNames
 
skia_private::THashMap< uint32_t, std::vector< SkUnichar > > fToUnicodeMap
 
skia_private::THashMap< uint32_t, SkPDFIndirectReferencefFontDescriptors
 
skia_private::THashMap< uint32_t, SkPDFIndirectReferencefType3FontDescriptors
 
skia_private::THashMap< uint64_t, SkPDFFontfFontMap
 
skia_private::THashMap< SkPDFStrokeGraphicState, SkPDFIndirectReference, SkPDFStrokeGraphicState::HashfStrokeGSMap
 
skia_private::THashMap< SkPDFFillGraphicState, SkPDFIndirectReference, SkPDFFillGraphicState::HashfFillGSMap
 
SkPDFIndirectReference fInvertFunction
 
SkPDFIndirectReference fNoSmaskGraphicState
 
std::vector< std::unique_ptr< SkPDFLink > > fCurrentPageLinks
 
std::vector< SkPDFNamedDestinationfNamedDestinations
 

Additional Inherited Members

- Protected Types inherited from SkDocument
enum  State { kBetweenPages_State , kInPage_State , kClosed_State }
 
- Protected Member Functions inherited from SkDocument
 SkDocument (SkWStream *)
 
 ~SkDocument () override
 
virtual SkCanvasonBeginPage (SkScalar width, SkScalar height)=0
 
virtual void onEndPage ()=0
 
virtual void onClose (SkWStream *)=0
 
virtual void onAbort ()=0
 
SkWStreamgetStream ()
 
State getState () const
 

Detailed Description

Concrete implementation of SkDocument that creates PDF files. This class does not produced linearized or optimized PDFs; instead it it attempts to use a minimum amount of RAM.

Definition at line 95 of file SkPDFDocumentPriv.h.

Constructor & Destructor Documentation

◆ SkPDFDocument()

SkPDFDocument::SkPDFDocument ( SkWStream stream,
SkPDF::Metadata  metadata 
)

Definition at line 233 of file SkPDFDocument.cpp.

236 , fMetadata(std::move(metadata)) {
237 constexpr float kDpiForRasterScaleOne = 72.0f;
238 if (fMetadata.fRasterDPI != kDpiForRasterScaleOne) {
239 fInverseRasterScale = kDpiForRasterScaleOne / fMetadata.fRasterDPI;
240 fRasterScale = fMetadata.fRasterDPI / kDpiForRasterScaleOne;
241 }
242 if (fMetadata.fStructureElementTreeRoot) {
243 fTagTree.init(fMetadata.fStructureElementTreeRoot, fMetadata.fOutline);
244 }
245 fExecutor = fMetadata.fExecutor;
246}
SkDocument(SkWStream *)
Definition: SkDocument.cpp:13
const SkPDF::Metadata & metadata() const
void init(SkPDF::StructureElementNode *, SkPDF::Metadata::Outline)
Definition: SkPDFTag.cpp:202
SkExecutor * fExecutor
enum SkPDF::Metadata::Outline fOutline
SkScalar fRasterDPI
StructureElementNode * fStructureElementTreeRoot

◆ ~SkPDFDocument()

SkPDFDocument::~SkPDFDocument ( )
override

Definition at line 248 of file SkPDFDocument.cpp.

248 {
249 // subclasses of SkDocument must call close() in their destructors.
250 this->close();
251}
void close()
Definition: SkDocument.cpp:52

Member Function Documentation

◆ addNodeTitle()

void SkPDFDocument::addNodeTitle ( int  nodeId,
SkSpan< const char >  title 
)

Definition at line 567 of file SkPDFDocument.cpp.

567 {
568 fTagTree.addNodeTitle(nodeId, std::move(title));
569}
void addNodeTitle(int nodeId, SkSpan< const char >)
Definition: SkPDFTag.cpp:344

◆ createMarkIdForNodeId()

SkPDFTagTree::Mark SkPDFDocument::createMarkIdForNodeId ( int  nodeId,
SkPoint  p 
)

Definition at line 558 of file SkPDFDocument.cpp.

558 {
559 // If the mark isn't on a page (like when emitting a Type3 glyph)
560 // return a temporary mark not attached to the tag tree, node id, or page.
561 if (!this->hasCurrentPage()) {
562 return SkPDFTagTree::Mark();
563 }
564 return fTagTree.createMarkIdForNodeId(nodeId, SkToUInt(this->currentPageIndex()), p);
565}
constexpr unsigned SkToUInt(S x)
Definition: SkTo.h:30
size_t currentPageIndex()
bool hasCurrentPage() const
Mark createMarkIdForNodeId(int nodeId, unsigned pageIndex, SkPoint)
Definition: SkPDFTag.cpp:218

◆ createStructParentKeyForNodeId()

int SkPDFDocument::createStructParentKeyForNodeId ( int  nodeId)

Definition at line 571 of file SkPDFDocument.cpp.

571 {
572 // Structure elements are tied to pages, so don't emit one if not on a page.
573 if (!this->hasCurrentPage()) {
574 return -1;
575 }
576 return fTagTree.createStructParentKeyForNodeId(nodeId, SkToUInt(this->currentPageIndex()));
577}
int createStructParentKeyForNodeId(int nodeId, unsigned pageIndex)
Definition: SkPDFTag.cpp:238

◆ currentPage()

SkPDFIndirectReference SkPDFDocument::currentPage ( ) const
inline

Definition at line 131 of file SkPDFDocumentPriv.h.

131 {
132 return SkASSERT(this->hasCurrentPage() && !fPageRefs.empty()), fPageRefs.back();
133 }
#define SkASSERT(cond)
Definition: SkAssert.h:116

◆ currentPageIndex()

size_t SkPDFDocument::currentPageIndex ( )
inline

Definition at line 155 of file SkPDFDocumentPriv.h.

155{ return fPages.size(); }

◆ currentPageTransform()

const SkMatrix & SkPDFDocument::currentPageTransform ( ) const

Definition at line 549 of file SkPDFDocument.cpp.

549 {
550 static constexpr const SkMatrix gIdentity;
551 // If not on a page (like when emitting a Type3 glyph) return identity.
552 if (!this->hasCurrentPage()) {
553 return gIdentity;
554 }
555 return fPageDevice->initialTransform();
556}
const SkMatrix & initialTransform() const
Definition: SkPDFDevice.h:124

◆ emit() [1/2]

SkPDFIndirectReference SkPDFDocument::emit ( const SkPDFObject object,
SkPDFIndirectReference  ref 
)

Serialize the object, as well as any other objects it indirectly refers to. If any any other objects have been added to the SkPDFObjNumMap without serializing them, they will be serialized as well.

It might go without saying that objects should not be changed after calling serialize, since those changes will be too late.

Definition at line 253 of file SkPDFDocument.cpp.

253 {
254 SkAutoMutexExclusive lock(fMutex);
255 object.emitObject(this->beginObject(ref));
256 this->endObject();
257 return ref;
258}
void ref() const
Definition: SkRefCnt.h:62

◆ emit() [2/2]

SkPDFIndirectReference SkPDFDocument::emit ( const SkPDFObject o)
inline

Definition at line 114 of file SkPDFDocumentPriv.h.

114{ return this->emit(o, this->reserveRef()); }
SkPDFIndirectReference emit(const SkPDFObject &, SkPDFIndirectReference)
SkPDFIndirectReference reserveRef()

◆ emitStream()

template<typename T >
void SkPDFDocument::emitStream ( const SkPDFDict dict,
T  writeStream,
SkPDFIndirectReference  ref 
)
inline

Definition at line 117 of file SkPDFDocumentPriv.h.

117 {
118 SkAutoMutexExclusive lock(fMutex);
119 SkWStream* stream = this->beginObject(ref);
120 dict.emitObject(stream);
121 stream->writeText(" stream\n");
122 writeStream(stream);
123 stream->writeText("\nendstream");
124 this->endObject();
125 }
void emitObject(SkWStream *stream) const override
Definition: SkPDFTypes.cpp:456

◆ executor()

SkExecutor * SkPDFDocument::executor ( ) const
inline

Definition at line 152 of file SkPDFDocumentPriv.h.

152{ return fExecutor; }

◆ getAnnotations()

std::unique_ptr< SkPDFArray > SkPDFDocument::getAnnotations ( )

Definition at line 338 of file SkPDFDocument.cpp.

338 {
339 std::unique_ptr<SkPDFArray> array;
340 size_t count = fCurrentPageLinks.size();
341 if (0 == count) {
342 return array; // is nullptr
343 }
344 array = SkPDFMakeArray();
345 array->reserve(count);
346 for (const auto& link : fCurrentPageLinks) {
347 SkPDFDict annotation("Annot");
348 populate_link_annotation(&annotation, link->fRect);
349 if (link->fType == SkPDFLink::Type::kUrl) {
350 std::unique_ptr<SkPDFDict> action = SkPDFMakeDict("Action");
351 action->insertName("S", "URI");
352 // This is documented to be a 7 bit ASCII (byte) string.
353 action->insertByteString("URI", ToValidUtf8String(*link->fData));
354 annotation.insertObject("A", std::move(action));
355 } else if (link->fType == SkPDFLink::Type::kNamedDestination) {
356 annotation.insertName("Dest", ToValidUtf8String(*link->fData));
357 } else {
358 SkDEBUGFAIL("Unknown link type.");
359 }
360
361 if (link->fNodeId) {
362 int structParentKey = createStructParentKeyForNodeId(link->fNodeId);
363 if (structParentKey != -1) {
364 annotation.insertInt("StructParent", structParentKey);
365 }
366 }
367
368 SkPDFIndirectReference annotationRef = emit(annotation);
369 array->appendRef(annotationRef);
370 if (link->fNodeId) {
371 fTagTree.addNodeAnnotation(link->fNodeId, annotationRef, SkToUInt(this->currentPageIndex()));
372 }
373 }
374 return array;
375}
int count
Definition: FontMgrTest.cpp:50
#define SkDEBUGFAIL(message)
Definition: SkAssert.h:118
static void populate_link_annotation(SkPDFDict *annotation, const SkRect &r)
static SkString ToValidUtf8String(const SkData &d)
static std::unique_ptr< SkPDFDict > SkPDFMakeDict(const char *type=nullptr)
Definition: SkPDFTypes.h:185
static std::unique_ptr< SkPDFArray > SkPDFMakeArray(Args... args)
Definition: SkPDFTypes.h:125
std::vector< std::unique_ptr< SkPDFLink > > fCurrentPageLinks
int createStructParentKeyForNodeId(int nodeId)
void addNodeAnnotation(int nodeId, SkPDFIndirectReference annotationRef, unsigned pageIndex)
Definition: SkPDFTag.cpp:329
def link(from_root, to_root)
Definition: dart_pkg.py:44

◆ getPage()

SkPDFIndirectReference SkPDFDocument::getPage ( size_t  pageIndex) const

Definition at line 544 of file SkPDFDocument.cpp.

544 {
545 SkASSERT(pageIndex < fPageRefs.size());
546 return fPageRefs[pageIndex];
547}

◆ hasCurrentPage()

bool SkPDFDocument::hasCurrentPage ( ) const
inline

Definition at line 130 of file SkPDFDocumentPriv.h.

130{ return bool(fPageDevice); }

◆ incrementJobCount()

void SkPDFDocument::incrementJobCount ( )

Definition at line 672 of file SkPDFDocument.cpp.

672{ fJobCount++; }

◆ metadata()

const SkPDF::Metadata & SkPDFDocument::metadata ( ) const
inline

Definition at line 127 of file SkPDFDocumentPriv.h.

127{ return fMetadata; }

◆ nextFontSubsetTag()

SkString SkPDFDocument::nextFontSubsetTag ( )

Definition at line 592 of file SkPDFDocument.cpp.

592 {
593 // PDF 32000-1:2008 Section 9.6.4 FontSubsets "The tag shall consist of six uppercase letters"
594 // "followed by a plus sign" "different subsets in the same PDF file shall have different tags."
595 // There are 26^6 or 308,915,776 possible values. So start in range then increment and mod.
596 uint32_t thisFontSubsetTag = fNextFontSubsetTag;
597 fNextFontSubsetTag = (fNextFontSubsetTag + 1u) % 308915776u;
598
599 SkString subsetTag(7);
600 char* subsetTagData = subsetTag.data();
601 for (size_t i = 0; i < 6; ++i) {
602 subsetTagData[i] = 'A' + (thisFontSubsetTag % 26);
603 thisFontSubsetTag /= 26;
604 }
605 subsetTagData[6] = '+';
606 return subsetTag;
607}

◆ onAbort()

void SkPDFDocument::onAbort ( )
overridevirtual

Implements SkDocument.

Definition at line 405 of file SkPDFDocument.cpp.

405 {
406 this->waitForJobs();
407}

◆ onBeginPage()

SkCanvas * SkPDFDocument::onBeginPage ( SkScalar  width,
SkScalar  height 
)
overridevirtual

Implements SkDocument.

Definition at line 272 of file SkPDFDocument.cpp.

272 {
273 SkASSERT(fCanvas.imageInfo().dimensions().isZero());
274 if (fPages.empty()) {
275 // if this is the first page if the document.
276 {
277 SkAutoMutexExclusive autoMutexAcquire(fMutex);
278 serializeHeader(&fOffsetMap, this->getStream());
279
280 }
281
282 fInfoDict = this->emit(*SkPDFMetadata::MakeDocumentInformationDict(fMetadata));
283 if (fMetadata.fPDFA) {
284 fUUID = SkPDFMetadata::CreateUUID(fMetadata);
285 // We use the same UUID for Document ID and Instance ID since this
286 // is the first revision of this document (and Skia does not
287 // support revising existing PDF documents).
288 // If we are not in PDF/A mode, don't use a UUID since testing
289 // works best with reproducible outputs.
290 fXMP = SkPDFMetadata::MakeXMPObject(fMetadata, fUUID, fUUID, this);
291 }
292 }
293 // By scaling the page at the device level, we will create bitmap layer
294 // devices at the rasterized scale, not the 72dpi scale. Bitmap layer
295 // devices are created when saveLayer is called with an ImageFilter; see
296 // SkPDFDevice::onCreateDevice().
297 SkISize pageSize = (SkSize{width, height} * fRasterScale).toRound();
298 SkMatrix initialTransform;
299 // Skia uses the top left as the origin but PDF natively has the origin at the
300 // bottom left. This matrix corrects for that, as well as the raster scale.
301 initialTransform.setScaleTranslate(fInverseRasterScale, -fInverseRasterScale,
302 0, fInverseRasterScale * pageSize.height());
303 fPageDevice = sk_make_sp<SkPDFDevice>(pageSize, this, initialTransform);
304 reset_object(&fCanvas, fPageDevice);
305 fCanvas.scale(fRasterScale, fRasterScale);
306 fPageRefs.push_back(this->reserveRef());
307 return &fCanvas;
308}
static void serializeHeader(SkPDFOffsetMap *offsetMap, SkWStream *wStream)
static void reset_object(T *dst, Args &&... args)
void scale(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1289
SkImageInfo imageInfo() const
Definition: SkCanvas.cpp:1206
SkWStream * getStream()
Definition: SkDocument.h:77
void setScaleTranslate(SkScalar sx, SkScalar sy, SkScalar tx, SkScalar ty)
Definition: SkMatrix.h:1803
std::unique_ptr< SkPDFObject > MakeDocumentInformationDict(const SkPDF::Metadata &)
SkPDFIndirectReference MakeXMPObject(const SkPDF::Metadata &metadata, const SkUUID &doc, const SkUUID &instance, SkPDFDocument *)
SkUUID CreateUUID(const SkPDF::Metadata &)
int32_t height
int32_t width
Definition: SkSize.h:16
constexpr int32_t height() const
Definition: SkSize.h:37
bool isZero() const
Definition: SkSize.h:28
SkISize dimensions() const
Definition: SkImageInfo.h:421
Definition: SkSize.h:52

◆ onClose()

void SkPDFDocument::onClose ( SkWStream stream)
overridevirtual

Implements SkDocument.

Definition at line 609 of file SkPDFDocument.cpp.

609 {
610 SkASSERT(fCanvas.imageInfo().dimensions().isZero());
611 if (fPages.empty()) {
612 this->waitForJobs();
613 return;
614 }
615 auto docCatalog = SkPDFMakeDict("Catalog");
616 if (fMetadata.fPDFA) {
618 docCatalog->insertRef("Metadata", fXMP);
619 // Don't specify OutputIntents if we are not in PDF/A mode since
620 // no one has ever asked for this feature.
621 docCatalog->insertObject("OutputIntents", make_srgb_output_intents(this));
622 }
623
624 docCatalog->insertRef("Pages", generate_page_tree(this, std::move(fPages), fPageRefs));
625
626 if (!fNamedDestinations.empty()) {
627 docCatalog->insertRef("Dests", append_destinations(this, fNamedDestinations));
628 fNamedDestinations.clear();
629 }
630
631 // Handle tagged PDFs.
632 if (SkPDFIndirectReference root = fTagTree.makeStructTreeRoot(this)) {
633 // In the document catalog, indicate that this PDF is tagged.
634 auto markInfo = SkPDFMakeDict("MarkInfo");
635 markInfo->insertBool("Marked", true);
636 docCatalog->insertObject("MarkInfo", std::move(markInfo));
637 docCatalog->insertRef("StructTreeRoot", root);
638
639 if (SkPDFIndirectReference outline = fTagTree.makeOutline(this)) {
640 docCatalog->insertRef("Outlines", outline);
641 }
642 }
643
644 // If ViewerPreferences DisplayDocTitle isn't set to true, accessibility checks will fail.
645 if (!fMetadata.fTitle.isEmpty()) {
646 auto viewerPrefs = SkPDFMakeDict("ViewerPreferences");
647 viewerPrefs->insertBool("DisplayDocTitle", true);
648 docCatalog->insertObject("ViewerPreferences", std::move(viewerPrefs));
649 }
650
651 SkString lang = fMetadata.fLang;
652 if (lang.isEmpty()) {
653 lang = fTagTree.getRootLanguage();
654 }
655 if (!lang.isEmpty()) {
656 docCatalog->insertTextString("Lang", lang);
657 }
658
659 auto docCatalogRef = this->emit(*docCatalog);
660
661 for (const SkPDFFont* f : get_fonts(*this)) {
662 f->emitSubset(this);
663 }
664
665 this->waitForJobs();
666 {
667 SkAutoMutexExclusive autoMutexAcquire(fMutex);
668 serialize_footer(fOffsetMap, this->getStream(), fInfoDict, docCatalogRef, fUUID);
669 }
670}
static SkPDFIndirectReference generate_page_tree(SkPDFDocument *doc, std::vector< std::unique_ptr< SkPDFDict > > pages, const std::vector< SkPDFIndirectReference > &pageRefs)
static SkPDFIndirectReference append_destinations(SkPDFDocument *doc, const std::vector< SkPDFNamedDestination > &namedDestinations)
static std::unique_ptr< SkPDFArray > make_srgb_output_intents(SkPDFDocument *doc)
static void serialize_footer(const SkPDFOffsetMap &offsetMap, SkWStream *wStream, SkPDFIndirectReference infoDict, SkPDFIndirectReference docCatalog, SkUUID uuid)
static std::vector< const SkPDFFont * > get_fonts(const SkPDFDocument &canon)
std::vector< SkPDFNamedDestination > fNamedDestinations
SkPDFIndirectReference makeStructTreeRoot(SkPDFDocument *doc)
Definition: SkPDFTag.cpp:364
SkPDFIndirectReference makeOutline(SkPDFDocument *doc)
Definition: SkPDFTag.cpp:559
SkString getRootLanguage()
Definition: SkPDFTag.cpp:583
bool isEmpty() const
Definition: SkString.h:130
string root
Definition: scale_cpu.py:20

◆ onEndPage()

void SkPDFDocument::onEndPage ( )
overridevirtual

Implements SkDocument.

Definition at line 377 of file SkPDFDocument.cpp.

377 {
378 SkASSERT(!fCanvas.imageInfo().dimensions().isZero());
379 reset_object(&fCanvas);
380 SkASSERT(fPageDevice);
381
382 auto page = SkPDFMakeDict("Page");
383
384 SkSize mediaSize = fPageDevice->imageInfo().dimensions() * fInverseRasterScale;
385 std::unique_ptr<SkStreamAsset> pageContent = fPageDevice->content();
386 auto resourceDict = fPageDevice->makeResourceDict();
387 SkASSERT(!fPageRefs.empty());
388 fPageDevice = nullptr;
389
390 page->insertObject("Resources", std::move(resourceDict));
391 page->insertObject("MediaBox", SkPDFUtils::RectToArray(SkRect::MakeSize(mediaSize)));
392
393 if (std::unique_ptr<SkPDFArray> annotations = getAnnotations()) {
394 page->insertObject("Annots", std::move(annotations));
395 fCurrentPageLinks.clear();
396 }
397
398 page->insertRef("Contents", SkPDFStreamOut(nullptr, std::move(pageContent), this));
399 // The StructParents unique identifier for each page is just its
400 // 0-based page index.
401 page->insertInt("StructParents", SkToInt(this->currentPageIndex()));
402 fPages.emplace_back(std::move(page));
403}
SkPDFIndirectReference SkPDFStreamOut(std::unique_ptr< SkPDFDict > dict, std::unique_ptr< SkStreamAsset > content, SkPDFDocument *doc, SkPDFSteamCompressionEnabled compress)
Definition: SkPDFTypes.cpp:591
constexpr int SkToInt(S x)
Definition: SkTo.h:29
const SkImageInfo & imageInfo() const
Definition: SkDevice.h:117
std::unique_ptr< SkStreamAsset > content()
std::unique_ptr< SkPDFDict > makeResourceDict()
std::unique_ptr< SkPDFArray > getAnnotations()
std::unique_ptr< SkPDFArray > RectToArray(const SkRect &rect)
Definition: SkPDFUtils.cpp:63
static constexpr SkRect MakeSize(const SkSize &size)
Definition: SkRect.h:633

◆ pageCount()

size_t SkPDFDocument::pageCount ( )
inline

Definition at line 156 of file SkPDFDocumentPriv.h.

156{ return fPageRefs.size(); }

◆ reserveRef()

SkPDFIndirectReference SkPDFDocument::reserveRef ( )
inline

Definition at line 147 of file SkPDFDocumentPriv.h.

147{ return SkPDFIndirectReference{fNextObjectNumber++}; }

◆ signalJobComplete()

void SkPDFDocument::signalJobComplete ( )

Definition at line 674 of file SkPDFDocument.cpp.

674{ fSemaphore.signal(); }
void signal(int n=1)
Definition: SkSemaphore.h:56

Member Data Documentation

◆ fCurrentPageLinks

std::vector<std::unique_ptr<SkPDFLink> > SkPDFDocument::fCurrentPageLinks

Definition at line 185 of file SkPDFDocumentPriv.h.

◆ fFillGSMap

Definition at line 182 of file SkPDFDocumentPriv.h.

◆ fFontDescriptors

skia_private::THashMap<uint32_t, SkPDFIndirectReference> SkPDFDocument::fFontDescriptors

Definition at line 174 of file SkPDFDocumentPriv.h.

◆ fFontMap

skia_private::THashMap<uint64_t, SkPDFFont> SkPDFDocument::fFontMap

Definition at line 176 of file SkPDFDocumentPriv.h.

◆ fGradientPatternMap

Definition at line 166 of file SkPDFDocumentPriv.h.

◆ fICCProfileMap

Definition at line 170 of file SkPDFDocumentPriv.h.

◆ fImageShaderMap

Definition at line 163 of file SkPDFDocumentPriv.h.

◆ fInvertFunction

SkPDFIndirectReference SkPDFDocument::fInvertFunction

Definition at line 183 of file SkPDFDocumentPriv.h.

◆ fNamedDestinations

std::vector<SkPDFNamedDestination> SkPDFDocument::fNamedDestinations

Definition at line 186 of file SkPDFDocumentPriv.h.

◆ fNoSmaskGraphicState

SkPDFIndirectReference SkPDFDocument::fNoSmaskGraphicState

Definition at line 184 of file SkPDFDocumentPriv.h.

◆ fPDFBitmapMap

Definition at line 167 of file SkPDFDocumentPriv.h.

◆ fStrokeGSMap

Definition at line 179 of file SkPDFDocumentPriv.h.

◆ fToUnicodeMap

skia_private::THashMap<uint32_t, std::vector<SkUnichar> > SkPDFDocument::fToUnicodeMap

Definition at line 173 of file SkPDFDocumentPriv.h.

◆ fType1GlyphNames

skia_private::THashMap<uint32_t, std::vector<SkString> > SkPDFDocument::fType1GlyphNames

Definition at line 172 of file SkPDFDocumentPriv.h.

◆ fType3FontDescriptors

skia_private::THashMap<uint32_t, SkPDFIndirectReference> SkPDFDocument::fType3FontDescriptors

Definition at line 175 of file SkPDFDocumentPriv.h.

◆ fTypefaceMetrics

skia_private::THashMap<uint32_t, std::unique_ptr<SkAdvancedTypefaceMetrics> > SkPDFDocument::fTypefaceMetrics

Definition at line 171 of file SkPDFDocumentPriv.h.


The documentation for this class was generated from the following files: