Consolidate special case shape transformation logic in GrShapeTest.

Enable all tests on all geometry types.

Add conversion of fill+miter-stroke->fill for rect geometries in GrShape.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2157013003

Review-Url: https://codereview.chromium.org/2157013003
diff --git a/src/gpu/GrShape.cpp b/src/gpu/GrShape.cpp
index 698ff48..65c9825 100644
--- a/src/gpu/GrShape.cpp
+++ b/src/gpu/GrShape.cpp
@@ -403,6 +403,16 @@
         // Dashing ignores the inverseness (currently). skbug.com/5421
         fRRectData.fInverted = false;
     }
+    // Turn a stroke-and-filled miter rect into a filled rect. TODO: more rrect stroke shortcuts.
+    if (!fStyle.hasPathEffect() &&
+        fStyle.strokeRec().getStyle() == SkStrokeRec::kStrokeAndFill_Style &&
+        fStyle.strokeRec().getJoin() == SkPaint::kMiter_Join &&
+        fStyle.strokeRec().getMiter() >= SK_ScalarSqrt2 &&
+        fRRectData.fRRect.isRect()) {
+        SkScalar r = fStyle.strokeRec().getWidth() / 2;
+        fRRectData.fRRect = SkRRect::MakeRect(fRRectData.fRRect.rect().makeOutset(r, r));
+        fStyle = GrStyle::SimpleFill();
+    }
 }
 
 void GrShape::attemptToSimplifyLine() {