| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 SkPDFObject* findPDFBitmap(const SkImage* image) const; | 78 SkPDFObject* findPDFBitmap(const SkImage* image) const; |
| 79 void addPDFBitmap(uint32_t imageUniqueID, SkPDFObject*); | 79 void addPDFBitmap(uint32_t imageUniqueID, SkPDFObject*); |
| 80 const SkImage* bitmapToImage(const SkBitmap&); | 80 const SkImage* bitmapToImage(const SkBitmap&); |
| 81 | 81 |
| 82 SkTHashMap<uint32_t, bool> fCanEmbedTypeface; | 82 SkTHashMap<uint32_t, bool> fCanEmbedTypeface; |
| 83 | 83 |
| 84 SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer.get(
); } | 84 SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer.get(
); } |
| 85 void setPixelSerializer(SkPixelSerializer* ps) { fPixelSerializer.reset(ps)
; } | 85 void setPixelSerializer(SkPixelSerializer* ps) { fPixelSerializer.reset(ps)
; } |
| 86 | 86 |
| 87 sk_sp<SkPDFStream> makeInvertFunction(); |
| 88 sk_sp<SkPDFDict> makeNoSmaskGraphicState(); |
| 89 sk_sp<SkPDFArray> makeRangeObject(); |
| 90 |
| 87 private: | 91 private: |
| 88 struct FontRec { | 92 struct FontRec { |
| 89 SkPDFFont* fFont; | 93 SkPDFFont* fFont; |
| 90 uint32_t fFontID; | 94 uint32_t fFontID; |
| 91 uint16_t fGlyphID; | 95 uint16_t fGlyphID; |
| 92 }; | 96 }; |
| 93 SkTDArray<FontRec> fFontRecords; | 97 SkTDArray<FontRec> fFontRecords; |
| 94 | 98 |
| 95 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords; | 99 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords; |
| 96 | 100 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 112 return w.fPtr->hash(); | 116 return w.fPtr->hash(); |
| 113 } | 117 } |
| 114 }; | 118 }; |
| 115 }; | 119 }; |
| 116 SkTHashSet<WrapGS, WrapGS::Hash> fGraphicStateRecords; | 120 SkTHashSet<WrapGS, WrapGS::Hash> fGraphicStateRecords; |
| 117 | 121 |
| 118 SkTHashMap<SkBitmapKey, const SkImage*> fBitmapToImageMap; | 122 SkTHashMap<SkBitmapKey, const SkImage*> fBitmapToImageMap; |
| 119 SkTHashMap<uint32_t /*ImageUniqueID*/, SkPDFObject*> fPDFBitmapMap; | 123 SkTHashMap<uint32_t /*ImageUniqueID*/, SkPDFObject*> fPDFBitmapMap; |
| 120 | 124 |
| 121 sk_sp<SkPixelSerializer> fPixelSerializer; | 125 sk_sp<SkPixelSerializer> fPixelSerializer; |
| 126 sk_sp<SkPDFStream> fInvertFunction; |
| 127 sk_sp<SkPDFDict> fNoSmaskGraphicState; |
| 128 sk_sp<SkPDFArray> fRangeObject; |
| 122 }; | 129 }; |
| 123 #endif // SkPDFCanon_DEFINED | 130 #endif // SkPDFCanon_DEFINED |
| OLD | NEW |