OLD | NEW |
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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } | 263 } |
264 | 264 |
265 static FontDataCache* gFontDataCache = 0; | 265 static FontDataCache* gFontDataCache = 0; |
266 | 266 |
267 PassRefPtr<SimpleFontData> FontCache::getFontData( | 267 PassRefPtr<SimpleFontData> FontCache::getFontData( |
268 const FontDescription& fontDescription, | 268 const FontDescription& fontDescription, |
269 const AtomicString& family, | 269 const AtomicString& family, |
270 AlternateFontName alternameFontName, | 270 AlternateFontName alternameFontName, |
271 ShouldRetain shouldRetain) { | 271 ShouldRetain shouldRetain) { |
272 if (FontPlatformData* platformData = getFontPlatformData( | 272 if (FontPlatformData* platformData = getFontPlatformData( |
273 fontDescription, FontFaceCreationParams( | 273 fontDescription, |
274 adjustFamilyNameToAvoidUnsupportedFonts(family)), | 274 FontFaceCreationParams( |
| 275 adjustFamilyNameToAvoidUnsupportedFonts(family)), |
275 alternameFontName)) { | 276 alternameFontName)) { |
276 return fontDataFromFontPlatformData( | 277 return fontDataFromFontPlatformData( |
277 platformData, shouldRetain, fontDescription.subpixelAscentDescent()); | 278 platformData, shouldRetain, fontDescription.subpixelAscentDescent()); |
278 } | 279 } |
279 | 280 |
280 return nullptr; | 281 return nullptr; |
281 } | 282 } |
282 | 283 |
283 PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData( | 284 PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData( |
284 const FontPlatformData* platformData, | 285 const FontPlatformData* platformData, |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 for (iter = gFallbackListShaperCache->begin(); | 484 for (iter = gFallbackListShaperCache->begin(); |
484 iter != gFallbackListShaperCache->end(); ++iter) { | 485 iter != gFallbackListShaperCache->end(); ++iter) { |
485 shapeResultCacheSize += iter->value->byteSize(); | 486 shapeResultCacheSize += iter->value->byteSize(); |
486 } | 487 } |
487 dump->AddScalar("size", "bytes", shapeResultCacheSize); | 488 dump->AddScalar("size", "bytes", shapeResultCacheSize); |
488 memoryDump->AddSuballocation(dump->guid(), | 489 memoryDump->AddSuballocation(dump->guid(), |
489 WTF::Partitions::kAllocatedObjectPoolName); | 490 WTF::Partitions::kAllocatedObjectPoolName); |
490 } | 491 } |
491 | 492 |
492 } // namespace blink | 493 } // namespace blink |
OLD | NEW |