diff options
author | bungeman <bungeman@google.com> | 2016-04-14 08:04:45 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-14 08:04:45 -0700 |
commit | 82a455f0e9a7a50a399a58be906b48c24aeec056 (patch) | |
tree | 03baf99e00b1c3f6131ba4e3e76c67afd1f75cea /src/ports/SkFontMgr_win_dw.cpp | |
parent | b2a4dc6a350abe3b18ecac719e499600f739a6e2 (diff) |
Remove requestedStyle from SkTypefaceCache.
The typeface cache contains typefaces which can be compared against to
determine if an already known typeface will work instead of creating a
new typeface id. This is primarily for sharing scaler contexts. How that
typeface was requested is not relevant to this comparison, so don't cache
it. Request caching must be handled separately.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1879423002
Review URL: https://codereview.chromium.org/1879423002
Diffstat (limited to 'src/ports/SkFontMgr_win_dw.cpp')
-rw-r--r-- | src/ports/SkFontMgr_win_dw.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ports/SkFontMgr_win_dw.cpp b/src/ports/SkFontMgr_win_dw.cpp index a03fcf8d42..e178598a55 100644 --- a/src/ports/SkFontMgr_win_dw.cpp +++ b/src/ports/SkFontMgr_win_dw.cpp @@ -353,7 +353,7 @@ struct ProtoDWriteTypeface { IDWriteFontFamily* fDWriteFontFamily; }; -static bool FindByDWriteFont(SkTypeface* cached, const SkFontStyle&, void* ctx) { +static bool FindByDWriteFont(SkTypeface* cached, void* ctx) { DWriteFontTypeface* cshFace = reinterpret_cast<DWriteFontTypeface*>(cached); ProtoDWriteTypeface* ctxFace = reinterpret_cast<ProtoDWriteTypeface*>(ctx); bool same; @@ -457,7 +457,7 @@ SkTypeface* SkFontMgr_DirectWrite::createTypefaceFromDWriteFont( if (nullptr == face) { face = DWriteFontTypeface::Create(fFactory.get(), fontFace, font, fontFamily); if (face) { - fTFCache.add(face, get_style(font)); + fTFCache.add(face); } } return face; |