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

Side by Side Diff: Source/WebCore/platform/graphics/FontCache.cpp

Issue 13905007: Remove the last remaining PLATFORM() bits from WebCore. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fffffffffff Created 7 years, 8 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
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 static bool isDeletedValue(const FontPlatformData& value) 278 static bool isDeletedValue(const FontPlatformData& value)
279 { 279 {
280 return value.isHashTableDeletedValue(); 280 return value.isHashTableDeletedValue();
281 } 281 }
282 }; 282 };
283 283
284 typedef HashMap<FontPlatformData, pair<RefPtr<SimpleFontData>, unsigned>, FontDa taCacheKeyHash, FontDataCacheKeyTraits> FontDataCache; 284 typedef HashMap<FontPlatformData, pair<RefPtr<SimpleFontData>, unsigned>, FontDa taCacheKeyHash, FontDataCacheKeyTraits> FontDataCache;
285 285
286 static FontDataCache* gFontDataCache = 0; 286 static FontDataCache* gFontDataCache = 0;
287 287
288 #if PLATFORM(CHROMIUM) && !OS(ANDROID) 288 #if !OS(ANDROID)
289 const int cMaxInactiveFontData = 250; 289 const int cMaxInactiveFontData = 250;
290 const int cTargetInactiveFontData = 200; 290 const int cTargetInactiveFontData = 200;
291 #else 291 #else
292 const int cMaxInactiveFontData = 225; 292 const int cMaxInactiveFontData = 225;
293 const int cTargetInactiveFontData = 200; 293 const int cTargetInactiveFontData = 200;
294 #endif 294 #endif
295 static ListHashSet<RefPtr<SimpleFontData> >* gInactiveFontData = 0; 295 static ListHashSet<RefPtr<SimpleFontData> >* gInactiveFontData = 0;
296 296
297 PassRefPtr<SimpleFontData> FontCache::getCachedFontData(const FontDescription& f ontDescription, const AtomicString& family, bool checkingAlternateName, ShouldRe tain shouldRetain) 297 PassRefPtr<SimpleFontData> FontCache::getCachedFontData(const FontDescription& f ontDescription, const AtomicString& family, bool checkingAlternateName, ShouldRe tain shouldRetain)
298 { 298 {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 clients.append(*it); 552 clients.append(*it);
553 553
554 ASSERT(numClients == clients.size()); 554 ASSERT(numClients == clients.size());
555 for (size_t i = 0; i < numClients; ++i) 555 for (size_t i = 0; i < numClients; ++i)
556 clients[i]->fontCacheInvalidated(); 556 clients[i]->fontCacheInvalidated();
557 557
558 purgeInactiveFontData(); 558 purgeInactiveFontData();
559 } 559 }
560 560
561 } // namespace WebCore 561 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/FontCache.h ('k') | Source/WebCore/platform/graphics/FontDescription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698