[Webkit-unassigned] [Bug 160520] Add support for ColorSpaces and deep color to Color.h

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 3 13:22:33 PDT 2016


--- Comment #2 from Dean Jackson <dino at apple.com> ---
8/2/16, 4:17 PM Dean Jackson:
Doing some allocation tracking it seems an average page (macrumors daringfireball) has on the order of 3000 - 6000 colors.

8/2/16, 4:19 PM Dean Jackson:
Lea's amazing http://leaverou.github.io/conic-gradient/ got to about 8200 live color instances.

8/2/16, 4:25 PM Dean Jackson:
Although, that number would probably be smaller if we implemented conic-gradient :)

The single page HTML5 got to about 300,000 colors at its highest point, so an extra 64bit pointer would be about 2.25 Mb of extra memory (double what the current Color is).

8/3/16, 11:14 AM Dean Jackson:
If we start counting unique colors....

daringfireball.net 22
html5 spec 106 (out of 350k creations)
macrumors 76
apple.com/iphone 26
BBC 68

8/3/16, 1:18 PM Dean Jackson:
With discussion from Sam:

   - 64 bits 
       (32 for inline color, 1 bit for validity)
   - Inline access

Double Size
   - 128 bits 
       (32 for inline color, 1 bit for validity, 64 bits for pointer to extended data)
   - Direct access

       - Double the size
           ~2MB extra on HTML spec test

Atomic Color (the color of tomorrow)
   - 64 bits
       (64 bits for pointer to uniqued color)
   - Indirect access

       - Indirect access might be a perf hit

Tagged pointer
   - 64 bits
       (same as current, except you have a bit which tells you if this is a pointer to the extended data)
   - Direct access after branch

       - Adds a branch to all color access
       - Might not work with current tools

8/3/16, 1:18 PM Dean Jackson:

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160803/78697420/attachment.html>

More information about the webkit-unassigned mailing list