[Webkit-unassigned] [Bug 22861] Turn the FontCache into a singleton

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 16 02:09:18 PST 2008


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


jchaffraix at pleyo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at webkit.org




------- Comment #3 from jchaffraix at pleyo.com  2008-12-16 02:09 PDT -------

(In reply to comment #2)
> Why is it a good idea to turn the FontCache into a singleton?  What does this
> get us?
> 

First it makes FontCache coherent with the rest of WebCore: I have not found
another class that only bears static methods inside WebCore. IMHO it is also
particularly relevant to make this class close to the Cache.
Then it makes it cristal clear that we are using a singleton: static methods +
static HashMaps / HashList inside the .cpp sounds like a hidden singleton.
Finally when you start hacking the FontCache as it is now, you have to find the
different definitions mixed with the code in FontCache.cpp. Making it a real
class is a first step into moving those definitons in their own files and move
the static HashMaps / HashList in the header.

So to answer the benefits: right now, it adds a little overhead to the compiled
code. But within a few changes, we should have a more readable code.


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



More information about the webkit-unassigned mailing list