Chromium Code Reviews| Index: src/ports/SkFontHost_mac.cpp |
| diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp |
| index 53d5610575b1f4867a7ae13188823a0b78bb4dbf..24786b3ca51c4f37c55893f698666fee93155e5c 100644 |
| --- a/src/ports/SkFontHost_mac.cpp |
| +++ b/src/ports/SkFontHost_mac.cpp |
| @@ -645,7 +645,7 @@ struct GlyphRect { |
| class SkScalerContext_Mac : public SkScalerContext { |
| public: |
| - SkScalerContext_Mac(SkTypeface_Mac*, const SkDescriptor*); |
| + SkScalerContext_Mac(const Effects&, const SkDescriptor*); |
|
bungeman-skia
2016/04/06 17:52:10
I'm assuming you mean SkScalerContextEffects here?
|
| protected: |
| unsigned generateGlyphCount(void) override; |
| @@ -753,9 +753,8 @@ static CTFontRef ctfont_create_exact_copy(CTFontRef baseFont, CGFloat textSize, |
| return CTFontCreateWithGraphicsFont(baseCGFont, textSize, transform, nullptr); |
| } |
| -SkScalerContext_Mac::SkScalerContext_Mac(SkTypeface_Mac* typeface, |
| - const SkDescriptor* desc) |
| - : INHERITED(typeface, desc) |
| +SkScalerContext_Mac::SkScalerContext_Mac(const Effects& effects, const SkDescriptor* desc) |
| + : INHERITED(effects, desc) |
| , fFBoundingBoxes() |
| , fFBoundingBoxesGlyphOffset(0) |
| , fGeneratedFBoundingBoxes(false) |
| @@ -765,6 +764,7 @@ SkScalerContext_Mac::SkScalerContext_Mac(SkTypeface_Mac* typeface, |
| { |
| AUTO_CG_LOCK(); |
| + SkTypeface_Mac* typeface = (SkTypeface_Mac*)effects.fTypeface.get(); |
| CTFontRef ctFont = typeface->fFontRef.get(); |
| CFIndex numGlyphs = CTFontGetGlyphCount(ctFont); |
| SkASSERT(numGlyphs >= 1 && numGlyphs <= 0xFFFF); |