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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontCache.cpp

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 years, 1 month 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
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698