diff options
author | bungeman <bungeman@google.com> | 2016-07-13 05:16:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-13 05:16:58 -0700 |
commit | e3aea10428d1597838fd563c92340beaf969a9b4 (patch) | |
tree | c9afef7b181fbfdb9897c72b4fe61cd44f34d692 /src/ports/SkFontMgr_fontconfig.cpp | |
parent | ba3880fa6d47d467bfcf4db80c553f051336e406 (diff) |
Remove user specified typeface id.
Now that there may be multiple font managers in a process the typeface
ids must be unique across all typefaces, not just unique within a font
manager. If two typefaces have the same id there will be issues in the
glyph cache. All existing font managers were already doing this by
calling SkFontCache::NewFontID, so centralize this in SkTypeface.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147733002
Review-Url: https://codereview.chromium.org/2147733002
Diffstat (limited to 'src/ports/SkFontMgr_fontconfig.cpp')
-rw-r--r-- | src/ports/SkFontMgr_fontconfig.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp index 610a3001fb..0876fb6325 100644 --- a/src/ports/SkFontMgr_fontconfig.cpp +++ b/src/ports/SkFontMgr_fontconfig.cpp @@ -405,7 +405,7 @@ class SkTypeface_stream : public SkTypeface_FreeType { public: /** @param data takes ownership of the font data.*/ SkTypeface_stream(SkFontData* data, const SkFontStyle& style, bool fixedWidth) - : INHERITED(style, SkTypefaceCache::NewFontID(), fixedWidth) + : INHERITED(style, fixedWidth) , fData(data) { }; @@ -493,7 +493,6 @@ private: /** @param pattern takes ownership of the reference. */ SkTypeface_fontconfig(FcPattern* pattern) : INHERITED(skfontstyle_from_fcpattern(pattern), - SkTypefaceCache::NewFontID(), FC_PROPORTIONAL != get_int(pattern, FC_SPACING, FC_PROPORTIONAL)) , fPattern(pattern) { }; |