diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 296329a52d..57d0d1a4d6 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -956,6 +956,12 @@ void SkDraw::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint, // avoid possibly allocating a new path in transform if we can SkPath* devPathPtr = pathIsMutable ? pathPtr : tmpPath; + // pre-clip if needed right before we apply the CTM + SkPath perspectiveClippedPath; + if (SkPathPriv::PerspectiveClip(*pathPtr, *matrix, &perspectiveClippedPath)) { + pathPtr = &perspectiveClippedPath; + } + // transform the path into device space pathPtr->transform(*matrix, devPathPtr);