| OLD | NEW |
| 1 | |
| 2 /* | 1 /* |
| 3 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
| 4 * | 3 * |
| 5 * 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 |
| 6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 7 */ | 6 */ |
| 8 | 7 |
| 9 | |
| 10 | |
| 11 #ifndef GrFontScaler_DEFINED | 8 #ifndef GrFontScaler_DEFINED |
| 12 #define GrFontScaler_DEFINED | 9 #define GrFontScaler_DEFINED |
| 13 | 10 |
| 14 #include "GrGlyph.h" | 11 #include "GrGlyph.h" |
| 15 #include "GrKey.h" | 12 #include "GrKey.h" |
| 16 | 13 |
| 17 class SkPath; | 14 class SkPath; |
| 18 | 15 |
| 19 /** | 16 /** |
| 20 * This is a virtual base class which Gr's interface to the host platform's | 17 * This is a virtual base class which Gr's interface to the host platform's |
| 21 * font scaler. | 18 * font scaler. |
| 22 * | 19 * |
| 23 * The client is responsible for subclassing, and instantiating this. The | 20 * The client is responsible for subclassing, and instantiating this. The |
| 24 * instance is create for a specific font+size+matrix. | 21 * instance is create for a specific font+size+matrix. |
| 25 */ | 22 */ |
| 26 class GrFontScaler : public GrRefCnt { | 23 class GrFontScaler : public GrRefCnt { |
| 27 public: | 24 public: |
| 28 SK_DECLARE_INST_COUNT(GrFontScaler) | 25 SK_DECLARE_INST_COUNT(GrFontScaler) |
| 29 | 26 |
| 30 virtual const GrKey* getKey() = 0; | 27 virtual const GrKey* getKey() = 0; |
| 31 virtual GrMaskFormat getMaskFormat() = 0; | 28 virtual GrMaskFormat getMaskFormat() = 0; |
| 32 virtual bool getPackedGlyphBounds(GrGlyph::PackedID, GrIRect* bounds) = 0; | 29 virtual bool getPackedGlyphBounds(GrGlyph::PackedID, SkIRect* bounds) = 0; |
| 33 virtual bool getPackedGlyphImage(GrGlyph::PackedID, int width, int height, | 30 virtual bool getPackedGlyphImage(GrGlyph::PackedID, int width, int height, |
| 34 int rowBytes, void* image) = 0; | 31 int rowBytes, void* image) = 0; |
| 35 virtual bool getGlyphPath(uint16_t glyphID, SkPath*) = 0; | 32 virtual bool getGlyphPath(uint16_t glyphID, SkPath*) = 0; |
| 36 | 33 |
| 37 private: | 34 private: |
| 38 typedef GrRefCnt INHERITED; | 35 typedef GrRefCnt INHERITED; |
| 39 }; | 36 }; |
| 40 | 37 |
| 41 #endif | 38 #endif |
| OLD | NEW |