aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-10-26 16:17:13 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-27 15:23:42 +0000
commit495f423bee715a2928c2e59fba60439e211c6a1e (patch)
tree55a93b63cbdb44ec62e91b1bc2becdca8b74eb26
parent96ebfc30b928aab67a435a169fc4718b9efc8567 (diff)
Remove fallback to path drawing from stencil and cover text context.
The regular text context already does this fallback. Just call it. Change-Id: If23c375096b32d988f119e5c381f74f622968a6e Reviewed-on: https://skia-review.googlesource.com/64441 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
-rw-r--r--src/gpu/text/GrStencilAndCoverTextContext.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index 6d09c11b24..4b8dd5188e 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -82,16 +82,9 @@ void GrStencilAndCoverTextContext::drawText(GrContext* context, GrRenderTargetCo
skPaint);
}
return;
- } else if (fFallbackTextContext->canDraw(skPaint, viewMatrix, props,
- *context->caps()->shaderCaps())) {
- fFallbackTextContext->drawText(context, rtc, clip, skPaint, viewMatrix, props, text,
- byteLength, x, y, clipBounds);
- return;
}
-
- // fall back to drawing as a path
- GrTextUtils::DrawTextAsPath(context, rtc, clip, skPaint, viewMatrix, text, byteLength, x, y,
- clipBounds);
+ fFallbackTextContext->drawText(context, rtc, clip, skPaint, viewMatrix, props, text,
+ byteLength, x, y, clipBounds);
}
void GrStencilAndCoverTextContext::drawPosText(GrContext* context, GrRenderTargetContext* rtc,
@@ -111,16 +104,9 @@ void GrStencilAndCoverTextContext::drawPosText(GrContext* context, GrRenderTarge
skPaint);
}
return;
- } else if (fFallbackTextContext->canDraw(skPaint, viewMatrix, props,
- *context->caps()->shaderCaps())) {
- fFallbackTextContext->drawPosText(context, rtc, clip, skPaint, viewMatrix, props, text,
- byteLength, pos, scalarsPerPosition, offset, clipBounds);
- return;
}
-
- // fall back to drawing as a path
- GrTextUtils::DrawPosTextAsPath(context, rtc, props, clip, skPaint, viewMatrix, text,
- byteLength, pos, scalarsPerPosition, offset, clipBounds);
+ fFallbackTextContext->drawPosText(context, rtc, clip, skPaint, viewMatrix, props, text,
+ byteLength, pos, scalarsPerPosition, offset, clipBounds);
}
void GrStencilAndCoverTextContext::uncachedDrawTextBlob(GrContext* context,