Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: src/core/SkDevice.cpp

Issue 2261123004: Mark temp paths in SkBaseDevice::drawArc and ::drawDRRect as volatile (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: move line Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDevice.cpp
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index 4534c2fea2bc3c6da6e7ddfe43d60f4ced252633..a90076d44216d98cac3f41056b5e8fd0f35ac328 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698