diff options
author | halcanary <halcanary@google.com> | 2015-04-01 13:31:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-01 13:31:19 -0700 |
commit | be27a118c277af23377d38e9b3bfd3fcc276114f (patch) | |
tree | 1898203654addbbb8cf77f1b3231d50c1860ead3 /dm/DMJsonWriter.cpp | |
parent | 03e5161bed3bdfa0d9fb0867378237bac7d8bd12 (diff) |
SkPDF: SkPDFGraphicState Lookup hashtabled
In Release, running `dm --src skp --config pdf`, I get a
speedup of about 1.2%.
SkPDFGraphicState class:
- Holds the subset of SkPaint that maps to a PDF Graphics
State
- These fields are easily comparable, making hashtable
comparisons easy.
SkPDFCanon:
- findGraphicState() takes a SkPDFGraphicState, not a SkPaint
- fGraphicStateRecords is a SkHashSet, not a SkTDArray
SkPDFGraphicState:
- mode_for_pdf() replaces logic inside equivalent(), but is
only called once per lookup.
- emitObject() no longer modifies the SkPDFGraphicState to
cache the SkPDFDict stucture. (Since it is de-duped,
this get no speedup).
- Static Functions that don't use the canon return a plain
SkPDFDict now. No need for fPopulated.
SkTHash.h
- SkHashSet::forall added
SkPDFDevice; SkPDFShader
- Updated for new SkPDFGraphicState interface.
BUG=skia:3585
Review URL: https://codereview.chromium.org/1046293002
Diffstat (limited to 'dm/DMJsonWriter.cpp')
0 files changed, 0 insertions, 0 deletions