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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | « Source/platform/exported/WebHTTPBody.cpp ('k') | Source/platform/fonts/FontDataCache.cpp » ('j') | 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 #endif 139 #endif
140 140
141 static FontDataCache* gFontDataCache = 0; 141 static FontDataCache* gFontDataCache = 0;
142 142
143 PassRefPtr<SimpleFontData> FontCache::getFontData(const FontDescription& fontDes cription, const AtomicString& family, bool checkingAlternateName, ShouldRetain s houldRetain) 143 PassRefPtr<SimpleFontData> FontCache::getFontData(const FontDescription& fontDes cription, const AtomicString& family, bool checkingAlternateName, ShouldRetain s houldRetain)
144 { 144 {
145 if (FontPlatformData* platformData = getFontPlatformData(fontDescription, ad justFamilyNameToAvoidUnsupportedFonts(family), checkingAlternateName)) 145 if (FontPlatformData* platformData = getFontPlatformData(fontDescription, ad justFamilyNameToAvoidUnsupportedFonts(family), checkingAlternateName))
146 return fontDataFromFontPlatformData(platformData, shouldRetain); 146 return fontDataFromFontPlatformData(platformData, shouldRetain);
147 147
148 return 0; 148 return nullptr;
149 } 149 }
150 150
151 PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData(const FontPla tformData* platformData, ShouldRetain shouldRetain) 151 PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData(const FontPla tformData* platformData, ShouldRetain shouldRetain)
152 { 152 {
153 if (!gFontDataCache) 153 if (!gFontDataCache)
154 gFontDataCache = new FontDataCache; 154 gFontDataCache = new FontDataCache;
155 155
156 #if !ASSERT_DISABLED 156 #if !ASSERT_DISABLED
157 if (shouldRetain == DoNotRetain) 157 if (shouldRetain == DoNotRetain)
158 ASSERT(m_purgePreventCount); 158 ASSERT(m_purgePreventCount);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 clients.append(*it); 285 clients.append(*it);
286 286
287 ASSERT(numClients == clients.size()); 287 ASSERT(numClients == clients.size());
288 for (size_t i = 0; i < numClients; ++i) 288 for (size_t i = 0; i < numClients; ++i)
289 clients[i]->fontCacheInvalidated(); 289 clients[i]->fontCacheInvalidated();
290 290
291 purge(ForcePurge); 291 purge(ForcePurge);
292 } 292 }
293 293
294 } // namespace WebCore 294 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/exported/WebHTTPBody.cpp ('k') | Source/platform/fonts/FontDataCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698