revert 6766, thereby re-landing 6762-6763 now that the bots are ready



git-svn-id: http://skia.googlecode.com/svn/trunk@6770 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index fe95514..ae1d187 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -11,9 +11,9 @@
 #include "SkBuffer.h"
 #include "SkMath.h"
 #include "SkPathRef.h"
+#include "SkRRect.h"
 #include "SkThread.h"
 
-
 ////////////////////////////////////////////////////////////////////////////
 
 #if SK_DEBUG_PATH_REF
@@ -1088,6 +1088,21 @@
     this->close();
 }
 
+void SkPath::addRRect(const SkRRect& rrect, Direction dir) {
+    const SkRect& bounds = rrect.getBounds();
+
+    if (rrect.isRect()) {
+        this->addRect(bounds, dir);
+    } else if (rrect.isOval()) {
+        this->addOval(bounds, dir);
+    } else if (rrect.isSimple()) {
+        const SkVector& rad = rrect.getSimpleRadii();
+        this->addRoundRect(bounds, rad.x(), rad.y(), dir);
+    } else {
+        this->addRoundRect(bounds, (const SkScalar*)&rrect.fRadii[0], dir);
+    }
+}
+
 bool SkPath::hasOnlyMoveTos() const {
     int count = fPathRef->countVerbs();
     const uint8_t* verbs = const_cast<const SkPathRef*>(fPathRef.get())->verbsMemBegin();