Changeset 219223 in webkit
- Timestamp:
- Jul 6, 2017 4:04:18 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PerformanceTests/ChangeLog
r218057 r219223 1 2017-07-06 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Cocoa] Improve performance of font lookups 4 https://bugs.webkit.org/show_bug.cgi?id=173960 5 <rdar://problem/31996891> 6 7 Reviewed by Darin Adler. 8 9 * Layout/font-fallback-font-family.html: Added. 10 * Layout/resources/font-fallback-font-family.html: Added. 11 1 12 2017-06-10 Dan Bernstein <mitz@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r219221 r219223 1 2017-07-06 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Cocoa] Improve performance of font lookups 4 https://bugs.webkit.org/show_bug.cgi?id=173960 5 <rdar://problem/31996891> 6 7 Reviewed by Darin Adler. 8 9 Looking up kCTFontPostScriptNameAttribute is faster than kCTFontNameAttribute. 10 11 No new tests because there is no behavior change. 12 13 * platform/spi/cocoa/CoreTextSPI.h: 14 * platform/graphics/cocoa/FontCacheCoreText.cpp: 15 (WebCore::FontDatabase::fontForPostScriptName): 16 1 17 2017-07-06 Myles C. Maxfield <mmaxfield@apple.com> 2 18 -
trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
r219199 r219223 911 911 return m_postScriptNameToFontDescriptors.ensure(folded, [&] { 912 912 auto postScriptNameString = folded.createCFString(); 913 CFTypeRef keys[] = { kCTFontEnabledAttribute, kCTFontNameAttribute }; 913 #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) 914 CFStringRef nameAttribute = kCTFontPostScriptNameAttribute; 915 #else 916 CFStringRef nameAttribute = kCTFontNameAttribute; 917 #endif 918 CFTypeRef keys[] = { kCTFontEnabledAttribute, nameAttribute }; 914 919 CFTypeRef values[] = { kCFBooleanTrue, postScriptNameString.get() }; 915 920 auto attributes = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, keys, values, WTF_ARRAY_LENGTH(keys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); -
trunk/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h
r216962 r219223 68 68 extern const CFStringRef kCTFontReferenceURLAttribute; 69 69 extern const CFStringRef kCTFontOpticalSizeAttribute; 70 extern const CFStringRef kCTFontPostScriptNameAttribute; 70 71 71 72 bool CTFontTransformGlyphs(CTFontRef, CGGlyph glyphs[], CGSize advances[], CFIndex count, CTFontTransformOptions);
Note: See TracChangeset
for help on using the changeset viewer.