diff options
author | 2018-03-29 15:02:28 -0400 | |
---|---|---|
committer | 2018-04-02 20:54:52 +0000 | |
commit | 2de1eda3d2a6d27b0a71ca3ca0f125111cccc708 (patch) | |
tree | c8d2725adedd4c6a747cf929986021de0a8b820f /tools/fonts/SkTestTypeface.h | |
parent | 97be6f99f6af08630ab76da6130f825d02569799 (diff) |
SkScalerContext::getMetrics to not request metrics it will ignore.
Before this change SkScalerContext::getMetrics always calls
generateMetrics to force the subclass to create full metrics. However,
if the SkScalerContext is going to draw from outlines then there is no
reason to do so since it is immediately going to overwrite those metrics
by computing its own from the path. This also puts off other decisions
being made based on the glyph metrics until after the metrics are fully
computed.
The logic in SkScalerContext::getImage is updated to be similar to the
logic in the new SkScalerContext::getMetrics.
Change-Id: I1798c9244277fab85595fb39fc3a85ef7eb33620
Reviewed-on: https://skia-review.googlesource.com/117085
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'tools/fonts/SkTestTypeface.h')
-rw-r--r-- | tools/fonts/SkTestTypeface.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/fonts/SkTestTypeface.h b/tools/fonts/SkTestTypeface.h index b520fb6e5c..d3365f972a 100644 --- a/tools/fonts/SkTestTypeface.h +++ b/tools/fonts/SkTestTypeface.h @@ -66,7 +66,6 @@ public: SkTestTypeface(sk_sp<SkTestFont>, const SkFontStyle& style); void getAdvance(SkGlyph* glyph); void getFontMetrics(SkPaint::FontMetrics* metrics); - void getMetrics(SkGlyph* glyph); void getPath(SkGlyphID glyph, SkPath* path); protected: SkScalerContext* onCreateScalerContext(const SkScalerContextEffects&, |