convert pathops to use SkSTArray where possible.

Replace SkTDArray with SkTArray and use SkSTArray when
the probable array size is known.

In a couple of places (spans, chases) the arrays are
constructed using insert() so SkTArrays can't be used for
now.

Also, add an optimization to cubic subdivide if either end
is zero or one.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9635 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pathops/SkPathOpsOp.cpp b/src/pathops/SkPathOpsOp.cpp
index f030765..7e1c772 100644
--- a/src/pathops/SkPathOpsOp.cpp
+++ b/src/pathops/SkPathOpsOp.cpp
@@ -20,7 +20,7 @@
         const SkOpSpan& backPtr = span->fOther->span(span->fOtherIndex);
         SkOpSegment* segment = backPtr.fOther;
         nextStart = backPtr.fOtherIndex;
-        SkTDArray<SkOpAngle> angles;
+        SkSTArray<SkOpAngle::kStackBasedCount, SkOpAngle, true> angles;
         int done = 0;
         if (segment->activeAngle(nextStart, &done, &angles)) {
             SkOpAngle* last = angles.end() - 1;
@@ -36,7 +36,7 @@
         if (done == angles.count()) {
             continue;
         }
-        SkTDArray<SkOpAngle*> sorted;
+        SkSTArray<SkOpAngle::kStackBasedCount, SkOpAngle*, true> sorted;
         bool sortable = SkOpSegment::SortAngles(angles, &sorted,
                 SkOpSegment::kMayBeUnordered_SortAngleKind);
         int angleCount = sorted.count();
@@ -126,7 +126,7 @@
 }
 */
 
-static bool bridgeOp(SkTDArray<SkOpContour*>& contourList, const SkPathOp op,
+static bool bridgeOp(SkTArray<SkOpContour*, true>& contourList, const SkPathOp op,
         const int xorMask, const int xorOpMask, SkPathWriter* simple) {
     bool firstContour = true;
     bool unsortable = false;
@@ -263,7 +263,7 @@
     result->reset();
     result->setFillType(fillType);
     const int xorOpMask = builder.xorMask();
-    SkTDArray<SkOpContour*> contourList;
+    SkTArray<SkOpContour*, true> contourList;
     MakeContourList(contours, contourList, xorMask == kEvenOdd_PathOpsMask,
             xorOpMask == kEvenOdd_PathOpsMask);
     SkOpContour** currentPtr = contourList.begin();