aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrAtlasTextOp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/ops/GrAtlasTextOp.cpp')
-rw-r--r--src/gpu/ops/GrAtlasTextOp.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index 952b3ba5ad..46f38099ec 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -222,8 +222,6 @@ static void clip_quads(const SkIRect& clipRect, char* currVertex, const char* bl
}
void GrAtlasTextOp::onPrepareDraws(Target* target) {
- auto resourceProvider = target->resourceProvider();
-
// if we have RGB, then we won't have any SkShaders so no need to use a localmatrix.
// TODO actually only invert if we don't have RGBA
SkMatrix localMatrix;
@@ -236,7 +234,7 @@ void GrAtlasTextOp::onPrepareDraws(Target* target) {
unsigned int atlasPageCount;
const sk_sp<GrTextureProxy>* proxies = fFontCache->getProxies(maskFormat, &atlasPageCount);
- if (!proxies[0]) {
+ if (!atlasPageCount || !proxies[0]) {
SkDebugf("Could not allocate backing texture for atlas\n");
return;
}
@@ -278,8 +276,8 @@ void GrAtlasTextOp::onPrepareDraws(Target* target) {
const Geometry& args = fGeoData[i];
Blob* blob = args.fBlob;
GrAtlasTextBlob::VertexRegenerator regenerator(
- resourceProvider, blob, args.fRun, args.fSubRun, args.fViewMatrix, args.fX, args.fY,
- args.fColor, target->deferredUploadTarget(), fFontCache, &glyphCache);
+ blob, args.fRun, args.fSubRun, args.fViewMatrix, args.fX, args.fY, args.fColor,
+ target->deferredUploadTarget(), fFontCache, &glyphCache);
GrAtlasTextBlob::VertexRegenerator::Result result;
do {
result = regenerator.regenerate();