Store tasks to execute before VK secondary command buffers generically.

Repurpose GrTRecorder for storing these tasks. It's currently unused.
Reimplement on top of SkArenaAlloc and using emplace methods now that we
have C++14.

Currently it stores copy and upload tasks. In the future it will store
transfer-out commands.

Removes the optimization that reset copy-ins on clear/discard. However,
none of our existing tests exercised it.

Change-Id: I0474f77cc2d368461d542de50a7a0c5609312001
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209643
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/ccpr/GrCCStroker.cpp b/src/gpu/ccpr/GrCCStroker.cpp
index 65f1c41..97ef8d2 100644
--- a/src/gpu/ccpr/GrCCStroker.cpp
+++ b/src/gpu/ccpr/GrCCStroker.cpp
@@ -573,8 +573,8 @@
     fBaseInstances[1].fStrokes[0] = fInstanceCounts[0]->fStrokes[0];
     int endLinearStrokesIdx = fBaseInstances[1].fStrokes[0] + fInstanceCounts[1]->fStrokes[0];
 
-    int cubicStrokesIdx = GR_CT_DIV_ROUND_UP(endLinearStrokesIdx * sizeof(LinearStrokeInstance),
-                                             sizeof(CubicStrokeInstance));
+    int cubicStrokesIdx = GrSizeDivRoundUp(endLinearStrokesIdx * sizeof(LinearStrokeInstance),
+                                           sizeof(CubicStrokeInstance));
     for (int i = 1; i <= kMaxNumLinearSegmentsLog2; ++i) {
         for (int j = 0; j < kNumScissorModes; ++j) {
             fBaseInstances[j].fStrokes[i] = cubicStrokesIdx;
@@ -582,16 +582,16 @@
         }
     }
 
-    int trianglesIdx = GR_CT_DIV_ROUND_UP(cubicStrokesIdx * sizeof(CubicStrokeInstance),
-                                          sizeof(TriangleInstance));
+    int trianglesIdx = GrSizeDivRoundUp(cubicStrokesIdx * sizeof(CubicStrokeInstance),
+                                        sizeof(TriangleInstance));
     fBaseInstances[0].fTriangles = trianglesIdx;
     fBaseInstances[1].fTriangles =
             fBaseInstances[0].fTriangles + fInstanceCounts[0]->fTriangles;
     int endTrianglesIdx =
             fBaseInstances[1].fTriangles + fInstanceCounts[1]->fTriangles;
 
-    int conicsIdx = GR_CT_DIV_ROUND_UP(endTrianglesIdx * sizeof(TriangleInstance),
-                                       sizeof(ConicInstance));
+    int conicsIdx =
+            GrSizeDivRoundUp(endTrianglesIdx * sizeof(TriangleInstance), sizeof(ConicInstance));
     fBaseInstances[0].fConics = conicsIdx;
     fBaseInstances[1].fConics = fBaseInstances[0].fConics + fInstanceCounts[0]->fConics;