From a3cf3659ed2c08404a9a6f92af9d231005f65e9b Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Wed, 3 Jan 2018 15:11:00 -0500 Subject: Skip calling GrBlurUtils from SkGpuDevice::drawPath when possible. Change-Id: I57e704f61991abb8a53390d58d349a1995baaa24 Reviewed-on: https://skia-review.googlesource.com/90561 Reviewed-by: Brian Osman Commit-Queue: Brian Salomon --- src/gpu/SkGpuDevice.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index f8924802e6..47d67e17f5 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -625,7 +625,16 @@ void SkGpuDevice::drawPath(const SkPath& origSrcPath, } GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPath", fContext.get()); - + if (!prePathMatrix && !paint.getMaskFilter()) { + GrPaint grPaint; + if (!SkPaintToGrPaint(this->context(), fRenderTargetContext->colorSpaceInfo(), paint, + this->ctm(), &grPaint)) { + return; + } + fRenderTargetContext->drawPath(this->clip(), std::move(grPaint), GrAA(paint.isAntiAlias()), + this->ctm(), origSrcPath, GrStyle(paint)); + return; + } GrBlurUtils::drawPathWithMaskFilter(fContext.get(), fRenderTargetContext.get(), this->clip(), origSrcPath, paint, this->ctm(), prePathMatrix, this->devClipBounds(), pathIsMutable); -- cgit v1.2.3