Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: Source/platform/fonts/FontCache.h

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/Font.cpp ('k') | Source/platform/fonts/FontCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontCache.h
diff --git a/Source/core/platform/graphics/FontCache.h b/Source/platform/fonts/FontCache.h
similarity index 94%
rename from Source/core/platform/graphics/FontCache.h
rename to Source/platform/fonts/FontCache.h
index 45840680ca544e12a05f25f55c5781600ad0d826..8dde8caf322f00a42fe2b5eb07f1e14ef93911c5 100644
--- a/Source/core/platform/graphics/FontCache.h
+++ b/Source/platform/fonts/FontCache.h
@@ -31,6 +31,7 @@
#define FontCache_h
#include <limits.h>
+#include "platform/PlatformExport.h"
#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
@@ -63,12 +64,12 @@ class SimpleFontData;
enum ShouldRetain { Retain, DoNotRetain };
enum PurgeSeverity { PurgeIfNeeded, ForcePurge };
-class FontCache {
+class PLATFORM_EXPORT FontCache {
friend class FontCachePurgePreventer;
WTF_MAKE_NONCOPYABLE(FontCache); WTF_MAKE_FAST_ALLOCATED;
public:
- friend FontCache* fontCache();
+ static FontCache* fontCache();
void releaseFontData(const SimpleFontData*);
@@ -150,13 +151,10 @@ private:
friend class FontFallbackList;
};
-// Get the global fontCache.
-FontCache* fontCache();
-
-class FontCachePurgePreventer {
+class PLATFORM_EXPORT FontCachePurgePreventer {
public:
- FontCachePurgePreventer() { fontCache()->disablePurging(); }
- ~FontCachePurgePreventer() { fontCache()->enablePurging(); }
+ FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); }
+ ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); }
};
}
« no previous file with comments | « Source/platform/fonts/Font.cpp ('k') | Source/platform/fonts/FontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698