Expose SkPathRef::unique through SkPath.
authordjsollen <djsollen@google.com>
Thu, 12 Feb 2015 20:08:40 +0000 (12:08 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 12 Feb 2015 20:08:40 +0000 (12:08 -0800)
This allows for the removal of SkPath::mSourcePath on Android
as they now have a better indicator of whether or not the path
can be used again via the Java API.

Review URL: https://codereview.chromium.org/913413004

include/core/SkPath.h

index c4606cf..61b1ce4 100644 (file)
@@ -42,6 +42,11 @@ public:
         return !(a == b);
     }
 
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+    /** Returns true if the caller is the only owner of the underlying path data */
+    bool unique() const { return fPathRef->unique(); }
+#endif
+
     enum FillType {
         /** Specifies that "inside" is computed by a non-zero sum of signed
             edge crossings