| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2007-2008 Torch Mobile, Inc. | 3 * Copyright (C) 2007-2008 Torch Mobile, Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void addClient(FontSelector*); | 81 void addClient(FontSelector*); |
| 82 void removeClient(FontSelector*); | 82 void removeClient(FontSelector*); |
| 83 | 83 |
| 84 unsigned short generation(); | 84 unsigned short generation(); |
| 85 void invalidate(); | 85 void invalidate(); |
| 86 | 86 |
| 87 size_t fontDataCount(); | 87 size_t fontDataCount(); |
| 88 size_t inactiveFontDataCount(); | 88 size_t inactiveFontDataCount(); |
| 89 void purgeInactiveFontData(int count = INT_MAX); | 89 void purgeInactiveFontData(int count = INT_MAX); |
| 90 | 90 |
| 91 #if PLATFORM(CHROMIUM) && OS(WINDOWS) | 91 #if OS(WINDOWS) |
| 92 PassRefPtr<SimpleFontData> fontDataFromDescriptionAndLogFont(const FontDescr
iption&, ShouldRetain, const LOGFONT&, wchar_t* outFontFamilyName); | 92 PassRefPtr<SimpleFontData> fontDataFromDescriptionAndLogFont(const FontDescr
iption&, ShouldRetain, const LOGFONT&, wchar_t* outFontFamilyName); |
| 93 #endif | 93 #endif |
| 94 | 94 |
| 95 #if ENABLE(OPENTYPE_VERTICAL) | 95 #if ENABLE(OPENTYPE_VERTICAL) |
| 96 typedef uint32_t FontFileKey; | 96 typedef uint32_t FontFileKey; |
| 97 PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const F
ontPlatformData&); | 97 PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const F
ontPlatformData&); |
| 98 #endif | 98 #endif |
| 99 | 99 |
| 100 struct SimpleFontFamily { | 100 struct SimpleFontFamily { |
| 101 String name; | 101 String name; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 123 | 123 |
| 124 // These methods are implemented by each platform. | 124 // These methods are implemented by each platform. |
| 125 PassRefPtr<SimpleFontData> getSimilarFontPlatformData(const Font&); | 125 PassRefPtr<SimpleFontData> getSimilarFontPlatformData(const Font&); |
| 126 FontPlatformData* createFontPlatformData(const FontDescription&, const Atomi
cString& family); | 126 FontPlatformData* createFontPlatformData(const FontDescription&, const Atomi
cString& family); |
| 127 | 127 |
| 128 PassRefPtr<SimpleFontData> getCachedFontData(const FontPlatformData*, Should
Retain = Retain); | 128 PassRefPtr<SimpleFontData> getCachedFontData(const FontPlatformData*, Should
Retain = Retain); |
| 129 | 129 |
| 130 // Don't purge if this count is > 0; | 130 // Don't purge if this count is > 0; |
| 131 int m_purgePreventCount; | 131 int m_purgePreventCount; |
| 132 | 132 |
| 133 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN)) || OS(ANDROID) | 133 #if OS(DARWIN) || OS(ANDROID) |
| 134 friend class ComplexTextController; | 134 friend class ComplexTextController; |
| 135 #endif | 135 #endif |
| 136 friend class SimpleFontData; // For getCachedFontData(const FontPlatformData
*) | 136 friend class SimpleFontData; // For getCachedFontData(const FontPlatformData
*) |
| 137 friend class FontFallbackList; | 137 friend class FontFallbackList; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 // Get the global fontCache. | 140 // Get the global fontCache. |
| 141 FontCache* fontCache(); | 141 FontCache* fontCache(); |
| 142 | 142 |
| 143 class FontCachePurgePreventer { | 143 class FontCachePurgePreventer { |
| 144 public: | 144 public: |
| 145 FontCachePurgePreventer() { fontCache()->disablePurging(); } | 145 FontCachePurgePreventer() { fontCache()->disablePurging(); } |
| 146 ~FontCachePurgePreventer() { fontCache()->enablePurging(); } | 146 ~FontCachePurgePreventer() { fontCache()->enablePurging(); } |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } | 149 } |
| 150 | 150 |
| 151 #endif | 151 #endif |
| OLD | NEW |