usb_ecm: Use the current configuration instead of a fixed one.
[haiku.git] / src / servers / app / font / FontCache.h
blobaaa00586979499c73f8b731213c76dbc881b5791
1 /*
2 * Copyright 2007, Haiku. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Stephan Aßmus <superstippi@gmx.de>
7 */
9 #ifndef FONT_CACHE_H
10 #define FONT_CACHE_H
12 #include "FontCacheEntry.h"
13 #include "HashMap.h"
14 #include "HashString.h"
15 #include "MultiLocker.h"
16 #include "ServerFont.h"
19 class FontCache : public MultiLocker {
20 public:
21 FontCache();
22 virtual ~FontCache();
24 // global instance
25 static FontCache* Default();
27 FontCacheEntry* FontCacheEntryFor(const ServerFont& font,
28 bool forceVector);
29 void Recycle(FontCacheEntry* entry);
31 private:
32 void _ConstrainEntryCount();
34 static FontCache sDefaultInstance;
36 typedef HashMap<HashString, FontCacheEntry*> FontMap;
38 FontMap fFontCacheEntries;
41 #endif // FONT_CACHE_H