From 90e293dae4990a86cb952663ccde8fae55112d7d Mon Sep 17 00:00:00 2001 From: joshualitt Date: Mon, 28 Dec 2015 07:14:52 -0800 Subject: Revert of Make draw* lines responsible for cache management (patchset #1 id:1 of https://codereview.chromium.org/1521613002/ ) Reason for revert: seeing crashes on android and linux Original issue's description: > Make draw* lines responsible for cache management > > TBR=bsalomon@google.com > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/66957946c0c418e71c0f36bb2904cc38c334eba4 TBR=bsalomon@google.com,jvanverth@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1552513003 --- src/gpu/text/GrTextUtils.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/gpu/text/GrTextUtils.cpp') diff --git a/src/gpu/text/GrTextUtils.cpp b/src/gpu/text/GrTextUtils.cpp index 9d6bb2c857..293ea4d891 100644 --- a/src/gpu/text/GrTextUtils.cpp +++ b/src/gpu/text/GrTextUtils.cpp @@ -23,7 +23,7 @@ void GrTextUtils::DrawBmpText(GrAtlasTextBlob* blob, int runIndex, GrBatchFontCache* fontCache, - const SkSurfaceProps& props, const SkPaint& skPaint, + SkGlyphCache* cache, const SkPaint& skPaint, GrColor color, const SkMatrix& viewMatrix, const char text[], size_t byteLength, @@ -38,7 +38,6 @@ void GrTextUtils::DrawBmpText(GrAtlasTextBlob* blob, int runIndex, GrBatchTextStrike* currStrike = nullptr; // Get GrFontScaler from cache - SkGlyphCache* cache = blob->setupCache(runIndex, props, skPaint, &viewMatrix, false); GrFontScaler* fontScaler = GrTextContext::GetGrFontScaler(cache); SkFindAndPlaceGlyph::ProcessText( @@ -53,13 +52,11 @@ void GrTextUtils::DrawBmpText(GrAtlasTextBlob* blob, int runIndex, color, fontScaler); } ); - - SkGlyphCache::AttachCache(cache); } void GrTextUtils::DrawBmpPosText(GrAtlasTextBlob* blob, int runIndex, GrBatchFontCache* fontCache, - const SkSurfaceProps& props, const SkPaint& skPaint, + SkGlyphCache* cache, const SkPaint& skPaint, GrColor color, const SkMatrix& viewMatrix, const char text[], size_t byteLength, @@ -76,7 +73,6 @@ void GrTextUtils::DrawBmpPosText(GrAtlasTextBlob* blob, int runIndex, GrBatchTextStrike* currStrike = nullptr; // Get GrFontScaler from cache - SkGlyphCache* cache = blob->setupCache(runIndex, props, skPaint, &viewMatrix, false); GrFontScaler* fontScaler = GrTextContext::GetGrFontScaler(cache); SkFindAndPlaceGlyph::ProcessPosText( @@ -91,8 +87,6 @@ void GrTextUtils::DrawBmpPosText(GrAtlasTextBlob* blob, int runIndex, color, fontScaler); } ); - - SkGlyphCache::AttachCache(cache); } void GrTextUtils::BmpAppendGlyph(GrAtlasTextBlob* blob, int runIndex, -- cgit v1.2.3