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

Unified Diff: src/pathops/SkPathOpsOp.cpp

Issue 13851015: path ops : fix empty-diff bug, op-in-place (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 | « src/pathops/SkOpEdgeBuilder.cpp ('k') | tests/PathOpsExtendedTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkPathOpsOp.cpp
===================================================================
--- src/pathops/SkPathOpsOp.cpp (revision 8822)
+++ src/pathops/SkPathOpsOp.cpp (working copy)
@@ -228,10 +228,8 @@
void Op(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result) {
op = gOpInverse[op][one.isInverseFillType()][two.isInverseFillType()];
- result->reset();
SkPath::FillType fillType = gOutInverse[op][one.isInverseFillType()][two.isInverseFillType()]
? SkPath::kInverseEvenOdd_FillType : SkPath::kEvenOdd_FillType;
- result->setFillType(fillType);
const SkPath* minuend = &one;
const SkPath* subtrahend = &two;
if (op == kReverseDifference_PathOp) {
@@ -249,6 +247,8 @@
const int xorMask = builder.xorMask();
builder.addOperand(*subtrahend);
builder.finish();
+ result->reset();
+ result->setFillType(fillType);
const int xorOpMask = builder.xorMask();
SkTDArray<SkOpContour*> contourList;
MakeContourList(contours, contourList, xorMask == kEvenOdd_PathOpsMask,
« no previous file with comments | « src/pathops/SkOpEdgeBuilder.cpp ('k') | tests/PathOpsExtendedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698