From e3aea10428d1597838fd563c92340beaf969a9b4 Mon Sep 17 00:00:00 2001 From: bungeman Date: Wed, 13 Jul 2016 05:16:58 -0700 Subject: 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 --- src/fonts/SkGScalerContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fonts/SkGScalerContext.cpp') diff --git a/src/fonts/SkGScalerContext.cpp b/src/fonts/SkGScalerContext.cpp index 1d34536cbe..5a439b7eb5 100644 --- a/src/fonts/SkGScalerContext.cpp +++ b/src/fonts/SkGScalerContext.cpp @@ -152,7 +152,7 @@ void SkGScalerContext::generateFontMetrics(SkPaint::FontMetrics* metrics) { #include "SkTypefaceCache.h" SkGTypeface::SkGTypeface(sk_sp proxy, const SkPaint& paint) - : SkTypeface(proxy->fontStyle(), SkTypefaceCache::NewFontID(), false) + : SkTypeface(proxy->fontStyle(), false) , fProxy(std::move(proxy)) , fPaint(paint) {} -- cgit v1.2.3