blob: 771e0653bfd32ab7aba06d8f87d6be0644ee71c9 [file] [log] [blame]
* Copyright 2018 Google Inc.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
#ifndef SkPDFTag_DEFINED
#define SkPDFTag_DEFINED
#include "SkPDFDocument.h"
#include "SkTArray.h"
#include "SkArenaAlloc.h"
#include "SkTHash.h"
class SkPDFDocument;
struct SkPDFTagNode;
class SkPDFTagTree {
void init(const SkPDF::StructureElementNode*);
void reset();
int getMarkIdForNodeId(int nodeId, unsigned pageIndex);
SkPDFIndirectReference makeStructTreeRoot(SkPDFDocument* doc);
SkArenaAlloc fArena;
SkTHashMap<int, SkPDFTagNode*> fNodeMap;
SkPDFTagNode* fRoot = nullptr;
SkTArray<SkTArray<SkPDFTagNode*>> fMarksPerPage;
SkPDFTagTree(const SkPDFTagTree&) = delete;
SkPDFTagTree& operator=(const SkPDFTagTree&) = delete;