diff options
author | Robert Phillips <robertphillips@google.com> | 2018-02-20 15:18:59 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-20 21:16:53 +0000 |
commit | f3690dd416a1ff63868dd886c0c08b7698c5dd1f (patch) | |
tree | f7b2dfbc731e769a4df698c4a9ddd5cbd7d8fba7 /src/atlastext | |
parent | a8c55fa4fec87bf6fd601b16c2684168abddbab8 (diff) |
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 <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/atlastext')
-rw-r--r-- | src/atlastext/SkInternalAtlasTextContext.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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(), |