| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 194 } |
| 195 | 195 |
| 196 std::unique_ptr<FontPlatformData> FontCache::scaleFontPlatformData( | 196 std::unique_ptr<FontPlatformData> FontCache::scaleFontPlatformData( |
| 197 const FontPlatformData& fontPlatformData, | 197 const FontPlatformData& fontPlatformData, |
| 198 const FontDescription& fontDescription, | 198 const FontDescription& fontDescription, |
| 199 const FontFaceCreationParams& creationParams, | 199 const FontFaceCreationParams& creationParams, |
| 200 float fontSize) { | 200 float fontSize) { |
| 201 #if OS(MACOSX) | 201 #if OS(MACOSX) |
| 202 return createFontPlatformData(fontDescription, creationParams, fontSize); | 202 return createFontPlatformData(fontDescription, creationParams, fontSize); |
| 203 #else | 203 #else |
| 204 return wrapUnique(new FontPlatformData(fontPlatformData, fontSize)); | 204 return makeUnique<FontPlatformData>(fontPlatformData, fontSize); |
| 205 #endif | 205 #endif |
| 206 } | 206 } |
| 207 | 207 |
| 208 ShapeCache* FontCache::getShapeCache(const FallbackListCompositeKey& key) { | 208 ShapeCache* FontCache::getShapeCache(const FallbackListCompositeKey& key) { |
| 209 if (!gFallbackListShaperCache) | 209 if (!gFallbackListShaperCache) |
| 210 gFallbackListShaperCache = new FallbackListShaperCache; | 210 gFallbackListShaperCache = new FallbackListShaperCache; |
| 211 | 211 |
| 212 FallbackListShaperCache::iterator it = gFallbackListShaperCache->find(key); | 212 FallbackListShaperCache::iterator it = gFallbackListShaperCache->find(key); |
| 213 ShapeCache* result = nullptr; | 213 ShapeCache* result = nullptr; |
| 214 if (it == gFallbackListShaperCache->end()) { | 214 if (it == gFallbackListShaperCache->end()) { |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 for (iter = gFallbackListShaperCache->begin(); | 484 for (iter = gFallbackListShaperCache->begin(); |
| 485 iter != gFallbackListShaperCache->end(); ++iter) { | 485 iter != gFallbackListShaperCache->end(); ++iter) { |
| 486 shapeResultCacheSize += iter->value->byteSize(); | 486 shapeResultCacheSize += iter->value->byteSize(); |
| 487 } | 487 } |
| 488 dump->AddScalar("size", "bytes", shapeResultCacheSize); | 488 dump->AddScalar("size", "bytes", shapeResultCacheSize); |
| 489 memoryDump->AddSuballocation(dump->guid(), | 489 memoryDump->AddSuballocation(dump->guid(), |
| 490 WTF::Partitions::kAllocatedObjectPoolName); | 490 WTF::Partitions::kAllocatedObjectPoolName); |
| 491 } | 491 } |
| 492 | 492 |
| 493 } // namespace blink | 493 } // namespace blink |
| OLD | NEW |