[webkit-reviews] review granted: [Bug 121656] Avoid calling AtomicString::lower() in makeFontGlyphsCacheKey : [Attachment 212122] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 19 21:38:18 PDT 2013
Darin Adler <darin at apple.com> has granted Anders Carlsson
<andersca at apple.com>'s request for review:
Bug 121656: Avoid calling AtomicString::lower() in makeFontGlyphsCacheKey
https://bugs.webkit.org/show_bug.cgi?id=121656
Attachment 212122: Patch
https://bugs.webkit.org/attachment.cgi?id=212122&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=212122&action=review
> Source/WebCore/platform/graphics/Font.cpp:171
> + if (!equalIgnoringCase(a.families[i].impl(), b.families[i].impl()))
Why is the impl() needed here? Shouldn't we have functions overloaded so that
isn’t needed?
> Source/WebCore/platform/graphics/Font.cpp:206
> + Vector<unsigned, 7> hashCodes;
> + hashCodes.reserveInitialCapacity(4 + key.families.size());
Need a comment explaining why 7. Why not, say, more like 16 to cover virtually
all non-ridiculous cases without allocation?
> Source/WebCore/platform/graphics/Font.cpp:215
> + return StringHasher::hashMemory(hashCodes.data(), hashCodes.size() *
sizeof(unsigned));
The proper comment for this line is, "Yo dawg! I heard you like hashes, so I
hashed your hash."
More information about the webkit-reviews
mailing list