diff options
author | halcanary <halcanary@google.com> | 2016-03-23 06:26:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-23 06:26:32 -0700 |
commit | cc77c12293d1685f5e83d768b30ca9157af1576d (patch) | |
tree | 51ab29ac484cfcd035a19d938028a06bcd0b8aee /src/pdf/SkPDFFont.h | |
parent | 0a291c7b7eea1807bd58bdaa60c258fd0ebeb257 (diff) |
SkPDF: Hold page objects, not SkPDFDevices.
Page Contents:
serialize early, at endPage()
SkPDFDocument:
Rather than holding all SkPDFDevices until onClose(), store
fGlyphUseage and array of pages objects.
perform_font_subsetting function removed:
First half moved to onEndPage.
Second half moved to onClose.
create_pdf_page function removed:
Merged into onEndPage.
generate_page_tree:
Refactored to use SkTArray<sk_sp<T>> over SkTDArray<T*>.
(the former is explicit about ownership, the latter is unclear.)
No longer populates a structure of objects to be dumped,
unnecessary since dump is always called after serialization.
Takes ownership of fPages and returns root of tree-ified version.
Less reference churn.
SkPDFGlyphSetMap:
use new-style iterator.
BUG=skia:5087
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1823683005
Review URL: https://codereview.chromium.org/1823683005
Diffstat (limited to 'src/pdf/SkPDFFont.h')
-rw-r--r-- | src/pdf/SkPDFFont.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/pdf/SkPDFFont.h b/src/pdf/SkPDFFont.h index 4a01c41e76..e410e3ee00 100644 --- a/src/pdf/SkPDFFont.h +++ b/src/pdf/SkPDFFont.h @@ -46,16 +46,8 @@ public: SkPDFGlyphSetMap(); ~SkPDFGlyphSetMap(); - class F2BIter { - public: - explicit F2BIter(const SkPDFGlyphSetMap& map); - const FontGlyphSetPair* next() const; - void reset(const SkPDFGlyphSetMap& map); - - private: - const SkTDArray<FontGlyphSetPair>* fMap; - mutable int fIndex; - }; + const FontGlyphSetPair* begin() const { return fMap.begin(); } + const FontGlyphSetPair* end() const { return fMap.end(); } void merge(const SkPDFGlyphSetMap& usage); void reset(); |