Increment SkPath's generation id when transform() is called

Change-Id: I2f164c30342620e1c0663e133ba671b4a3869b70
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 7f58ae3..3436996 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -1208,6 +1208,7 @@
             }
         }
 
+        // swap() will increment the gen id if needed
         dst->swap(tmp);
         matrix.mapPoints(dst->fPts.begin(), dst->fPts.count());
     } else {
@@ -1218,7 +1219,6 @@
             matrix.mapRect(&dst->fBounds, fBounds);
             dst->fBoundsIsDirty = false;
         } else {
-            GEN_ID_PTR_INC(dst);
             dst->fBoundsIsDirty = true;
         }
 
@@ -1229,7 +1229,12 @@
             dst->fSegmentMask = fSegmentMask;
             dst->fConvexity = fConvexity;
         }
+
+        if (!matrix.isIdentity()) {
+            GEN_ID_PTR_INC(dst);
+        }
         matrix.mapPoints(dst->fPts.begin(), fPts.begin(), fPts.count());
+
         SkDEBUGCODE(dst->validate();)
     }
 }