summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/FontCache.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/FontCache.h')
-rw-r--r--WebCore/platform/graphics/FontCache.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/WebCore/platform/graphics/FontCache.h b/WebCore/platform/graphics/FontCache.h
index e1a704b..816fe64 100644
--- a/WebCore/platform/graphics/FontCache.h
+++ b/WebCore/platform/graphics/FontCache.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,6 +29,8 @@
#ifndef FontCache_h
#define FontCache_h
+#include <limits.h>
+#include <wtf/Vector.h>
#include <wtf/unicode/Unicode.h>
#if PLATFORM(WIN)
@@ -50,8 +52,10 @@ class SimpleFontData;
class FontCache {
public:
static const FontData* getFontData(const Font&, int& familyIndex, FontSelector*);
+ static void releaseFontData(const SimpleFontData*);
// This method is implemented by the platform.
+ // FIXME: Font data returned by this method never go inactive because callers don't track and release them.
static const SimpleFontData* getFontDataForCharacters(const Font&, const UChar* characters, int length);
// Also implemented by the platform.
@@ -61,12 +65,22 @@ public:
static IMLangFontLink2* getFontLinkInterface();
#endif
- static bool fontExists(const FontDescription&, const AtomicString& family);
+ static void getTraitsInFamily(const AtomicString&, Vector<unsigned>&);
static FontPlatformData* getCachedFontPlatformData(const FontDescription&, const AtomicString& family, bool checkingAlternateName = false);
static SimpleFontData* getCachedFontData(const FontPlatformData*);
static FontPlatformData* getLastResortFallbackFont(const FontDescription&);
-
+
+ static void addClient(FontSelector*);
+ static void removeClient(FontSelector*);
+
+ static unsigned generation();
+ static void invalidate();
+
+ static size_t fontDataCount();
+ static size_t inactiveFontDataCount();
+ static void purgeInactiveFontData(int count = INT_MAX);
+
private:
// These methods are implemented by each platform.
static FontPlatformData* getSimilarFontPlatformData(const Font&);