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

Side by Side Diff: src/fonts/SkFontMgr_fontconfig.cpp

Issue 936893002: Clarify desired behavior of FontConfigTypeface::LegacyCreateTypeface. (Closed) Base URL: https://skia.googlesource.com/skia.git@typefacecache
Patch Set: Line wrapping. Created 5 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
« no previous file with comments | « no previous file | src/ports/SkFontConfigTypeface.h » ('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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkFontMgr.h" 8 #include "SkFontMgr.h"
9 #include "SkFontStyle.h" 9 #include "SkFontStyle.h"
10 #include "SkFontConfigInterface.h" 10 #include "SkFontConfigInterface.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 318
319 SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERR IDE { 319 SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERR IDE {
320 SkAutoTDelete<SkStreamAsset> stream(SkStream::NewFromFile(path)); 320 SkAutoTDelete<SkStreamAsset> stream(SkStream::NewFromFile(path));
321 return stream.get() ? this->createFromStream(stream.detach(), ttcIndex) : NULL; 321 return stream.get() ? this->createFromStream(stream.detach(), ttcIndex) : NULL;
322 } 322 }
323 323
324 virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], 324 virtual SkTypeface* onLegacyCreateTypeface(const char familyName[],
325 unsigned styleBits) const SK_OVER RIDE { 325 unsigned styleBits) const SK_OVER RIDE {
326 FCLocker lock; 326 FCLocker lock;
327 return FontConfigTypeface::LegacyCreateTypeface(NULL, familyName, 327 return FontConfigTypeface::LegacyCreateTypeface(familyName, (SkTypeface: :Style)styleBits);
328 (SkTypeface::Style)styleBits);
329 } 328 }
330 }; 329 };
331 330
332 SkFontMgr* SkFontMgr::Factory() { 331 SkFontMgr* SkFontMgr::Factory() {
333 SkFontConfigInterface* fci = RefFCI(); 332 SkFontConfigInterface* fci = RefFCI();
334 return fci ? SkNEW_ARGS(SkFontMgr_fontconfig, (fci)) : NULL; 333 return fci ? SkNEW_ARGS(SkFontMgr_fontconfig, (fci)) : NULL;
335 } 334 }
OLDNEW
« no previous file with comments | « no previous file | src/ports/SkFontConfigTypeface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698