Index: src/core/SkScalerContext.h |
=================================================================== |
--- src/core/SkScalerContext.h (revision 8224) |
+++ src/core/SkScalerContext.h (working copy) |
@@ -12,12 +12,8 @@ |
#include "SkMaskGamma.h" |
#include "SkMatrix.h" |
#include "SkPaint.h" |
+#include "SkTypeface.h" |
-#ifdef SK_BUILD_FOR_ANDROID |
- //For SkFontID |
- #include "SkTypeface.h" |
-#endif |
- |
struct SkGlyph; |
class SkDescriptor; |
class SkMaskFilter; |
@@ -149,9 +145,11 @@ |
}; |
- SkScalerContext(const SkDescriptor* desc); |
+ SkScalerContext(SkTypeface*, const SkDescriptor*); |
virtual ~SkScalerContext(); |
+ SkTypeface* getTypeface() const { return fTypeface.get(); } |
+ |
SkMask::Format getMaskFormat() const { |
return (SkMask::Format)fRec.fMaskFormat; |
} |
@@ -217,6 +215,10 @@ |
void forceGenerateImageFromPath() { fGenerateImageFromPath = true; } |
private: |
+ // never null |
+ SkAutoTUnref<SkTypeface> fTypeface; |
+ |
+ // optional object, which may be null |
SkPathEffect* fPathEffect; |
SkMaskFilter* fMaskFilter; |
SkRasterizer* fRasterizer; |