Skip calling GrBlurUtils from SkGpuDevice::drawPath when possible.

Change-Id: I57e704f61991abb8a53390d58d349a1995baaa24
Reviewed-on: https://skia-review.googlesource.com/90561
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Brian Salomon 2018-01-03 15:11:00 -05:00 committed by Skia Commit-Bot
parent f4f3f0fb29
commit a3cf3659ed

View File

@ -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);