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

Side by Side Diff: third_party/WebKit/WebCore/platform/graphics/FontCache.cpp

Issue 100276: Remove forkage of FontCache.cpp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 static bool isDeletedValue(const FontPlatformData& value) 246 static bool isDeletedValue(const FontPlatformData& value)
247 { 247 {
248 return value.isHashTableDeletedValue(); 248 return value.isHashTableDeletedValue();
249 } 249 }
250 }; 250 };
251 251
252 typedef HashMap<FontPlatformData, pair<SimpleFontData*, unsigned>, FontDataCache KeyHash, FontDataCacheKeyTraits> FontDataCache; 252 typedef HashMap<FontPlatformData, pair<SimpleFontData*, unsigned>, FontDataCache KeyHash, FontDataCacheKeyTraits> FontDataCache;
253 253
254 static FontDataCache* gFontDataCache = 0; 254 static FontDataCache* gFontDataCache = 0;
255 255
256 // TODO(mbelshe): Webkit bug https://bugs.webkit.org/show_bug.cgi?id=21451 256 const int cMaxInactiveFontData = 120; // Pretty Low Threshold
257 const int cMaxInactiveFontData = 256;
258 const float cTargetInactiveFontData = 100; 257 const float cTargetInactiveFontData = 100;
259 static ListHashSet<const SimpleFontData*>* gInactiveFontData = 0; 258 static ListHashSet<const SimpleFontData*>* gInactiveFontData = 0;
260 259
261 SimpleFontData* FontCache::getCachedFontData(const FontPlatformData* platformDat a) 260 SimpleFontData* FontCache::getCachedFontData(const FontPlatformData* platformDat a)
262 { 261 {
263 if (!platformData) 262 if (!platformData)
264 return 0; 263 return 0;
265 264
266 if (!gFontDataCache) { 265 if (!gFontDataCache) {
267 gFontDataCache = new FontDataCache; 266 gFontDataCache = new FontDataCache;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 clients.append(*it); 450 clients.append(*it);
452 451
453 ASSERT(numClients == clients.size()); 452 ASSERT(numClients == clients.size());
454 for (size_t i = 0; i < numClients; ++i) 453 for (size_t i = 0; i < numClients; ++i)
455 clients[i]->fontCacheInvalidated(); 454 clients[i]->fontCacheInvalidated();
456 455
457 purgeInactiveFontData(); 456 purgeInactiveFontData();
458 } 457 }
459 458
460 } // namespace WebCore 459 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698