Chromium Code Reviews| Index: src/pdf/SkPDFCanon.h |
| diff --git a/src/pdf/SkPDFCanon.h b/src/pdf/SkPDFCanon.h |
| index a0241e308f469d43e679f8440e7d6bb33d273fd8..11b0057cacee332bf5e103aafbfc000bcd788b86 100644 |
| --- a/src/pdf/SkPDFCanon.h |
| +++ b/src/pdf/SkPDFCanon.h |
| @@ -14,6 +14,7 @@ |
| #include "SkTHash.h" |
| #include "SkBitmapKey.h" |
| +class SkAdvancedTypefaceMetrics; |
| class SkPDFFont; |
| /** |
| @@ -35,19 +36,11 @@ class SkPDFFont; |
| */ |
| class SkPDFCanon : SkNoncopyable { |
| public: |
| - ~SkPDFCanon() { this->reset(); } |
| + ~SkPDFCanon(); |
| // reset to original setting, unrefs all objects. |
| void reset(); |
| - // Returns exact match if there is one. If not, it returns nullptr. |
| - // If there is no exact match, but there is a related font, we |
| - // still return nullptr, but also set *relatedFont. |
| - SkPDFFont* findFont(uint32_t fontID, |
| - uint16_t glyphID, |
| - SkPDFFont** relatedFont) const; |
| - void addFont(SkPDFFont* font, uint32_t fontID, uint16_t fGlyphID); |
| - |
| sk_sp<SkPDFObject> findFunctionShader(const SkPDFShader::State&) const; |
| void addFunctionShader(sk_sp<SkPDFObject>, SkPDFShader::State); |
| @@ -63,7 +56,9 @@ public: |
| sk_sp<SkPDFObject> findPDFBitmap(SkBitmapKey key) const; |
| void addPDFBitmap(SkBitmapKey key, sk_sp<SkPDFObject>); |
| - SkTHashMap<uint32_t, bool> fCanEmbedTypeface; |
| + SkTHashMap<uint32_t, SkAdvancedTypefaceMetrics*> fTypefaceMetrics; |
| + SkTHashMap<uint32_t, SkPDFDict*> fFontDescriptors; |
| + SkTHashMap<uint64_t, SkPDFFont*> fFontMap; |
| SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer.get(); } |
| void setPixelSerializer(sk_sp<SkPixelSerializer> ps) { |
| @@ -75,12 +70,7 @@ public: |
| sk_sp<SkPDFArray> makeRangeObject(); |
| private: |
| - struct FontRec { |
| - SkPDFFont* fFont; |
| - uint32_t fFontID; |
| - uint16_t fGlyphID; |
| - }; |
| - SkTDArray<FontRec> fFontRecords; |
| + |
|
bungeman-skia
2016/08/17 19:03:07
nit: seems like this blank line could go away
hal.canary
2016/08/17 19:29:49
Done.
|
| struct ShaderRec { |
| SkPDFShader::State fShaderState; |