Bug 217749

Summary: [Cocoa] Don't change the text matrix multiple times inside FontCascade::drawGlyphs()
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, jonlee, sabouhallawa, sam, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 217506    
Attachments:
Description Flags
Patch simon.fraser: review+, ews-feeder: commit-queue-

Myles C. Maxfield
Reported 2020-10-15 00:23:28 PDT
[Cocoa] Don't change the text matrix multiple times inside FontCascade::drawGlyphs()
Attachments
Patch (15.38 KB, patch)
2020-10-15 00:41 PDT, Myles C. Maxfield
simon.fraser: review+
ews-feeder: commit-queue-
Myles C. Maxfield
Comment 1 2020-10-15 00:41:34 PDT
Sam Weinig
Comment 2 2020-10-15 09:28:40 PDT
Comment on attachment 411415 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=411415&action=review > Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp:66 > + static NeverDestroyed<AffineTransform> result(0, -1, 1, 0, 0, 0); I don't think a NeverDestroyed should be needed here, as AffineTransform should have a trivial destructor. We should probably make constructions of AffineTransform constexpr (given it is built on std::array, this should be easy enough) so we can make this even moar const. (none of that is needed for this change, just writing this here to note it). > Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp:85 > + CGPoint position = FloatPoint(point.x(), point.y() + ascentDelta); Seems a bit weird to make a CGPoint this way. Any reason not to use CGPointMake directly?
Simon Fraser (smfr)
Comment 3 2020-10-15 09:59:35 PDT
Comment on attachment 411415 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=411415&action=review > Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp:144 > + if (!platformData.isColorBitmapFont()) Why are color bitmap fonts special?
Myles C. Maxfield
Comment 4 2020-10-15 10:58:23 PDT
Comment on attachment 411415 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=411415&action=review >> Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp:144 >> + if (!platformData.isColorBitmapFont()) > > Why are color bitmap fonts special? I have no idea 😅 This branch is probably wrong, but this patch just moves the code around. I've filed https://bugs.webkit.org/show_bug.cgi?id=217767 to see if we can remove it.
Myles C. Maxfield
Comment 5 2020-10-15 10:59:48 PDT
Comment on attachment 411415 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=411415&action=review > Source/WebCore/ChangeLog:18 > + calls, we have now way of knowing whether it was modified by WebKit or now way
Myles C. Maxfield
Comment 6 2020-10-15 16:51:14 PDT
Radar WebKit Bug Importer
Comment 7 2020-10-15 16:52:20 PDT
Note You need to log in before you can comment on or make changes to this bug.