Changeset 245753 in webkit
- Timestamp:
- May 24, 2019 2:41:32 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r245752 r245753 1 2019-05-24 Timothy Hatcher <timothy@apple.com> 2 3 Refactor how showLetterpressedGlyphsWithAdvances gets the graphics context. 4 https://bugs.webkit.org/show_bug.cgi?id=198225 5 6 Reviewed by Dean Jackson. 7 8 * platform/graphics/cocoa/FontCascadeCocoa.mm: 9 (WebCore::showLetterpressedGlyphsWithAdvances): 10 (WebCore::FontCascade::drawGlyphs): 11 1 12 2019-05-24 Timothy Hatcher <timothy@apple.com> 2 13 -
trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm
r245191 r245753 99 99 } 100 100 101 static void showLetterpressedGlyphsWithAdvances(const FloatPoint& point, const Font& font, CGContextRef context, const CGGlyph* glyphs, const CGSize* advances, unsigned count)101 static void showLetterpressedGlyphsWithAdvances(const FloatPoint& point, const Font& font, GraphicsContext& coreContext, const CGGlyph* glyphs, const CGSize* advances, unsigned count) 102 102 { 103 103 #if ENABLE(LETTERPRESS) … … 110 110 return; 111 111 } 112 113 CGContextRef context = coreContext.platformContext(); 112 114 113 115 CGContextSetTextPosition(context, point.x(), point.y()); … … 127 129 styleConfiguration.useSimplifiedEffect = YES; 128 130 } 131 132 #if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/FontCascadeCocoaAdditions.mm>) 133 #include <WebKitAdditions/FontCascadeCocoaAdditions.mm> 134 #endif 129 135 130 136 CGContextSetFont(context, adoptCF(CTFontCopyGraphicsFont(ctFont, nullptr)).get()); … … 138 144 UNUSED_PARAM(point); 139 145 UNUSED_PARAM(font); 140 UNUSED_PARAM(co ntext);146 UNUSED_PARAM(coreContext); 141 147 UNUSED_PARAM(glyphs); 142 148 UNUSED_PARAM(advances); … … 300 306 301 307 if (useLetterpressEffect) 302 showLetterpressedGlyphsWithAdvances(point, font, c gContext, glyphBuffer.glyphs(from), static_cast<const CGSize*>(glyphBuffer.advances(from)), numGlyphs);308 showLetterpressedGlyphsWithAdvances(point, font, context, glyphBuffer.glyphs(from), static_cast<const CGSize*>(glyphBuffer.advances(from)), numGlyphs); 303 309 else 304 310 showGlyphsWithAdvances(point, font, cgContext, glyphBuffer.glyphs(from), static_cast<const CGSize*>(glyphBuffer.advances(from)), numGlyphs);
Note: See TracChangeset
for help on using the changeset viewer.