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

Side by Side Diff: Source/platform/fonts/skia/FontCacheSkia.cpp

Issue 468443002: Cleanup namespace usage in platform/fonts/. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanup namespace usage in platform/fonts/. Created 6 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return fontDataFromFontPlatformData(fontPlatformData, shouldRetain); 164 return fontDataFromFontPlatformData(fontPlatformData, shouldRetain);
165 } 165 }
166 166
167 PassRefPtr<SkTypeface> FontCache::createTypeface(const FontDescription& fontDesc ription, const FontFaceCreationParams& creationParams, CString& name) 167 PassRefPtr<SkTypeface> FontCache::createTypeface(const FontDescription& fontDesc ription, const FontFaceCreationParams& creationParams, CString& name)
168 { 168 {
169 #if !OS(WIN) && !OS(ANDROID) 169 #if !OS(WIN) && !OS(ANDROID)
170 if (creationParams.creationType() == CreateFontByFciIdAndTtcIndex) { 170 if (creationParams.creationType() == CreateFontByFciIdAndTtcIndex) {
171 // TODO(dro): crbug.com/381620 Use creationParams.ttcIndex() after 171 // TODO(dro): crbug.com/381620 Use creationParams.ttcIndex() after
172 // https://code.google.com/p/skia/issues/detail?id=1186 gets fixed. 172 // https://code.google.com/p/skia/issues/detail?id=1186 gets fixed.
173 SkTypeface* typeface = nullptr; 173 SkTypeface* typeface = nullptr;
174 if (blink::Platform::current()->sandboxSupport()) 174 if (Platform::current()->sandboxSupport())
175 typeface = SkTypeface::CreateFromStream(streamForFontconfigInterface Id(creationParams.fontconfigInterfaceId())); 175 typeface = SkTypeface::CreateFromStream(streamForFontconfigInterface Id(creationParams.fontconfigInterfaceId()));
176 else 176 else
177 typeface = SkTypeface::CreateFromFile(creationParams.filename().data ()); 177 typeface = SkTypeface::CreateFromFile(creationParams.filename().data ());
178 178
179 if (typeface) 179 if (typeface)
180 return adoptRef(typeface); 180 return adoptRef(typeface);
181 } 181 }
182 #endif 182 #endif
183 183
184 AtomicString family = creationParams.family(); 184 AtomicString family = creationParams.family();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 fontSize, 225 fontSize,
226 (fontDescription.weight() >= FontWeight600 && !tf->isBold()) || fontDesc ription.isSyntheticBold(), 226 (fontDescription.weight() >= FontWeight600 && !tf->isBold()) || fontDesc ription.isSyntheticBold(),
227 (fontDescription.style() && !tf->isItalic()) || fontDescription.isSynthe ticItalic(), 227 (fontDescription.style() && !tf->isItalic()) || fontDescription.isSynthe ticItalic(),
228 fontDescription.orientation(), 228 fontDescription.orientation(),
229 fontDescription.useSubpixelPositioning()); 229 fontDescription.useSubpixelPositioning());
230 return result; 230 return result;
231 } 231 }
232 #endif // !OS(WIN) 232 #endif // !OS(WIN)
233 233
234 } // namespace blink 234 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/fonts/opentype/OpenTypeUtilities.cpp ('k') | Source/platform/fonts/skia/FontCustomPlatformDataSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698