Summary: | [Cocoa] Don't change the text matrix multiple times inside FontCascade::drawGlyphs() | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||
Component: | New Bugs | Assignee: | 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
Myles C. Maxfield
2020-10-15 00:23:28 PDT
Created attachment 411415 [details]
Patch
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? 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? 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. 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 Committed r268561: <https://trac.webkit.org/changeset/268561> |