OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 | 7 |
8 #ifndef GrFontScaler_DEFINED | 8 #ifndef GrFontScaler_DEFINED |
9 #define GrFontScaler_DEFINED | 9 #define GrFontScaler_DEFINED |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 * for a specific font+size+matrix. | 59 * for a specific font+size+matrix. |
60 */ | 60 */ |
61 class GrFontScaler : public SkRefCnt { | 61 class GrFontScaler : public SkRefCnt { |
62 public: | 62 public: |
63 SK_DECLARE_INST_COUNT(GrFontScaler) | 63 SK_DECLARE_INST_COUNT(GrFontScaler) |
64 | 64 |
65 explicit GrFontScaler(SkGlyphCache* strike); | 65 explicit GrFontScaler(SkGlyphCache* strike); |
66 virtual ~GrFontScaler(); | 66 virtual ~GrFontScaler(); |
67 | 67 |
68 const GrFontDescKey* getKey(); | 68 const GrFontDescKey* getKey(); |
69 GrMaskFormat getMaskFormat(); | 69 GrMaskFormat getMaskFormat() const; |
| 70 GrMaskFormat getPackedGlyphMaskFormat(GrGlyph::PackedID) const; |
70 bool getPackedGlyphBounds(GrGlyph::PackedID, SkIRect* bounds); | 71 bool getPackedGlyphBounds(GrGlyph::PackedID, SkIRect* bounds); |
71 bool getPackedGlyphImage(GrGlyph::PackedID, int width, int height, | 72 bool getPackedGlyphImage(GrGlyph::PackedID, int width, int height, |
72 int rowBytes, void* image); | 73 int rowBytes, void* image); |
73 bool getPackedGlyphDFBounds(GrGlyph::PackedID, SkIRect* bounds); | 74 bool getPackedGlyphDFBounds(GrGlyph::PackedID, SkIRect* bounds); |
74 bool getPackedGlyphDFImage(GrGlyph::PackedID, int width, int height, | 75 bool getPackedGlyphDFImage(GrGlyph::PackedID, int width, int height, |
75 void* image); | 76 void* image); |
76 bool getGlyphPath(uint16_t glyphID, SkPath*); | 77 bool getGlyphPath(uint16_t glyphID, SkPath*); |
77 | 78 |
78 private: | 79 private: |
79 SkGlyphCache* fStrike; | 80 SkGlyphCache* fStrike; |
80 GrFontDescKey* fKey; | 81 GrFontDescKey* fKey; |
81 | 82 |
82 typedef SkRefCnt INHERITED; | 83 typedef SkRefCnt INHERITED; |
83 }; | 84 }; |
84 | 85 |
85 #endif | 86 #endif |
OLD | NEW |