aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrStencilAndCoverTextContext.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-10-27 11:30:49 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-30 15:07:59 +0000
commitf18b1d88aa98f81d2c115a59d887265fea63f876 (patch)
tree8f7052aba9358b6c28d8e22db2b1be326729ec36 /src/gpu/text/GrStencilAndCoverTextContext.cpp
parent228da62fa791e1532826f8e17b945c3d8cbc1300 (diff)
Add GrTextUtils::Target
This abstracts the portion of GrRenderTargetContext that is used by GrAtlasTextContext and opens the door to creating alternative consumers of GrAtlasTextOps. Change-Id: Iaa48f93f4d7d49e231744d44427e9396c5d36fe7 Reviewed-on: https://skia-review.googlesource.com/64760 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/text/GrStencilAndCoverTextContext.cpp')
-rw-r--r--src/gpu/text/GrStencilAndCoverTextContext.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index 4b8dd5188e..b072702105 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -83,8 +83,8 @@ void GrStencilAndCoverTextContext::drawText(GrContext* context, GrRenderTargetCo
}
return;
}
- fFallbackTextContext->drawText(context, rtc, clip, skPaint, viewMatrix, props, text,
- byteLength, x, y, clipBounds);
+ fFallbackTextContext->drawText(context, rtc->textTarget(), clip, skPaint, viewMatrix, props,
+ text, byteLength, x, y, clipBounds);
}
void GrStencilAndCoverTextContext::drawPosText(GrContext* context, GrRenderTargetContext* rtc,
@@ -105,8 +105,9 @@ void GrStencilAndCoverTextContext::drawPosText(GrContext* context, GrRenderTarge
}
return;
}
- fFallbackTextContext->drawPosText(context, rtc, clip, skPaint, viewMatrix, props, text,
- byteLength, pos, scalarsPerPosition, offset, clipBounds);
+ fFallbackTextContext->drawPosText(context, rtc->textTarget(), clip, skPaint, viewMatrix, props,
+ text, byteLength, pos, scalarsPerPosition, offset,
+ clipBounds);
}
void GrStencilAndCoverTextContext::uncachedDrawTextBlob(GrContext* context,
@@ -161,8 +162,8 @@ void GrStencilAndCoverTextContext::drawTextBlob(GrContext* context, GrRenderTarg
}
if (!this->internalCanDraw(skPaint)) {
- fFallbackTextContext->drawTextBlob(context, rtc, clip, skPaint, viewMatrix, props, skBlob,
- x, y, drawFilter, clipBounds);
+ fFallbackTextContext->drawTextBlob(context, rtc->textTarget(), clip, skPaint, viewMatrix,
+ props, skBlob, x, y, drawFilter, clipBounds);
return;
}
@@ -598,9 +599,9 @@ void GrStencilAndCoverTextContext::TextRun::draw(GrContext* ctx,
fallbackSkPaint.setStrokeWidth(fStyle.strokeRec().getWidth() * fTextRatio);
}
- fallbackTextContext->drawTextBlob(ctx, renderTargetContext, clip, fallbackSkPaint,
- viewMatrix, props, fFallbackTextBlob.get(), x, y, nullptr,
- clipBounds);
+ fallbackTextContext->drawTextBlob(ctx, renderTargetContext->textTarget(), clip,
+ fallbackSkPaint, viewMatrix, props,
+ fFallbackTextBlob.get(), x, y, nullptr, clipBounds);
}
}