Unreviewed. Adding a define to enable the old bahevior for SkPath::isEmpty.
authorschenney@chromium.org <schenney@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 21 Dec 2011 19:13:51 +0000 (19:13 +0000)
committerschenney@chromium.org <schenney@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 21 Dec 2011 19:13:51 +0000 (19:13 +0000)
Should be undone at some point, when WebKit no longer needs it.

git-svn-id: http://skia.googlecode.com/svn/trunk@2918 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkPath.cpp

index 07e5476..450b227 100644 (file)
@@ -199,8 +199,12 @@ void SkPath::rewind() {
 
 bool SkPath::isEmpty() const {
     SkDEBUGCODE(this->validate();)
-
+#if SK_OLD_EMPTY_PATH_BEHAVIOR
+    int count = fVerbs.count();
+    return count == 0 || (count == 1 && fVerbs[0] == kMove_Verb);
+#else
     return 0 == fVerbs.count();
+#endif
 }
 
 /*