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

Side by Side Diff: src/ports/SkFontHost_mac.cpp

Issue 2147733002: Remove user specified typeface id. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove one last straggler. Created 4 years, 5 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 | « src/ports/SkFontHost_FreeType_common.h ('k') | src/ports/SkFontHost_win.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkTypes.h" // Keep this before any #ifdef ... 8 #include "SkTypes.h" // Keep this before any #ifdef ...
9 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) 9 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
10 10
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 static const uint32_t SkCTFontColorGlyphsTrait = kCTFontColorGlyphsTrait; 429 static const uint32_t SkCTFontColorGlyphsTrait = kCTFontColorGlyphsTrait;
430 #else 430 #else
431 static const uint32_t SkCTFontColorGlyphsTrait = (1 << 13); 431 static const uint32_t SkCTFontColorGlyphsTrait = (1 << 13);
432 #endif 432 #endif
433 433
434 class SkTypeface_Mac : public SkTypeface { 434 class SkTypeface_Mac : public SkTypeface {
435 public: 435 public:
436 SkTypeface_Mac(CTFontRef fontRef, CFTypeRef resourceRef, 436 SkTypeface_Mac(CTFontRef fontRef, CFTypeRef resourceRef,
437 const SkFontStyle& fs, bool isFixedPitch, 437 const SkFontStyle& fs, bool isFixedPitch,
438 bool isLocalStream) 438 bool isLocalStream)
439 : SkTypeface(fs, SkTypefaceCache::NewFontID(), isFixedPitch) 439 : SkTypeface(fs, isFixedPitch)
440 , fFontRef(fontRef) // caller has already called CFRetain for us 440 , fFontRef(fontRef) // caller has already called CFRetain for us
441 , fOriginatingCFTypeRef(resourceRef) // caller has already called CFReta in for us 441 , fOriginatingCFTypeRef(resourceRef) // caller has already called CFReta in for us
442 , fHasColorGlyphs(SkToBool(CTFontGetSymbolicTraits(fFontRef) & SkCTFontC olorGlyphsTrait)) 442 , fHasColorGlyphs(SkToBool(CTFontGetSymbolicTraits(fFontRef) & SkCTFontC olorGlyphsTrait))
443 , fIsLocalStream(isLocalStream) 443 , fIsLocalStream(isLocalStream)
444 { 444 {
445 SkASSERT(fontRef); 445 SkASSERT(fontRef);
446 } 446 }
447 447
448 AutoCFRelease<CTFontRef> fFontRef; 448 AutoCFRelease<CTFontRef> fFontRef;
449 AutoCFRelease<CFTypeRef> fOriginatingCFTypeRef; 449 AutoCFRelease<CFTypeRef> fOriginatingCFTypeRef;
(...skipping 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2577 2577
2578 return SkSafeRef(GetDefaultFace()); 2578 return SkSafeRef(GetDefaultFace());
2579 } 2579 }
2580 }; 2580 };
2581 2581
2582 /////////////////////////////////////////////////////////////////////////////// 2582 ///////////////////////////////////////////////////////////////////////////////
2583 2583
2584 SkFontMgr* SkFontMgr::Factory() { return new SkFontMgr_Mac; } 2584 SkFontMgr* SkFontMgr::Factory() { return new SkFontMgr_Mac; }
2585 2585
2586 #endif//defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) 2586 #endif//defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_FreeType_common.h ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698