[Webkit-unassigned] [Bug 54452] Optimize Color::serialized()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 15 10:32:42 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=54452





--- Comment #3 from Andreas Kling <kling at webkit.org>  2011-02-15 10:32:43 PST ---
(From update of attachment 82442)
View in context: https://bugs.webkit.org/attachment.cgi?id=82442&action=review

>> Source/WebCore/platform/graphics/Color.cpp:185
>> +    static const char hexDigits[17] = "0123456789abcdef";
> 
> Any particular reason to use lowercase hex here? I normally prefer uppercase when we have a choice. I guess the old code was doing lowercase.

This is in accordance with http://www.whatwg.org/specs/web-apps/current-work/#serialization-of-a-color which was the reason for adding Color::serialized() in the first place.

>> Source/WebCore/platform/graphics/Color.cpp:191
>> +    vector[vectorSize + 1] = hexDigits[number & 0xF];
> 
> Is this more efficient than calling append twice?

Doubtful. The logic was copied from WTF::appendNumber().

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list