2 * Copyright 2007, Haiku. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Stephan Aßmus <superstippi@gmx.de>
12 #include "FontCacheEntry.h"
14 #include "HashString.h"
15 #include "MultiLocker.h"
16 #include "ServerFont.h"
19 class FontCache
: public MultiLocker
{
25 static FontCache
* Default();
27 FontCacheEntry
* FontCacheEntryFor(const ServerFont
& font
,
29 void Recycle(FontCacheEntry
* entry
);
32 void _ConstrainEntryCount();
34 static FontCache sDefaultInstance
;
36 typedef HashMap
<HashString
, FontCacheEntry
*> FontMap
;
38 FontMap fFontCacheEntries
;
41 #endif // FONT_CACHE_H