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

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

Issue 140913011: Trim FontSelector interface a bit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months 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
Index: Source/platform/fonts/FontCache.cpp
diff --git a/Source/platform/fonts/FontCache.cpp b/Source/platform/fonts/FontCache.cpp
index 0e9b22a3b3f8e3b3b9d7cafb4203fc2619aada57..bd0bb575de027c2537606e5c186ac4321190afe8 100644
--- a/Source/platform/fonts/FontCache.cpp
+++ b/Source/platform/fonts/FontCache.cpp
@@ -34,12 +34,12 @@
#include "RuntimeEnabledFeatures.h"
#include "platform/fonts/AlternateFontFamily.h"
+#include "platform/fonts/FontCacheClient.h"
#include "platform/fonts/FontCacheKey.h"
#include "platform/fonts/FontDataCache.h"
#include "platform/fonts/FontDescription.h"
#include "platform/fonts/FontFallbackList.h"
#include "platform/fonts/FontPlatformData.h"
-#include "platform/fonts/FontSelector.h"
#include "platform/fonts/FontSmoothingMode.h"
#include "platform/fonts/TextRenderingMode.h"
#include "platform/fonts/opentype/OpenTypeVerticalData.h"
@@ -237,18 +237,18 @@ void FontCache::purge(PurgeSeverity PurgeSeverity)
purgeFontVerticalDataCache();
}
-static HashSet<FontSelector*>* gClients;
+static HashSet<FontCacheClient*>* gClients;
-void FontCache::addClient(FontSelector* client)
+void FontCache::addClient(FontCacheClient* client)
{
if (!gClients)
- gClients = new HashSet<FontSelector*>;
+ gClients = new HashSet<FontCacheClient*>;
ASSERT(!gClients->contains(client));
gClients->add(client);
}
-void FontCache::removeClient(FontSelector* client)
+void FontCache::removeClient(FontCacheClient* client)
{
ASSERT(gClients);
ASSERT(gClients->contains(client));
@@ -277,11 +277,11 @@ void FontCache::invalidate()
gGeneration++;
- Vector<RefPtr<FontSelector> > clients;
+ Vector<RefPtr<FontCacheClient> > clients;
size_t numClients = gClients->size();
clients.reserveInitialCapacity(numClients);
- HashSet<FontSelector*>::iterator end = gClients->end();
- for (HashSet<FontSelector*>::iterator it = gClients->begin(); it != end; ++it)
+ HashSet<FontCacheClient*>::iterator end = gClients->end();
+ for (HashSet<FontCacheClient*>::iterator it = gClients->begin(); it != end; ++it)
clients.append(*it);
ASSERT(numClients == clients.size());

Powered by Google App Engine
This is Rietveld 408576698