⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245755 in webkit


Ignore:
Timestamp:
May 24, 2019, 2:47:36 PM (7 years ago)
Author:
Alan Coon
Message:

Cherry-pick r245753. rdar://problem/51068494

Refactor how showLetterpressedGlyphsWithAdvances gets the graphics context.
https://bugs.webkit.org/show_bug.cgi?id=198225

Reviewed by Dean Jackson.

  • platform/graphics/cocoa/FontCascadeCocoa.mm: (WebCore::showLetterpressedGlyphsWithAdvances): (WebCore::FontCascade::drawGlyphs):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245753 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-608.1.24.20-branch/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-608.1.24.20-branch/Source/WebCore/ChangeLog

    r245754 r245755  
     12019-05-24  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r245753. rdar://problem/51068494
     4
     5    Refactor how showLetterpressedGlyphsWithAdvances gets the graphics context.
     6    https://bugs.webkit.org/show_bug.cgi?id=198225
     7   
     8    Reviewed by Dean Jackson.
     9   
     10    * platform/graphics/cocoa/FontCascadeCocoa.mm:
     11    (WebCore::showLetterpressedGlyphsWithAdvances):
     12    (WebCore::FontCascade::drawGlyphs):
     13   
     14   
     15    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     16
     17    2019-05-24  Timothy Hatcher  <timothy@apple.com>
     18
     19            Refactor how showLetterpressedGlyphsWithAdvances gets the graphics context.
     20            https://bugs.webkit.org/show_bug.cgi?id=198225
     21
     22            Reviewed by Dean Jackson.
     23
     24            * platform/graphics/cocoa/FontCascadeCocoa.mm:
     25            (WebCore::showLetterpressedGlyphsWithAdvances):
     26            (WebCore::FontCascade::drawGlyphs):
     27
    1282019-05-24  Alan Coon  <alancoon@apple.com>
    229
  • branches/safari-608.1.24.20-branch/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm

    r245230 r245755  
    9999}
    100100
    101 static void showLetterpressedGlyphsWithAdvances(const FloatPoint& point, const Font& font, CGContextRef context, const CGGlyph* glyphs, const CGSize* advances, unsigned count)
     101static void showLetterpressedGlyphsWithAdvances(const FloatPoint& point, const Font& font, GraphicsContext& coreContext, const CGGlyph* glyphs, const CGSize* advances, unsigned count)
    102102{
    103103#if ENABLE(LETTERPRESS)
     
    110110        return;
    111111    }
     112
     113    CGContextRef context = coreContext.platformContext();
    112114
    113115    CGContextSetTextPosition(context, point.x(), point.y());
     
    127129        styleConfiguration.useSimplifiedEffect = YES;
    128130    }
     131
     132#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/FontCascadeCocoaAdditions.mm>)
     133#include <WebKitAdditions/FontCascadeCocoaAdditions.mm>
     134#endif
    129135
    130136    CGContextSetFont(context, adoptCF(CTFontCopyGraphicsFont(ctFont, nullptr)).get());
     
    138144    UNUSED_PARAM(point);
    139145    UNUSED_PARAM(font);
    140     UNUSED_PARAM(context);
     146    UNUSED_PARAM(coreContext);
    141147    UNUSED_PARAM(glyphs);
    142148    UNUSED_PARAM(advances);
     
    300306
    301307    if (useLetterpressEffect)
    302         showLetterpressedGlyphsWithAdvances(point, font, cgContext, 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);
    303309    else
    304310        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.