diff options
author | Ben Wagner <bungeman@google.com> | 2016-11-11 14:31:06 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-11 21:59:54 +0000 |
commit | 6e9ac12495f3b64b6ea8860bb9f99c43cd33aa08 (patch) | |
tree | 757e4c3fe61339400866c54d51d56eb38452ccfa /src/ports/SkScalerContext_win_dw.cpp | |
parent | bf7b620b1e44985b164a8bd68031a7613fe0bb9b (diff) |
Clean up glyph id handling.
Extract SkPackedID and its strongly typed subclasses SkPackedGlyphID and
SkPackedUnicharID out of SkGlyph. This simplifies the code handling
these types, as well as making it clearer that we wouuld eventually like
to get away from this scheme.
Changes SkScalerContext::getPath to take SkPackedGlyphID.
Changes SkScalerContext::generatePath to take SkGlyphID.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4722
Change-Id: I365c0c618b7ae0d348272155fac7761a69faa920
Reviewed-on: https://skia-review.googlesource.com/4722
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'src/ports/SkScalerContext_win_dw.cpp')
-rw-r--r-- | src/ports/SkScalerContext_win_dw.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ports/SkScalerContext_win_dw.cpp b/src/ports/SkScalerContext_win_dw.cpp index c83542f47a..10afb5a0ca 100644 --- a/src/ports/SkScalerContext_win_dw.cpp +++ b/src/ports/SkScalerContext_win_dw.cpp @@ -887,7 +887,7 @@ void SkScalerContext_DW::generateImage(const SkGlyph& glyph) { } } -void SkScalerContext_DW::generatePath(const SkGlyph& glyph, SkPath* path) { +void SkScalerContext_DW::generatePath(SkGlyphID glyph, SkPath* path) { SkASSERT(path); path->reset(); @@ -895,7 +895,7 @@ void SkScalerContext_DW::generatePath(const SkGlyph& glyph, SkPath* path) { SkTScopedComPtr<IDWriteGeometrySink> geometryToPath; HRVM(SkDWriteGeometrySink::Create(path, &geometryToPath), "Could not create geometry to path converter."); - uint16_t glyphId = glyph.getGlyphID(); + UINT16 glyphId = SkTo<UINT16>(glyph); { SkAutoExclusive l(DWriteFactoryMutex); //TODO: convert to<->from DIUs? This would make a difference if hinting. |