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

Unified Diff: src/core/SkScalerContext.cpp

Issue 370463002: Remove vertical/horizontal metrics selection. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix Mac. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkScalerContext.h ('k') | src/fonts/SkGScalerContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScalerContext.cpp
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index 3e20bf69ed6947d8ada8ae982623c2c511f9fcd4..b18dc1a79c3112d7d1a532771548af9b66f60150 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -799,16 +799,7 @@ void SkScalerContext::getPath(const SkGlyph& glyph, SkPath* path) {
}
void SkScalerContext::getFontMetrics(SkPaint::FontMetrics* fm) {
- // All of this complexity should go away when we change generateFontMetrics
- // to just take one parameter (since it knows if it is vertical or not)
- SkPaint::FontMetrics* mx = NULL;
- SkPaint::FontMetrics* my = NULL;
- if (fRec.fFlags & kVertical_Flag) {
- mx = fm;
- } else {
- my = fm;
- }
- this->generateFontMetrics(mx, my);
+ this->generateFontMetrics(fm);
}
SkUnichar SkScalerContext::generateGlyphToChar(uint16_t glyph) {
@@ -964,13 +955,9 @@ protected:
}
virtual void generateImage(const SkGlyph& glyph) SK_OVERRIDE {}
virtual void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE {}
- virtual void generateFontMetrics(SkPaint::FontMetrics* mx,
- SkPaint::FontMetrics* my) SK_OVERRIDE {
- if (mx) {
- sk_bzero(mx, sizeof(*mx));
- }
- if (my) {
- sk_bzero(my, sizeof(*my));
+ virtual void generateFontMetrics(SkPaint::FontMetrics* metrics) SK_OVERRIDE {
+ if (metrics) {
+ sk_bzero(metrics, sizeof(*metrics));
}
}
};
« no previous file with comments | « src/core/SkScalerContext.h ('k') | src/fonts/SkGScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698