diff options
Diffstat (limited to 'src/atlastext')
-rw-r--r-- | src/atlastext/SkAtlasTextTarget.cpp | 2 | ||||
-rw-r--r-- | src/atlastext/SkInternalAtlasTextContext.cpp | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/atlastext/SkAtlasTextTarget.cpp b/src/atlastext/SkAtlasTextTarget.cpp index 0a318e0c8e..d80c7a45d7 100644 --- a/src/atlastext/SkAtlasTextTarget.cpp +++ b/src/atlastext/SkAtlasTextTarget.cpp @@ -183,7 +183,7 @@ void GrAtlasTextOp::executeForTextTarget(SkAtlasTextTarget* target) { FlushInfo flushInfo; SkAutoGlyphCache glyphCache; auto& context = target->context()->internal(); - auto* atlasGlyphCache = context.grContext()->getAtlasGlyphCache(); + auto* atlasGlyphCache = context.grContext()->contextPriv().getAtlasGlyphCache(); for (int i = 0; i < fGeoCount; ++i) { GrAtlasTextBlob::VertexRegenerator regenerator( fGeoData[i].fBlob, fGeoData[i].fRun, fGeoData[i].fSubRun, fGeoData[i].fViewMatrix, diff --git a/src/atlastext/SkInternalAtlasTextContext.cpp b/src/atlastext/SkInternalAtlasTextContext.cpp index fba0cbcdbe..58b8788943 100644 --- a/src/atlastext/SkInternalAtlasTextContext.cpp +++ b/src/atlastext/SkInternalAtlasTextContext.cpp @@ -7,6 +7,7 @@ #include "SkInternalAtlasTextContext.h" #include "GrContext.h" +#include "GrContextPriv.h" #include "SkAtlasTextContext.h" #include "SkAtlasTextRenderer.h" #include "text/GrAtlasGlyphCache.h" @@ -36,17 +37,20 @@ SkInternalAtlasTextContext::SkInternalAtlasTextContext(sk_sp<SkAtlasTextRenderer SkInternalAtlasTextContext::~SkInternalAtlasTextContext() { if (fDistanceFieldAtlas.fProxy) { - SkASSERT(1 == fGrContext->getAtlasGlyphCache()->getAtlasPageCount(kA8_GrMaskFormat)); +#ifdef SK_DEBUG + auto atlasGlyphCache = fGrContext->contextPriv().getAtlasGlyphCache(); + SkASSERT(1 == atlasGlyphCache->getAtlasPageCount(kA8_GrMaskFormat)); +#endif fRenderer->deleteTexture(fDistanceFieldAtlas.fTextureHandle); } } GrAtlasGlyphCache* SkInternalAtlasTextContext::atlasGlyphCache() { - return fGrContext->getAtlasGlyphCache(); + return fGrContext->contextPriv().getAtlasGlyphCache(); } GrTextBlobCache* SkInternalAtlasTextContext::textBlobCache() { - return fGrContext->getTextBlobCache(); + return fGrContext->contextPriv().getTextBlobCache(); } GrDeferredUploadToken SkInternalAtlasTextContext::addInlineUpload( @@ -80,7 +84,7 @@ void SkInternalAtlasTextContext::recordDraw(const void* srcVertexData, int glyph } void SkInternalAtlasTextContext::flush() { - auto* atlasGlyphCache = fGrContext->getAtlasGlyphCache(); + auto* atlasGlyphCache = fGrContext->contextPriv().getAtlasGlyphCache(); if (!fDistanceFieldAtlas.fProxy) { SkASSERT(1 == atlasGlyphCache->getAtlasPageCount(kA8_GrMaskFormat)); fDistanceFieldAtlas.fProxy = atlasGlyphCache->getProxies(kA8_GrMaskFormat)->get(); |