aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/atlastext
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-22 10:48:15 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-22 16:53:17 +0000
commitf35fd8d2f26ef7217368d1a09d231ee68ed0cb2f (patch)
tree8c97c1dee833ffed509f0ff106ac75f3f8bf6070 /src/atlastext
parent3ba3fa72ae2fd4102cff22b947d124f72ce0f880 (diff)
Move more internal methods from GrContext to GrContextPriv (take 3)
Change-Id: Ied630e61cf95780bf85032867e6ce663e1ef9c2f Reviewed-on: https://skia-review.googlesource.com/98000 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/atlastext')
-rw-r--r--src/atlastext/SkAtlasTextTarget.cpp2
-rw-r--r--src/atlastext/SkInternalAtlasTextContext.cpp12
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();