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

Unified Diff: src/core/SkScalerContext.cpp

Issue 14940018: we only need one fontmetrics, since the paint (and fontcache) now know explicitly (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScalerContext.cpp
===================================================================
--- src/core/SkScalerContext.cpp (revision 9053)
+++ src/core/SkScalerContext.cpp (working copy)
@@ -663,8 +663,16 @@
this->internalGetPath(glyph, NULL, path, NULL);
}
-void SkScalerContext::getFontMetrics(SkPaint::FontMetrics* mx,
- SkPaint::FontMetrics* my) {
+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);
}
« no previous file with comments | « src/core/SkScalerContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698