Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(928)

Unified Diff: src/ports/SkFontHost_mac.cpp

Issue 1863013003: Pass effects directly to fontcache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/core/SkScalerContext.cpp ('K') | « src/core/SkScalerContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« src/core/SkScalerContext.cpp ('K') | « src/core/SkScalerContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698