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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkScalerContext.h ('k') | 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 2006 The Android Open Source Project 3 * Copyright 2006 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 9
10 #include "SkScalerContext.h" 10 #include "SkScalerContext.h"
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 applyLUTToA8Mask(srcM, fPreBlendForFilter.fG); 656 applyLUTToA8Mask(srcM, fPreBlendForFilter.fG);
657 } 657 }
658 } 658 }
659 } 659 }
660 } 660 }
661 661
662 void SkScalerContext::getPath(const SkGlyph& glyph, SkPath* path) { 662 void SkScalerContext::getPath(const SkGlyph& glyph, SkPath* path) {
663 this->internalGetPath(glyph, NULL, path, NULL); 663 this->internalGetPath(glyph, NULL, path, NULL);
664 } 664 }
665 665
666 void SkScalerContext::getFontMetrics(SkPaint::FontMetrics* mx, 666 void SkScalerContext::getFontMetrics(SkPaint::FontMetrics* fm) {
667 SkPaint::FontMetrics* my) { 667 // All of this complexity should go away when we change generateFontMetrics
668 // to just take one parameter (since it knows if it is vertical or not)
669 SkPaint::FontMetrics* mx = NULL;
670 SkPaint::FontMetrics* my = NULL;
671 if (fRec.fFlags & kVertical_Flag) {
672 mx = fm;
673 } else {
674 my = fm;
675 }
668 this->generateFontMetrics(mx, my); 676 this->generateFontMetrics(mx, my);
669 } 677 }
670 678
671 SkUnichar SkScalerContext::generateGlyphToChar(uint16_t glyph) { 679 SkUnichar SkScalerContext::generateGlyphToChar(uint16_t glyph) {
672 return 0; 680 return 0;
673 } 681 }
674 682
675 /////////////////////////////////////////////////////////////////////////////// 683 ///////////////////////////////////////////////////////////////////////////////
676 684
677 void SkScalerContext::internalGetPath(const SkGlyph& glyph, SkPath* fillPath, 685 void SkScalerContext::internalGetPath(const SkGlyph& glyph, SkPath* fillPath,
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 SkScalerContext* c = NULL; //SkCreateColorScalerContext(desc); 849 SkScalerContext* c = NULL; //SkCreateColorScalerContext(desc);
842 if (NULL == c) { 850 if (NULL == c) {
843 c = this->onCreateScalerContext(desc); 851 c = this->onCreateScalerContext(desc);
844 } 852 }
845 if (NULL == c) { 853 if (NULL == c) {
846 c = SkNEW_ARGS(SkScalerContext_Empty, 854 c = SkNEW_ARGS(SkScalerContext_Empty,
847 (const_cast<SkTypeface*>(this), desc)); 855 (const_cast<SkTypeface*>(this), desc));
848 } 856 }
849 return c; 857 return c;
850 } 858 }
OLDNEW
« 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