| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #ifndef SkPDFCanon_DEFINED | 7 #ifndef SkPDFCanon_DEFINED |
| 8 #define SkPDFCanon_DEFINED | 8 #define SkPDFCanon_DEFINED |
| 9 | 9 |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 SkPDFImageShader* findImageShader(const SkPDFShader::State&) const; | 71 SkPDFImageShader* findImageShader(const SkPDFShader::State&) const; |
| 72 void addImageShader(SkPDFImageShader*); | 72 void addImageShader(SkPDFImageShader*); |
| 73 | 73 |
| 74 const SkPDFGraphicState* findGraphicState(const SkPDFGraphicState&) const; | 74 const SkPDFGraphicState* findGraphicState(const SkPDFGraphicState&) const; |
| 75 void addGraphicState(const SkPDFGraphicState*); | 75 void addGraphicState(const SkPDFGraphicState*); |
| 76 | 76 |
| 77 SkPDFObject* findPDFBitmap(const SkImage* image) const; | 77 SkPDFObject* findPDFBitmap(const SkImage* image) const; |
| 78 void addPDFBitmap(uint32_t imageUniqueID, SkPDFObject*); | 78 void addPDFBitmap(uint32_t imageUniqueID, SkPDFObject*); |
| 79 const SkImage* bitmapToImage(const SkBitmap&); | 79 const SkImage* bitmapToImage(const SkBitmap&); |
| 80 | 80 |
| 81 SkTHashMap<uint32_t, bool> fCanEmbedTypeface; |
| 82 |
| 81 private: | 83 private: |
| 82 struct FontRec { | 84 struct FontRec { |
| 83 SkPDFFont* fFont; | 85 SkPDFFont* fFont; |
| 84 uint32_t fFontID; | 86 uint32_t fFontID; |
| 85 uint16_t fGlyphID; | 87 uint16_t fGlyphID; |
| 86 }; | 88 }; |
| 87 SkTDArray<FontRec> fFontRecords; | 89 SkTDArray<FontRec> fFontRecords; |
| 88 | 90 |
| 89 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords; | 91 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords; |
| 90 | 92 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 104 SkASSERT(w.fPtr); | 106 SkASSERT(w.fPtr); |
| 105 return w.fPtr->hash(); | 107 return w.fPtr->hash(); |
| 106 } | 108 } |
| 107 }; | 109 }; |
| 108 SkTHashSet<WrapGS, WrapGS::Hash> fGraphicStateRecords; | 110 SkTHashSet<WrapGS, WrapGS::Hash> fGraphicStateRecords; |
| 109 | 111 |
| 110 SkTHashMap<SkBitmapKey, const SkImage*> fBitmapToImageMap; | 112 SkTHashMap<SkBitmapKey, const SkImage*> fBitmapToImageMap; |
| 111 SkTHashMap<uint32_t /*ImageUniqueID*/, SkPDFObject*> fPDFBitmapMap; | 113 SkTHashMap<uint32_t /*ImageUniqueID*/, SkPDFObject*> fPDFBitmapMap; |
| 112 }; | 114 }; |
| 113 #endif // SkPDFCanon_DEFINED | 115 #endif // SkPDFCanon_DEFINED |
| OLD | NEW |