Bug 215685 - CTFontGetPhysicalSymbolicTraits() is faster than CTFontCopyPhysicalFont()/CTFontGetSymbolicTraits()
Summary: CTFontGetPhysicalSymbolicTraits() is faster than CTFontCopyPhysicalFont()/CTF...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on: 215684
Blocks:
  Show dependency treegraph
 
Reported: 2020-08-19 20:45 PDT by Myles C. Maxfield
Modified: 2020-09-06 18:33 PDT (History)
7 users (show)

See Also:


Attachments
Patch (7.67 KB, patch)
2020-08-19 20:55 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (8.81 KB, patch)
2020-09-06 15:31 PDT, Myles C. Maxfield
darin: review+
Details | Formatted Diff | Diff
Patch for committing (8.80 KB, patch)
2020-09-06 17:15 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2020-08-19 20:45:27 PDT
We can take a shortcut.
Comment 1 Myles C. Maxfield 2020-08-19 20:55:30 PDT
Created attachment 406910 [details]
Patch
Comment 2 Myles C. Maxfield 2020-08-19 21:43:18 PDT
This patch needs to modify CoreTextSPI.h.
Comment 3 Myles C. Maxfield 2020-08-19 21:52:14 PDT
<rdar://problem/51631817>
Comment 4 Myles C. Maxfield 2020-09-06 15:31:26 PDT
Created attachment 408142 [details]
Patch
Comment 5 Darin Adler 2020-09-06 16:50:02 PDT
Comment on attachment 408142 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=408142&action=review

> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:858
> +            RetainPtr<CTFontRef> fontForSynthesisComputation = font;

auto fontForSynthesisComputation = retainPtr(font);

> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h:57
> +enum class ShouldComputePhysicalTraits : uint8_t {
> +    Yes,
> +    No
> +};

I suggest bool instead of uint8_t, No before Yes, and putting this on a single line instead of vertically on 4 lines.
Comment 6 Myles C. Maxfield 2020-09-06 17:15:32 PDT
Created attachment 408153 [details]
Patch for committing
Comment 7 EWS 2020-09-06 18:33:35 PDT
Committed r266690: <https://trac.webkit.org/changeset/266690>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 408153 [details].