From 495f423bee715a2928c2e59fba60439e211c6a1e Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 26 Oct 2017 16:17:13 -0400 Subject: 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 Commit-Queue: Brian Salomon --- src/gpu/text/GrStencilAndCoverTextContext.cpp | 22 ++++------------------ 1 file 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, -- cgit v1.2.3