| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkPDFFont_DEFINED | 10 #ifndef SkPDFFont_DEFINED |
| 11 #define SkPDFFont_DEFINED | 11 #define SkPDFFont_DEFINED |
| 12 | 12 |
| 13 #include "SkAdvancedTypefaceMetrics.h" | 13 #include "SkAdvancedTypefaceMetrics.h" |
| 14 #include "SkBitSet.h" | 14 #include "SkBitSet.h" |
| 15 #include "SkPDFTypes.h" | 15 #include "SkPDFTypes.h" |
| 16 #include "SkTDArray.h" | 16 #include "SkTDArray.h" |
| 17 #include "SkThread.h" | 17 #include "SkThread.h" |
| 18 #include "SkTypeface.h" | 18 #include "SkTypeface.h" |
| 19 | 19 |
| 20 class SkPaint; | 20 class SkPaint; |
| 21 class SkPDFCatalog; | 21 class SkPDFCatalog; |
| 22 class SkPDFFont; | 22 class SkPDFFont; |
| 23 | 23 |
| 24 class SkPDFGlyphSet : public SkNoncopyable { | 24 class SkPDFGlyphSet : SkNoncopyable { |
| 25 public: | 25 public: |
| 26 SkPDFGlyphSet(); | 26 SkPDFGlyphSet(); |
| 27 | 27 |
| 28 void set(const uint16_t* glyphIDs, int numGlyphs); | 28 void set(const uint16_t* glyphIDs, int numGlyphs); |
| 29 bool has(uint16_t glyphID) const; | 29 bool has(uint16_t glyphID) const; |
| 30 void merge(const SkPDFGlyphSet& usage); | 30 void merge(const SkPDFGlyphSet& usage); |
| 31 void exportTo(SkTDArray<uint32_t>* glyphIDs) const; | 31 void exportTo(SkTDArray<uint32_t>* glyphIDs) const; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 SkBitSet fBitSet; | 34 SkBitSet fBitSet; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 class SkPDFGlyphSetMap : public SkNoncopyable { | 37 class SkPDFGlyphSetMap : SkNoncopyable { |
| 38 public: | 38 public: |
| 39 struct FontGlyphSetPair { | 39 struct FontGlyphSetPair { |
| 40 FontGlyphSetPair(SkPDFFont* font, SkPDFGlyphSet* glyphSet); | 40 FontGlyphSetPair(SkPDFFont* font, SkPDFGlyphSet* glyphSet); |
| 41 | 41 |
| 42 SkPDFFont* fFont; | 42 SkPDFFont* fFont; |
| 43 SkPDFGlyphSet* fGlyphSet; | 43 SkPDFGlyphSet* fGlyphSet; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 SkPDFGlyphSetMap(); | 46 SkPDFGlyphSetMap(); |
| 47 ~SkPDFGlyphSetMap(); | 47 ~SkPDFGlyphSetMap(); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 SkAdvancedTypefaceMetrics::FontType fFontType; | 197 SkAdvancedTypefaceMetrics::FontType fFontType; |
| 198 | 198 |
| 199 // This should be made a hash table if performance is a problem. | 199 // This should be made a hash table if performance is a problem. |
| 200 static SkTDArray<FontRec>& CanonicalFonts(); | 200 static SkTDArray<FontRec>& CanonicalFonts(); |
| 201 static SkBaseMutex& CanonicalFontsMutex(); | 201 static SkBaseMutex& CanonicalFontsMutex(); |
| 202 typedef SkPDFDict INHERITED; | 202 typedef SkPDFDict INHERITED; |
| 203 }; | 203 }; |
| 204 | 204 |
| 205 #endif | 205 #endif |
| OLD | NEW |