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

Unified Diff: src/ports/SkFontMgr_android.cpp

Issue 447873003: Remove SkPaintOptionsAndroid (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typo 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 side-by-side diff with in-line comments
Download patch
Index: src/ports/SkFontMgr_android.cpp
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp
index b03185de63687beddcedf805703c705f679c2e6c..e966c84f1ff4054cce84cc66ab2caf0b7a3844ef 100644
--- a/src/ports/SkFontMgr_android.cpp
+++ b/src/ports/SkFontMgr_android.cpp
@@ -67,7 +67,7 @@ public:
bool isFixedPitch,
const SkString familyName,
const SkLanguage& lang,
- uint32_t variantStyle)
+ FontVariant variantStyle)
: INHERITED(index, style, isFixedPitch, familyName)
, fPathName(pathName)
, fLang(lang)
@@ -88,7 +88,7 @@ public:
const SkString fPathName;
const SkLanguage fLang;
- const uint32_t fVariantStyle;
+ const FontVariant fVariantStyle;
typedef SkTypeface_Android INHERITED;
};
@@ -163,11 +163,10 @@ public:
continue;
}
- const SkLanguage& lang = fontFile.fPaintOptions.getLanguage();
- uint32_t variant = fontFile.fPaintOptions.getFontVariant();
- if (SkPaintOptionsAndroid::kDefault_Variant == variant) {
- variant = SkPaintOptionsAndroid::kCompact_Variant |
- SkPaintOptionsAndroid::kElegant_Variant;
+ const SkLanguage& lang = family.fLanguage;
+ uint32_t variant = family.fVariant;
+ if (kDefault_FontVariant == variant) {
+ variant = kCompact_FontVariant | kElegant_FontVariant;
}
// The first specified family name overrides the family name found in the font.
@@ -353,7 +352,7 @@ protected:
// TODO: add 'is_elegant' and 'is_compact' bits to 'style' request.
// For compatibility, try 'elegant' fonts first in fallback.
- uint32_t variantMask = SkPaintOptionsAndroid::kElegant_Variant;
+ uint32_t variantMask = kElegant_FontVariant;
// The first time match anything in the mask, second time anything not in the mask.
for (bool maskMatches = true; maskMatches != false; maskMatches = false) {

Powered by Google App Engine
This is Rietveld 408576698