DescriptionSkPDF: 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
Committed: https://skia.googlesource.com/skia/+/be27a118c277af23377d38e9b3bfd3fcc276114f
Patch Set 1 #Patch Set 2 : formatting #Patch Set 3 : clean #
Total comments: 14
Patch Set 4 : 2015-04-01 (Wednesday) 12:13:16 EDT #Patch Set 5 : 2015-04-01 (Wednesday) 15:16:07 EDT #Patch Set 6 : 2015-04-01 (Wednesday) 15:28:18 EDT #
Total comments: 6
Patch Set 7 : 2015-04-01 (Wednesday) 15:58:42 EDT #Patch Set 8 : 2015-04-01 (Wednesday) 16:16:21 EDT #
Messages
Total messages: 15 (6 generated)
|