From f3690dd416a1ff63868dd886c0c08b7698c5dd1f Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Tue, 20 Feb 2018 15:18:59 -0500 Subject: Change signature of GrAtlasGlyphCache::getProxies Split out of https://skia-review.googlesource.com/c/skia/+/108001 (Fission GrAtlasGlyphCache in two) TBR=bsalomon@google.com Change-Id: I573730fdeddf178915eb5f5b8cf59a3ab29e0654 Reviewed-on: https://skia-review.googlesource.com/108441 Reviewed-by: Brian Salomon Reviewed-by: Jim Van Verth Commit-Queue: Robert Phillips --- src/atlastext/SkInternalAtlasTextContext.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/atlastext') diff --git a/src/atlastext/SkInternalAtlasTextContext.cpp b/src/atlastext/SkInternalAtlasTextContext.cpp index a2855314e6..fcb4130665 100644 --- a/src/atlastext/SkInternalAtlasTextContext.cpp +++ b/src/atlastext/SkInternalAtlasTextContext.cpp @@ -39,7 +39,9 @@ SkInternalAtlasTextContext::~SkInternalAtlasTextContext() { if (fDistanceFieldAtlas.fProxy) { #ifdef SK_DEBUG auto atlasGlyphCache = fGrContext->contextPriv().getAtlasGlyphCache(); - SkASSERT(1 == atlasGlyphCache->getAtlasPageCount(kA8_GrMaskFormat)); + unsigned int numProxies; + atlasGlyphCache->getProxies(kA8_GrMaskFormat, &numProxies); + SkASSERT(1 == numProxies); #endif fRenderer->deleteTexture(fDistanceFieldAtlas.fTextureHandle); } @@ -86,8 +88,10 @@ void SkInternalAtlasTextContext::recordDraw(const void* srcVertexData, int glyph void SkInternalAtlasTextContext::flush() { auto* atlasGlyphCache = fGrContext->contextPriv().getAtlasGlyphCache(); if (!fDistanceFieldAtlas.fProxy) { - SkASSERT(1 == atlasGlyphCache->getAtlasPageCount(kA8_GrMaskFormat)); - fDistanceFieldAtlas.fProxy = atlasGlyphCache->getProxies(kA8_GrMaskFormat)->get(); + unsigned int numProxies; + fDistanceFieldAtlas.fProxy = atlasGlyphCache->getProxies(kA8_GrMaskFormat, + &numProxies)->get(); + SkASSERT(1 == numProxies); fDistanceFieldAtlas.fTextureHandle = fRenderer->createTexture(SkAtlasTextRenderer::AtlasFormat::kA8, fDistanceFieldAtlas.fProxy->width(), -- cgit v1.2.3