diff options
-rw-r--r-- | include/core/SkPath.h | 15 | ||||
-rw-r--r-- | src/core/SkPath.cpp | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/include/core/SkPath.h b/include/core/SkPath.h index 51afad7..24e260b 100644 --- a/include/core/SkPath.h +++ b/include/core/SkPath.h @@ -72,7 +72,10 @@ public: @param ft The new fill type for this path */ - void setFillType(FillType ft) { fFillType = SkToU8(ft); } + void setFillType(FillType ft) { + fFillType = SkToU8(ft); + fGenerationID++; + } /** Returns true if the filltype is one of the Inverse variants */ bool isInverseFillType() const { return (fFillType & 2) != 0; } @@ -80,7 +83,10 @@ public: /** Toggle between inverse and normal filltypes. This reverse the return value of isInverseFillType() */ - void toggleInverseFillType() { fFillType ^= 2; } + void toggleInverseFillType() { + fFillType ^= 2; + fGenerationID++; + } /** Returns true if the path is flagged as being convex. This is not a confirmed by any analysis, it is just the value set earlier. @@ -92,7 +98,10 @@ public: not convex can give undefined results when drawn. Paths default to isConvex == false */ - void setIsConvex(bool isConvex) { fIsConvex = (isConvex != 0); } + void setIsConvex(bool isConvex) { + fIsConvex = (isConvex != 0); + fGenerationID++; + } /** Clear any lines and curves from the path, making it empty. This frees up internal storage associated with those segments. diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 867aac5..a01d8e1 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -102,7 +102,9 @@ SkPath::SkPath() : fBoundsIsDirty(true), fFillType(kWinding_FillType) { SkPath::SkPath(const SkPath& src) { SkDEBUGCODE(src.validate();) + uint32_t currentGenID = fGenerationID; *this = src; + fGenerationID = currentGenID; } SkPath::~SkPath() { |