aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/atlastext
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-19 13:49:24 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-19 19:26:46 +0000
commitc22e50bd317fe3658445c04e18a6e319d746c510 (patch)
tree983ba66461fafba8c6f603391ef56e0975500d04 /src/atlastext
parent4d12051d351a0a210d62b2d7fcf2de33c712a468 (diff)
Move more internal methods from GrContext to GrContextPriv (take 2)
Change-Id: I47108910517d61edeb52f82793d384fdb5605d45 Reviewed-on: https://skia-review.googlesource.com/97241 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@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();