aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-01-03 15:11:00 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-04 13:35:50 +0000
commita3cf3659ed2c08404a9a6f92af9d231005f65e9b (patch)
treed05209865f24ed81fc9e48a4668a17152329b13d
parentf4f3f0fb29d493108cbf0f3d1d648ea8bf7e2011 (diff)
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>
-rw-r--r--src/gpu/SkGpuDevice.cpp11
1 files changed, 10 insertions, 1 deletions
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);