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

Side by Side Diff: include/core/SkTypeface.h

Issue 304383005: Port most uses of SkOnce to SkLazyPtr. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add mutex Created 6 years, 6 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 | « include/core/SkPathRef.h ('k') | include/ports/SkFontMgr.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkTypeface_DEFINED 10 #ifndef SkTypeface_DEFINED
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 @param glyphIDsCount Number of elements in subsetGlyphIds. Ignored if 332 @param glyphIDsCount Number of elements in subsetGlyphIds. Ignored if
333 glyphIDs is NULL. 333 glyphIDs is NULL.
334 @return The returned object has already been referenced. 334 @return The returned object has already been referenced.
335 */ 335 */
336 SkAdvancedTypefaceMetrics* getAdvancedTypefaceMetrics( 336 SkAdvancedTypefaceMetrics* getAdvancedTypefaceMetrics(
337 SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo, 337 SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo,
338 const uint32_t* glyphIDs = NULL, 338 const uint32_t* glyphIDs = NULL,
339 uint32_t glyphIDsCount = 0) const; 339 uint32_t glyphIDsCount = 0) const;
340 340
341 private: 341 private:
342 static void create_default_typeface(Style style); 342 static SkTypeface* CreateDefault(int style); // SkLazyPtr requires an int, not a Style.
343 static void DeleteDefault(SkTypeface*);
343 344
344 SkFontID fUniqueID; 345 SkFontID fUniqueID;
345 Style fStyle; 346 Style fStyle;
346 bool fIsFixedPitch; 347 bool fIsFixedPitch;
347 348
348 friend class SkPaint; 349 friend class SkPaint;
349 friend class SkGlyphCache; // GetDefaultTypeface 350 friend class SkGlyphCache; // GetDefaultTypeface
350 // just so deprecated fonthost can call protected methods 351 // just so deprecated fonthost can call protected methods
351 friend class SkFontHost; 352 friend class SkFontHost;
352 353
353 typedef SkWeakRefCnt INHERITED; 354 typedef SkWeakRefCnt INHERITED;
354 }; 355 };
355 356
356 #endif 357 #endif
OLDNEW
« no previous file with comments | « include/core/SkPathRef.h ('k') | include/ports/SkFontMgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698