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/SkFontConfigInterface_android.cpp

Issue 145233002: Upstream Android Changes from K release (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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 | « no previous file | no next file » | 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 2013 The Android Open Source Project 3 * Copyright 2013 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 #include "SkFontConfigInterface.h" 9 #include "SkFontConfigInterface.h"
10 #include "SkTypeface_android.h" 10 #include "SkTypeface_android.h"
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 const SkTypeface* origTypeface = SkTypefaceCache::FindByID(origFontID); 626 const SkTypeface* origTypeface = SkTypefaceCache::FindByID(origFontID);
627 if (NULL != origTypeface) { 627 if (NULL != origTypeface) {
628 origStyle = origTypeface->style(); 628 origStyle = origTypeface->style();
629 } 629 }
630 630
631 // we must convert currTypeface into a FontRecID 631 // we must convert currTypeface into a FontRecID
632 FontRecID currFontRecID = INVALID_FONT_REC_ID; 632 FontRecID currFontRecID = INVALID_FONT_REC_ID;
633 const SkTypeface* currTypeface = SkTypefaceCache::FindByID(currFontID); 633 const SkTypeface* currTypeface = SkTypefaceCache::FindByID(currFontID);
634 // non-system fonts are not in the font cache so if we are asked to fallback 634 // non-system fonts are not in the font cache so if we are asked to fallback
635 // for a non-system font we will start at the front of the chain. 635 // for a non-system font we will start at the front of the chain.
636 if (NULL != currTypeface && currFontID != origFontID) { 636 if (NULL != currTypeface) {
637 currFontRecID = ((FontConfigTypeface*)currTypeface)->getIdentity().fID; 637 currFontRecID = ((FontConfigTypeface*)currTypeface)->getIdentity().fID;
638 SkASSERT(INVALID_FONT_REC_ID != currFontRecID); 638 SkASSERT(INVALID_FONT_REC_ID != currFontRecID);
639 } 639 }
640 640
641 FamilyRecID currFamilyRecID = INVALID_FAMILY_REC_ID; 641 FamilyRecID currFamilyRecID = INVALID_FAMILY_REC_ID;
642 if (INVALID_FONT_REC_ID != currFontRecID) { 642 if (INVALID_FONT_REC_ID != currFontRecID) {
643 currFamilyRecID = fFonts[currFontRecID].fFamilyRecID; 643 currFamilyRecID = fFonts[currFontRecID].fFamilyRecID;
644 } 644 }
645 645
646 // lookup the index next font in the chain 646 // lookup the index next font in the chain
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 return SkSafeRef(retTypeface); 906 return SkSafeRef(retTypeface);
907 } 907 }
908 908
909 #endif 909 #endif
910 910
911 /////////////////////////////////////////////////////////////////////////////// 911 ///////////////////////////////////////////////////////////////////////////////
912 912
913 SkFontMgr* SkFontMgr::Factory() { 913 SkFontMgr* SkFontMgr::Factory() {
914 return NULL; 914 return NULL;
915 } 915 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698