Mark temp paths in SkBaseDevice::drawArc and ::drawDRRect as volatile
authorbsalomon <bsalomon@google.com>
Mon, 22 Aug 2016 18:46:35 +0000 (11:46 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 22 Aug 2016 18:46:35 +0000 (11:46 -0700)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261123004

Review-Url: https://codereview.chromium.org/2261123004

src/core/SkDevice.cpp

index 4534c2fea2bc3c6da6e7ddfe43d60f4ced252633..a90076d44216d98cac3f41056b5e8fd0f35ac328 100644 (file)
@@ -75,7 +75,7 @@ SkPixelGeometry SkBaseDevice::CreateInfo::AdjustGeometry(const SkImageInfo& info
 void SkBaseDevice::drawArc(const SkDraw& draw, const SkRect& oval, SkScalar startAngle,
                            SkScalar sweepAngle, bool useCenter, const SkPaint& paint) {
     SkASSERT(SkScalarAbs(sweepAngle) >= 0.f && SkScalarAbs(sweepAngle) < 360.f);
-    SkPath  path;
+    SkPath path;
     if (useCenter) {
         path.moveTo(oval.centerX(), oval.centerY());
     }
@@ -83,6 +83,7 @@ void SkBaseDevice::drawArc(const SkDraw& draw, const SkRect& oval, SkScalar star
     if (useCenter) {
         path.close();
     }
+    path.setIsVolatile(true);
     this->drawPath(draw, path, paint);
 }
 
@@ -92,6 +93,7 @@ void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer,
     path.addRRect(outer);
     path.addRRect(inner);
     path.setFillType(SkPath::kEvenOdd_FillType);
+    path.setIsVolatile(true);
 
     const SkMatrix* preMatrix = nullptr;
     const bool pathIsMutable = true;