WebKit Bugzilla
Attachment 370580 Details for
Bug 198225
: Refactor how showLetterpressedGlyphsWithAdvances gets the graphics context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198225-20190524123917.patch (text/plain), 3.40 KB, created by
Timothy Hatcher
on 2019-05-24 12:39:18 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Timothy Hatcher
Created:
2019-05-24 12:39:18 PDT
Size:
3.40 KB
patch
obsolete
>Subversion Revision: 245745 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c9098ae487d9e687a7fdc318e166070b27ebdd67..308c78274959c3bd0dfb9f96432dc984629c4e8b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,14 @@ >+2019-05-24 Timothy Hatcher <timothy@apple.com> >+ >+ Refactor how showLetterpressedGlyphsWithAdvances gets the graphics context. >+ https://bugs.webkit.org/show_bug.cgi?id=198225 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/graphics/cocoa/FontCascadeCocoa.mm: >+ (WebCore::showLetterpressedGlyphsWithAdvances): >+ (WebCore::FontCascade::drawGlyphs): >+ > 2019-05-24 Saam barati <sbarati@apple.com> > > [WHLSL] ReadModifyWriteExpression always has a result and new value expression >diff --git a/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm b/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm >index f599b4e6bd0ca767f502f21bf68f5146e0c9a103..3b2f141cd4bbf9fee3f4c2a397afacc3865914ab 100644 >--- a/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm >+++ b/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm >@@ -98,7 +98,7 @@ static inline bool shouldUseLetterpressEffect(const GraphicsContext& context) > #endif > } > >-static void showLetterpressedGlyphsWithAdvances(const FloatPoint& point, const Font& font, CGContextRef context, const CGGlyph* glyphs, const CGSize* advances, unsigned count) >+static void showLetterpressedGlyphsWithAdvances(const FloatPoint& point, const Font& font, GraphicsContext& coreContext, const CGGlyph* glyphs, const CGSize* advances, unsigned count) > { > #if ENABLE(LETTERPRESS) > if (!count) >@@ -110,6 +110,8 @@ static void showLetterpressedGlyphsWithAdvances(const FloatPoint& point, const F > return; > } > >+ CGContextRef context = coreContext.platformContext(); >+ > CGContextSetTextPosition(context, point.x(), point.y()); > Vector<CGPoint, 256> positions(count); > fillVectorWithHorizontalGlyphPositions(positions, context, advances, count); >@@ -127,6 +129,10 @@ static void showLetterpressedGlyphsWithAdvances(const FloatPoint& point, const F > styleConfiguration.useSimplifiedEffect = YES; > } > >+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/FontCascadeCocoaAdditions.mm>) >+#include <WebKitAdditions/FontCascadeCocoaAdditions.mm> >+#endif >+ > CGContextSetFont(context, adoptCF(CTFontCopyGraphicsFont(ctFont, nullptr)).get()); > CGContextSetFontSize(context, platformData.size()); > >@@ -137,7 +143,7 @@ static void showLetterpressedGlyphsWithAdvances(const FloatPoint& point, const F > #else > UNUSED_PARAM(point); > UNUSED_PARAM(font); >- UNUSED_PARAM(context); >+ UNUSED_PARAM(coreContext); > UNUSED_PARAM(glyphs); > UNUSED_PARAM(advances); > UNUSED_PARAM(count); >@@ -299,7 +305,7 @@ void FontCascade::drawGlyphs(GraphicsContext& context, const Font& font, const G > } > > if (useLetterpressEffect) >- showLetterpressedGlyphsWithAdvances(point, font, cgContext, glyphBuffer.glyphs(from), static_cast<const CGSize*>(glyphBuffer.advances(from)), numGlyphs); >+ showLetterpressedGlyphsWithAdvances(point, font, context, glyphBuffer.glyphs(from), static_cast<const CGSize*>(glyphBuffer.advances(from)), numGlyphs); > else > showGlyphsWithAdvances(point, font, cgContext, glyphBuffer.glyphs(from), static_cast<const CGSize*>(glyphBuffer.advances(from)), numGlyphs); > if (syntheticBoldOffset)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dino
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198225
: 370580