summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/FontCache.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/FontCache.h')
-rw-r--r--Source/WebCore/platform/graphics/FontCache.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/WebCore/platform/graphics/FontCache.h b/Source/WebCore/platform/graphics/FontCache.h
index 12fb8a328..3ae533475 100644
--- a/Source/WebCore/platform/graphics/FontCache.h
+++ b/Source/WebCore/platform/graphics/FontCache.h
@@ -32,6 +32,8 @@
#include <limits.h>
#include <wtf/Forward.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
#include <wtf/unicode/Unicode.h>
@@ -61,11 +63,11 @@ public:
enum ShouldRetain { Retain, DoNotRetain };
- const FontData* getFontData(const Font&, int& familyIndex, FontSelector*);
+ PassRefPtr<FontData> getFontData(const Font&, int& familyIndex, FontSelector*);
void releaseFontData(const SimpleFontData*);
// This method is implemented by the platform.
- const SimpleFontData* getFontDataForCharacters(const Font&, const UChar* characters, int length);
+ PassRefPtr<SimpleFontData> getFontDataForCharacters(const Font&, const UChar* characters, int length);
// Also implemented by the platform.
void platformInit();
@@ -85,8 +87,8 @@ public:
void getTraitsInFamily(const AtomicString&, Vector<unsigned>&);
- SimpleFontData* getCachedFontData(const FontDescription&, const AtomicString&, bool checkingAlternateName = false, ShouldRetain = Retain);
- SimpleFontData* getLastResortFallbackFont(const FontDescription&, ShouldRetain = Retain);
+ PassRefPtr<SimpleFontData> getCachedFontData(const FontDescription&, const AtomicString&, bool checkingAlternateName = false, ShouldRetain = Retain);
+ PassRefPtr<SimpleFontData> getLastResortFallbackFont(const FontDescription&, ShouldRetain = Retain);
SimpleFontData* getNonRetainedLastResortFallbackFont(const FontDescription&);
void addClient(FontSelector*);
@@ -100,9 +102,9 @@ public:
void purgeInactiveFontData(int count = INT_MAX);
#if PLATFORM(WIN)
- SimpleFontData* fontDataFromDescriptionAndLogFont(const FontDescription&, ShouldRetain, const LOGFONT& font, AtomicString& outFontFamilyName);
+ PassRefPtr<SimpleFontData> fontDataFromDescriptionAndLogFont(const FontDescription&, ShouldRetain, const LOGFONT&, AtomicString& outFontFamilyName);
#elif PLATFORM(CHROMIUM) && OS(WINDOWS)
- SimpleFontData* fontDataFromDescriptionAndLogFont(const FontDescription&, ShouldRetain, const LOGFONT& font, wchar_t* outFontFamilyName);
+ PassRefPtr<SimpleFontData> fontDataFromDescriptionAndLogFont(const FontDescription&, ShouldRetain, const LOGFONT&, wchar_t* outFontFamilyName);
#endif
#if ENABLE(OPENTYPE_VERTICAL)
@@ -139,10 +141,10 @@ private:
FontPlatformData* getCachedFontPlatformData(const FontDescription&, const AtomicString& family, bool checkingAlternateName = false);
// These methods are implemented by each platform.
- SimpleFontData* getSimilarFontPlatformData(const Font&);
+ PassRefPtr<SimpleFontData> getSimilarFontPlatformData(const Font&);
FontPlatformData* createFontPlatformData(const FontDescription&, const AtomicString& family);
- SimpleFontData* getCachedFontData(const FontPlatformData*, ShouldRetain = Retain);
+ PassRefPtr<SimpleFontData> getCachedFontData(const FontPlatformData*, ShouldRetain = Retain);
// Don't purge if this count is > 0;
int m_purgePreventCount;