Revert "migrating SkTDArray towards std::vector api"

This reverts commit 79884be809e8041baf294137bd2018f2d6fe0f10.

Reason for revert: broke flutter build -- initializer_list?

Original change's description:
> migrating SkTDArray towards std::vector api
> 
> push -> push_back
> add some aliases to match std::vector: count, reserve, ...
> 
> Bug: skia:
> Change-Id: I1921c31d0d6e5ed3d622a0def6054c697be2d02f
> Reviewed-on: https://skia-review.googlesource.com/145884
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Ib6132b725aaed7c01287e3e8c2b5a14da3d3d7e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/146140
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 0ee436c..d86db82 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -1269,9 +1269,9 @@
             continue;
         }
         if (test.needsGpu && FLAGS_gpu) {
-            (FLAGS_gpu_threading ? gParallelTests : gSerialTests).push_back(test);
+            (FLAGS_gpu_threading ? gParallelTests : gSerialTests).push(test);
         } else if (!test.needsGpu && FLAGS_cpu) {
-            gParallelTests.push_back(test);
+            gParallelTests.push(test);
         }
     }
 }
diff --git a/experimental/svg/model/SkSVGAttributeParser.cpp b/experimental/svg/model/SkSVGAttributeParser.cpp
index d60ffd8..dc328a1 100644
--- a/experimental/svg/model/SkSVGAttributeParser.cpp
+++ b/experimental/svg/model/SkSVGAttributeParser.cpp
@@ -559,7 +559,7 @@
             break;
         }
 
-        pts.push_back(SkPoint::Make(x, y));
+        pts.push(SkPoint::Make(x, y));
         parsedValue = true;
     }
 
@@ -636,7 +636,7 @@
                 break;
             }
 
-            dashes.push_back(dash);
+            dashes.push(dash);
             parsedValue = true;
         }
 
diff --git a/include/private/SkMessageBus.h b/include/private/SkMessageBus.h
index 01145ec..9fe060d 100644
--- a/include/private/SkMessageBus.h
+++ b/include/private/SkMessageBus.h
@@ -70,7 +70,7 @@
     // Register ourselves with the corresponding message bus.
     SkMessageBus<Message>* bus = SkMessageBus<Message>::Get();
     SkAutoMutexAcquire lock(bus->fInboxesMutex);
-    bus->fInboxes.push_back(this);
+    bus->fInboxes.push(this);
 }
 
 template<typename Message>
diff --git a/include/private/SkTDArray.h b/include/private/SkTDArray.h
index ea5b50f..c6bd4ff 100644
--- a/include/private/SkTDArray.h
+++ b/include/private/SkTDArray.h
@@ -29,7 +29,6 @@
             fReserve = fCount = count;
         }
     }
-    SkTDArray(const std::initializer_list<T>& list) : SkTDArray(list.begin(), list.size()) {}
     SkTDArray(const SkTDArray<T>& src) : fArray(nullptr), fReserve(0), fCount(0) {
         SkTDArray<T> tmp(src.fArray, src.fCount);
         this->swap(tmp);
@@ -78,13 +77,11 @@
     }
 
     bool isEmpty() const { return fCount == 0; }
-    bool empty() const { return this->isEmpty(); }
 
     /**
      *  Return the number of elements in the array
      */
     int count() const { return fCount; }
-    size_t size() const { return fCount; }
 
     /**
      *  Return the total number of elements allocated.
@@ -98,12 +95,10 @@
      */
     size_t bytes() const { return fCount * sizeof(T); }
 
-    T*        begin() { return fArray; }
+    T*  begin() { return fArray; }
     const T*  begin() const { return fArray; }
-    const T* cbegin() const { return fArray; }
-    T*        end() { return fArray ? fArray + fCount : nullptr; }
+    T*  end() { return fArray ? fArray + fCount : nullptr; }
     const T*  end() const { return fArray ? fArray + fCount : nullptr; }
-    const T* cend() const { return fArray ? fArray + fCount : nullptr; }
 
     T&  operator[](int index) {
         SkASSERT(index < fCount);
@@ -156,10 +151,6 @@
             this->resizeStorageToAtLeast(reserve);
         }
     }
-    void reserve(size_t n) {
-        SkASSERT_RELEASE(SkTFitsIn<int>(n));
-        this->setReserve(SkToInt(n));
-    }
 
     T* prepend() {
         this->adjustCount(1);
@@ -272,16 +263,13 @@
     }
 
     // routines to treat the array like a stack
-    void push_back(const T& v) { *this->append() = v; }
-    T*      push() { return this->append(); }
+    T*       push() { return this->append(); }
+    void     push(const T& elem) { *this->append() = elem; }
     const T& top() const { return (*this)[fCount - 1]; }
     T&       top() { return (*this)[fCount - 1]; }
     void     pop(T* elem) { SkASSERT(fCount > 0); if (elem) *elem = (*this)[fCount - 1]; --fCount; }
     void     pop() { SkASSERT(fCount > 0); --fCount; }
 
-    // DEPRECATED -- update call-sites to remove
-    void push(const T& v) { this->push_back(v); }
-
     void deleteAll() {
         T*  iter = fArray;
         T*  stop = fArray + fCount;
diff --git a/modules/sksg/src/SkSGInvalidationController.cpp b/modules/sksg/src/SkSGInvalidationController.cpp
index df711ab..81a3376 100644
--- a/modules/sksg/src/SkSGInvalidationController.cpp
+++ b/modules/sksg/src/SkSGInvalidationController.cpp
@@ -25,7 +25,7 @@
         ctm.mapRect(rect.writable());
     }
 
-    fRects.push_back(*rect);
+    fRects.push(*rect);
     fBounds.join(*rect);
 }
 
diff --git a/modules/sksg/src/SkSGNode.cpp b/modules/sksg/src/SkSGNode.cpp
index 0cb578e..35b2640 100644
--- a/modules/sksg/src/SkSGNode.cpp
+++ b/modules/sksg/src/SkSGNode.cpp
@@ -63,7 +63,7 @@
 
         auto observers = new SkTDArray<Node*>();
         observers->setReserve(2);
-        observers->push_back(node->fInvalObserver);
+        observers->push(node->fInvalObserver);
 
         node->fInvalObserverArray = observers;
         node->fFlags |= kObserverArray_Flag;
@@ -72,7 +72,7 @@
     // No duplicate observers.
     SkASSERT(node->fInvalObserverArray->find(this) < 0);
 
-    node->fInvalObserverArray->push_back(this);
+    node->fInvalObserverArray->push(this);
 }
 
 void Node::unobserveInval(const sk_sp<Node>& node) {
diff --git a/src/core/SkEdgeBuilder.cpp b/src/core/SkEdgeBuilder.cpp
index 17d84ef..48c1bca 100644
--- a/src/core/SkEdgeBuilder.cpp
+++ b/src/core/SkEdgeBuilder.cpp
@@ -127,7 +127,7 @@
     if (fEdgeType == kBezier) {
         SkLine* line = fAlloc.make<SkLine>();
         if (line->set(pts)) {
-            fList.push_back(line);
+            fList.push(line);
         }
     } else if (fEdgeType == kAnalyticEdge) {
         SkAnalyticEdge* edge = fAlloc.make<SkAnalyticEdge>();
@@ -141,7 +141,7 @@
                     goto unallocate_analytic_edge;
                 }
             }
-            fList.push_back(edge);
+            fList.push(edge);
         } else {
 unallocate_analytic_edge:
             ;
@@ -159,7 +159,7 @@
                     goto unallocate_edge;
                 }
             }
-            fList.push_back(edge);
+            fList.push(edge);
         } else {
 unallocate_edge:
             ;
@@ -172,19 +172,19 @@
     if (fEdgeType == kBezier) {
         SkQuad* quad = fAlloc.make<SkQuad>();
         if (quad->set(pts)) {
-            fList.push_back(quad);
+            fList.push(quad);
         }
     } else if (fEdgeType == kAnalyticEdge) {
         SkAnalyticQuadraticEdge* edge = fAlloc.make<SkAnalyticQuadraticEdge>();
         if (edge->setQuadratic(pts)) {
-            fList.push_back(edge);
+            fList.push(edge);
         } else {
             // TODO: unallocate edge from storage...
         }
     } else {
         SkQuadraticEdge* edge = fAlloc.make<SkQuadraticEdge>();
         if (edge->setQuadratic(pts, fShiftUp)) {
-            fList.push_back(edge);
+            fList.push(edge);
         } else {
             // TODO: unallocate edge from storage...
         }
@@ -195,19 +195,19 @@
     if (fEdgeType == kBezier) {
         SkCubic* cubic = fAlloc.make<SkCubic>();
         if (cubic->set(pts)) {
-            fList.push_back(cubic);
+            fList.push(cubic);
         }
     } else if (fEdgeType == kAnalyticEdge) {
         SkAnalyticCubicEdge* edge = fAlloc.make<SkAnalyticCubicEdge>();
         if (edge->setCubic(pts)) {
-            fList.push_back(edge);
+            fList.push(edge);
         } else {
             // TODO: unallocate edge from storage...
         }
     } else {
         SkCubicEdge* edge = fAlloc.make<SkCubicEdge>();
         if (edge->setCubic(pts, fShiftUp)) {
-            fList.push_back(edge);
+            fList.push(edge);
         } else {
             // TODO: unallocate edge from storage...
         }
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 05d2ca8..99ac492 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -3077,7 +3077,7 @@
         }
         SkVector tangent;
         SkEvalCubicAt(c, t, nullptr, &tangent, nullptr);
-        tangents->push_back(tangent);
+        tangents->push(tangent);
     }
 }
 
@@ -3104,7 +3104,7 @@
             continue;
         }
         SkConic conic(pts, w);
-        tangents->push_back(conic.evalTangentAt(t));
+        tangents->push(conic.evalTangentAt(t));
     }
 }
 
@@ -3130,7 +3130,7 @@
         if (!SkScalarNearlyEqual(x, xt)) {
             continue;
         }
-        tangents->push_back(SkEvalQuadTangentAt(pts, t));
+        tangents->push(SkEvalQuadTangentAt(pts, t));
     }
 }
 
@@ -3153,7 +3153,7 @@
     }
     SkVector v;
     v.set(dx, dy);
-    tangents->push_back(v);
+    tangents->push(v);
 }
 
 static bool contains_inclusive(const SkRect& r, SkScalar x, SkScalar y) {
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index ca36e7e..922fb6a 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -47,7 +47,7 @@
 void SkPictureRecord::willSave() {
     // record the offset to us, making it non-positive to distinguish a save
     // from a clip entry.
-    fRestoreOffsetStack.push_back(-(int32_t)fWriter.bytesWritten());
+    fRestoreOffsetStack.push(-(int32_t)fWriter.bytesWritten());
     this->recordSave();
 
     this->INHERITED::willSave();
@@ -64,7 +64,7 @@
 SkCanvas::SaveLayerStrategy SkPictureRecord::getSaveLayerStrategy(const SaveLayerRec& rec) {
     // record the offset to us, making it non-positive to distinguish a save
     // from a clip entry.
-    fRestoreOffsetStack.push_back(-(int32_t)fWriter.bytesWritten());
+    fRestoreOffsetStack.push(-(int32_t)fWriter.bytesWritten());
     this->recordSaveLayer(rec);
 
     (void)this->INHERITED::getSaveLayerStrategy(rec);
diff --git a/src/core/SkRTree.cpp b/src/core/SkRTree.cpp
index 8d9239c..4d1787e 100644
--- a/src/core/SkRTree.cpp
+++ b/src/core/SkRTree.cpp
@@ -172,7 +172,7 @@
     for (int i = 0; i < node->fNumChildren; ++i) {
         if (SkRect::Intersects(node->fChildren[i].fBounds, query)) {
             if (0 == node->fLevel) {
-                results->push_back(node->fChildren[i].fOpIndex);
+                results->push(node->fChildren[i].fOpIndex);
             } else {
                 this->search(node->fChildren[i].fSubtree, query, results);
             }
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index e42ff29..9c58456 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -169,7 +169,7 @@
         fCTM = SkMatrix::I();
 
         // We push an extra save block to track the bounds of any top-level control operations.
-        fSaveStack.push_back({ 0, Bounds::MakeEmpty(), nullptr, fCTM });
+        fSaveStack.push({ 0, Bounds::MakeEmpty(), nullptr, fCTM });
     }
 
     void cleanUp() {
@@ -275,7 +275,7 @@
         sb.paint = paint;
         sb.ctm = this->fCTM;
 
-        fSaveStack.push_back(sb);
+        fSaveStack.push(sb);
         this->pushControl();
     }
 
@@ -329,7 +329,7 @@
     }
 
     void pushControl() {
-        fControlIndices.push_back(fCurrentOp);
+        fControlIndices.push(fCurrentOp);
         if (!fSaveStack.isEmpty()) {
             fSaveStack.top().controlOps++;
         }
diff --git a/src/gpu/ops/GrAAConvexTessellator.cpp b/src/gpu/ops/GrAAConvexTessellator.cpp
index e08a354..72df654 100644
--- a/src/gpu/ops/GrAAConvexTessellator.cpp
+++ b/src/gpu/ops/GrAAConvexTessellator.cpp
@@ -451,10 +451,10 @@
             SkASSERT(SkScalarNearlyEqual(1.0f, fNorms[cur].length()));
         }
 
-        fNorms.push_back(SkPoint::Make(-fNorms[0].fX, -fNorms[0].fY));
+        fNorms.push(SkPoint::Make(-fNorms[0].fX, -fNorms[0].fY));
         // we won't actually use the bisectors, so just push zeroes
-        fBisectors.push_back(SkPoint::Make(0.0, 0.0));
-        fBisectors.push_back(SkPoint::Make(0.0, 0.0));
+        fBisectors.push(SkPoint::Make(0.0, 0.0));
+        fBisectors.push(SkPoint::Make(0.0, 0.0));
     } else {
         return false;
     }
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp
index cd59eab..011db9d 100644
--- a/src/gpu/vk/GrVkPipelineState.cpp
+++ b/src/gpu/vk/GrVkPipelineState.cpp
@@ -308,16 +308,16 @@
         const GrSamplerState& state = bindings[i].fState;
         GrVkTexture* texture = bindings[i].fTexture;
 
-        fSamplers.push_back(gpu->resourceProvider().findOrCreateCompatibleSampler(
+        fSamplers.push(gpu->resourceProvider().findOrCreateCompatibleSampler(
                 state, texture->texturePriv().maxMipMapLevel()));
 
         const GrVkResource* textureResource = texture->resource();
         textureResource->ref();
-        fTextures.push_back(textureResource);
+        fTextures.push(textureResource);
 
         const GrVkImageView* textureView = texture->textureView();
         textureView->ref();
-        fTextureViews.push_back(textureView);
+        fTextureViews.push(textureView);
 
         VkDescriptorImageInfo imageInfo;
         memset(&imageInfo, 0, sizeof(VkDescriptorImageInfo));
diff --git a/src/pathops/SkPathWriter.cpp b/src/pathops/SkPathWriter.cpp
index 797f42f..9548c3b4f 100644
--- a/src/pathops/SkPathWriter.cpp
+++ b/src/pathops/SkPathWriter.cpp
@@ -97,8 +97,8 @@
         this->close();
     } else {
         SkASSERT(fDefer[1]);
-        fEndPtTs.push_back(fFirstPtT);
-        fEndPtTs.push_back(fDefer[1]);
+        fEndPtTs.push(fFirstPtT);
+        fEndPtTs.push(fDefer[1]);
         fPartials.push_back(fCurrent);
         this->init();
     }
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 43ee5f6..fc7384f 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -1464,7 +1464,7 @@
     SkTDArray<SkPDFObject*> fonts;
     fonts.setReserve(fFontResources.count());
     for (SkPDFFont* font : fFontResources) {
-        fonts.push_back(font);
+        fonts.push(font);
     }
     return SkPDFResourceDict::Make(
             &fGraphicStateResources,
@@ -1900,7 +1900,7 @@
                 int resourceIndex = fShaderResources.find(pdfShader.get());
                 if (resourceIndex < 0) {
                     resourceIndex = fShaderResources.count();
-                    fShaderResources.push_back(pdfShader.get());
+                    fShaderResources.push(pdfShader.get());
                     pdfShader.get()->ref();
                 }
                 entry->fShaderIndex = resourceIndex;
@@ -1933,7 +1933,7 @@
     int result = fGraphicStateResources.find(gs);
     if (result < 0) {
         result = fGraphicStateResources.count();
-        fGraphicStateResources.push_back(gs);
+        fGraphicStateResources.push(gs);
         gs->ref();
     }
     return result;
@@ -1946,7 +1946,7 @@
     int result = fXObjectResources.find(xObject);
     if (result < 0) {
         result = fXObjectResources.count();
-        fXObjectResources.push_back(SkRef(xObject));
+        fXObjectResources.push(SkRef(xObject));
     }
     return result;
 }
@@ -1960,7 +1960,7 @@
     if (resourceIndex < 0) {
         fDocument->registerFont(newFont.get());
         resourceIndex = fFontResources.count();
-        fFontResources.push_back(newFont.release());
+        fFontResources.push(newFont.release());
     }
     return resourceIndex;
 }
diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp
index ace2f45..7d91454 100644
--- a/src/pdf/SkPDFDocument.cpp
+++ b/src/pdf/SkPDFDocument.cpp
@@ -61,7 +61,7 @@
         // always free and has a generation number of 65,535; it is
         // the head of the linked list of free objects."
         SkASSERT(fOffsets.count() == fNextToBeSerialized);
-        fOffsets.push_back(this->offset(wStream));
+        fOffsets.push(this->offset(wStream));
         wStream->writeDecAsText(index);
         wStream->writeText(" 0 obj\n");  // Generation number is always 0.
         object->emitObject(wStream, fObjNumMap);
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp
index c25d724..e997650 100644
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -351,7 +351,7 @@
     // TODO(halcanary): sfntly should take a more compact format.
     SkTDArray<unsigned> subset;
     if (!glyphUsage.has(0)) {
-        subset.push_back(0);  // Always include glyph 0.
+        subset.push(0);  // Always include glyph 0.
     }
     glyphUsage.exportTo(&subset);
 
diff --git a/src/pdf/SkPDFGradientShader.cpp b/src/pdf/SkPDFGradientShader.cpp
index 1336938..dc11d64 100644
--- a/src/pdf/SkPDFGradientShader.cpp
+++ b/src/pdf/SkPDFGradientShader.cpp
@@ -791,11 +791,11 @@
                                                    SkPDFObject* gState) {
     SkTDArray<SkPDFObject*> patterns;
     if (functionShader) {
-        patterns.push_back(functionShader);
+        patterns.push(functionShader);
     }
     SkTDArray<SkPDFObject*> graphicStates;
     if (gState) {
-        graphicStates.push_back(gState);
+        graphicStates.push(gState);
     }
     return SkPDFResourceDict::Make(&graphicStates, &patterns, nullptr, nullptr);
 }
diff --git a/src/pdf/SkPDFMakeToUnicodeCmap.cpp b/src/pdf/SkPDFMakeToUnicodeCmap.cpp
index 7fd2931..4f383e1 100644
--- a/src/pdf/SkPDFMakeToUnicodeCmap.cpp
+++ b/src/pdf/SkPDFMakeToUnicodeCmap.cpp
@@ -182,7 +182,7 @@
                     currentRangeEntry.fUnicode + i - currentRangeEntry.fStart;
             if (!inSubset || !inRange) {
                 if (currentRangeEntry.fEnd > currentRangeEntry.fStart) {
-                    bfrangeEntries.push_back(currentRangeEntry);
+                    bfrangeEntries.push(currentRangeEntry);
                 } else {
                     BFChar* entry = bfcharEntries.append();
                     entry->fGlyphId = currentRangeEntry.fStart;
diff --git a/src/ports/SkFontMgr_android_parser.cpp b/src/ports/SkFontMgr_android_parser.cpp
index df58815..1269523 100644
--- a/src/ports/SkFontMgr_android_parser.cpp
+++ b/src/ports/SkFontMgr_android_parser.cpp
@@ -556,7 +556,7 @@
             if (child->start) {
                 child->start(self, tag, attributes);
             }
-            self->fHandler.push_back(child);
+            self->fHandler.push(child);
             XML_SetCharacterDataHandler(self->fParser, child->chars);
         } else {
             SK_FONTCONFIGPARSER_WARNING("'%s' tag not recognized, skipping", tag);
diff --git a/src/utils/SkBitSet.h b/src/utils/SkBitSet.h
index 755e63b..98aa05f 100644
--- a/src/utils/SkBitSet.h
+++ b/src/utils/SkBitSet.h
@@ -55,7 +55,7 @@
                 unsigned int index = i * 32;
                 for (unsigned int j = 0; j < 32; ++j) {
                     if (0x1 & (value >> j)) {
-                        array->push_back(index + j);
+                        array->push(index + j);
                     }
                 }
             }
diff --git a/tests/GpuRectanizerTest.cpp b/tests/GpuRectanizerTest.cpp
index 0035346..5b737fe 100644
--- a/tests/GpuRectanizerTest.cpp
+++ b/tests/GpuRectanizerTest.cpp
@@ -61,8 +61,8 @@
     SkRandom rand;
 
     for (int i = 0; i < 50; i++) {
-        rects.push_back(SkISize::Make(rand.nextRangeU(1, kWidth / 2),
-                                      rand.nextRangeU(1, kHeight / 2)));
+        rects.push(SkISize::Make(rand.nextRangeU(1, kWidth / 2),
+                                 rand.nextRangeU(1, kHeight / 2)));
     }
 
     test_skyline(reporter, rects);
diff --git a/tests/OnFlushCallbackTest.cpp b/tests/OnFlushCallbackTest.cpp
index 9eb2dca..f992e53 100644
--- a/tests/OnFlushCallbackTest.cpp
+++ b/tests/OnFlushCallbackTest.cpp
@@ -281,7 +281,7 @@
         }
 
         if (!header) {
-            fOps.push_back({opListID, nullptr});
+            fOps.push({opListID, nullptr});
             header = &(fOps[fOps.count()-1]);
         }
 
@@ -334,7 +334,7 @@
         SkTDArray<LinkedListHeader*> lists;
         for (int i = 0; i < numOpListIDs; ++i) {
             if (LinkedListHeader* list = this->getList(opListIDs[i])) {
-                lists.push_back(list);
+                lists.push(list);
             }
         }
 
diff --git a/tests/PDFGlyphsToUnicodeTest.cpp b/tests/PDFGlyphsToUnicodeTest.cpp
index 64eefbd..ab520eb 100644
--- a/tests/PDFGlyphsToUnicodeTest.cpp
+++ b/tests/PDFGlyphsToUnicodeTest.cpp
@@ -39,41 +39,41 @@
     SkTDArray<uint16_t> glyphsInSubset;
     SkBitSet subset(kMaximumGlyphCount);
 
-    glyphToUnicode.push_back(0);  // 0
-    glyphToUnicode.push_back(0);  // 1
-    glyphToUnicode.push_back(0);  // 2
-    glyphsInSubset.push_back(3);
-    glyphToUnicode.push_back(0x20);  // 3
-    glyphsInSubset.push_back(4);
-    glyphToUnicode.push_back(0x25);  // 4
-    glyphsInSubset.push_back(5);
-    glyphToUnicode.push_back(0x27);  // 5
-    glyphsInSubset.push_back(6);
-    glyphToUnicode.push_back(0x28);  // 6
-    glyphsInSubset.push_back(7);
-    glyphToUnicode.push_back(0x29);  // 7
-    glyphsInSubset.push_back(8);
-    glyphToUnicode.push_back(0x2F);  // 8
-    glyphsInSubset.push_back(9);
-    glyphToUnicode.push_back(0x33);  // 9
-    glyphToUnicode.push_back(0);  // 10
-    glyphsInSubset.push_back(11);
-    glyphToUnicode.push_back(0x35);  // 11
-    glyphsInSubset.push_back(12);
-    glyphToUnicode.push_back(0x36);  // 12
-    glyphsInSubset.push_back(13);
-    glyphToUnicode.push_back(0x37);  // 13
+    glyphToUnicode.push(0);  // 0
+    glyphToUnicode.push(0);  // 1
+    glyphToUnicode.push(0);  // 2
+    glyphsInSubset.push(3);
+    glyphToUnicode.push(0x20);  // 3
+    glyphsInSubset.push(4);
+    glyphToUnicode.push(0x25);  // 4
+    glyphsInSubset.push(5);
+    glyphToUnicode.push(0x27);  // 5
+    glyphsInSubset.push(6);
+    glyphToUnicode.push(0x28);  // 6
+    glyphsInSubset.push(7);
+    glyphToUnicode.push(0x29);  // 7
+    glyphsInSubset.push(8);
+    glyphToUnicode.push(0x2F);  // 8
+    glyphsInSubset.push(9);
+    glyphToUnicode.push(0x33);  // 9
+    glyphToUnicode.push(0);  // 10
+    glyphsInSubset.push(11);
+    glyphToUnicode.push(0x35);  // 11
+    glyphsInSubset.push(12);
+    glyphToUnicode.push(0x36);  // 12
+    glyphsInSubset.push(13);
+    glyphToUnicode.push(0x37);  // 13
     for (uint16_t i = 14; i < 0xFE; ++i) {
-        glyphToUnicode.push_back(0);  // Zero from index 0x9 to 0xFD
+        glyphToUnicode.push(0);  // Zero from index 0x9 to 0xFD
     }
-    glyphsInSubset.push_back(0xFE);
-    glyphToUnicode.push_back(0x1010);
-    glyphsInSubset.push_back(0xFF);
-    glyphToUnicode.push_back(0x1011);
-    glyphsInSubset.push_back(0x100);
-    glyphToUnicode.push_back(0x1012);
-    glyphsInSubset.push_back(0x101);
-    glyphToUnicode.push_back(0x1013);
+    glyphsInSubset.push(0xFE);
+    glyphToUnicode.push(0x1010);
+    glyphsInSubset.push(0xFF);
+    glyphToUnicode.push(0x1011);
+    glyphsInSubset.push(0x100);
+    glyphToUnicode.push(0x1012);
+    glyphsInSubset.push(0x101);
+    glyphToUnicode.push(0x1013);
 
     SkGlyphID lastGlyphID = SkToU16(glyphToUnicode.count() - 1);
 
@@ -160,16 +160,16 @@
     // Glyph id 2c 51 56 57 44 4f
     // Unicode  49 6e 73 74 61 6c
     for (SkUnichar i = 0; i < 100; ++i) {
-      glyphToUnicode.push_back(i + 29);
+      glyphToUnicode.push(i + 29);
     }
     lastGlyphID = SkToU16(glyphToUnicode.count() - 1);
 
-    glyphsInSubset.push_back(0x2C);
-    glyphsInSubset.push_back(0x44);
-    glyphsInSubset.push_back(0x4F);
-    glyphsInSubset.push_back(0x51);
-    glyphsInSubset.push_back(0x56);
-    glyphsInSubset.push_back(0x57);
+    glyphsInSubset.push(0x2C);
+    glyphsInSubset.push(0x44);
+    glyphsInSubset.push(0x4F);
+    glyphsInSubset.push(0x51);
+    glyphsInSubset.push(0x56);
+    glyphsInSubset.push(0x57);
 
     SkDynamicMemoryWStream buffer2;
     subset2.setAll(glyphsInSubset.begin(), glyphsInSubset.count());
diff --git a/tests/RTreeTest.cpp b/tests/RTreeTest.cpp
index 9b451d1..b39af67 100644
--- a/tests/RTreeTest.cpp
+++ b/tests/RTreeTest.cpp
@@ -30,7 +30,7 @@
     // manually intersect with every rectangle
     for (int i = 0; i < NUM_RECTS; ++i) {
         if (SkRect::Intersects(query, rects[i])) {
-            expected.push_back(i);
+            expected.push(i);
         }
     }
 
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp
index 19b88e9..537bcb1 100644
--- a/tools/debugger/SkDebugCanvas.cpp
+++ b/tools/debugger/SkDebugCanvas.cpp
@@ -84,7 +84,7 @@
 }
 
 void SkDebugCanvas::addDrawCommand(SkDrawCommand* command) {
-    fCommandVector.push_back(command);
+    fCommandVector.push(command);
 }
 
 void SkDebugCanvas::draw(SkCanvas* canvas) {
diff --git a/tools/flags/SkCommandLineFlags.cpp b/tools/flags/SkCommandLineFlags.cpp
index 3924812..8e38c52 100644
--- a/tools/flags/SkCommandLineFlags.cpp
+++ b/tools/flags/SkCommandLineFlags.cpp
@@ -253,7 +253,7 @@
                 SkTDArray<SkFlagInfo*> allFlags;
                 for (SkFlagInfo* flag = SkCommandLineFlags::gHead; flag;
                      flag = flag->next()) {
-                    allFlags.push_back(flag);
+                    allFlags.push(flag);
                 }
                 SkTQSort(&allFlags[0], &allFlags[allFlags.count() - 1],
                          CompareFlagsByName());
diff --git a/tools/sk_app/Window.h b/tools/sk_app/Window.h
index be4da9a..8a71f35 100644
--- a/tools/sk_app/Window.h
+++ b/tools/sk_app/Window.h
@@ -158,7 +158,7 @@
 
     void pushLayer(Layer* layer) {
         layer->onAttach(this);
-        fLayers.push_back(layer);
+        fLayers.push(layer);
     }
 
     void onBackendCreated();
diff --git a/tools/skdiff/skdiff_main.cpp b/tools/skdiff/skdiff_main.cpp
index b4fdaad..56aebe7 100644
--- a/tools/skdiff/skdiff_main.cpp
+++ b/tools/skdiff/skdiff_main.cpp
@@ -183,14 +183,14 @@
         uint32_t mismatchValue;
 
         if (drp->fBase.fFilename.equals(drp->fComparison.fFilename)) {
-            fResultsOfType[drp->fResult].push_back(new SkString(drp->fBase.fFilename));
+            fResultsOfType[drp->fResult].push(new SkString(drp->fBase.fFilename));
         } else {
             SkString* blame = new SkString("(");
             blame->append(drp->fBase.fFilename);
             blame->append(", ");
             blame->append(drp->fComparison.fFilename);
             blame->append(")");
-            fResultsOfType[drp->fResult].push_back(blame);
+            fResultsOfType[drp->fResult].push(blame);
         }
         switch (drp->fResult) {
           case DiffRecord::kEqualBits_Result:
@@ -215,7 +215,7 @@
             break;
           case DiffRecord::kCouldNotCompare_Result:
             fNumMismatches++;
-            fStatusOfType[drp->fBase.fStatus][drp->fComparison.fStatus].push_back(
+            fStatusOfType[drp->fBase.fStatus][drp->fComparison.fStatus].push(
                     new SkString(drp->fBase.fFilename));
             break;
           case DiffRecord::kUnknown_Result:
@@ -274,7 +274,7 @@
         pathRelativeToRootDir.append(fileName);
         if (string_contains_any_of(pathRelativeToRootDir, matchSubstrings) &&
             !string_contains_any_of(pathRelativeToRootDir, nomatchSubstrings)) {
-            files->push_back(new SkString(pathRelativeToRootDir));
+            files->push(new SkString(pathRelativeToRootDir));
         }
     }
 
@@ -516,7 +516,7 @@
             get_bounds(*drp);
         }
         SkASSERT(DiffRecord::kUnknown_Result != drp->fResult);
-        differences->push_back(drp);
+        differences->push(drp);
         summary->add(drp);
     }
 
@@ -537,7 +537,7 @@
         if (getBounds) {
             get_bounds(*drp);
         }
-        differences->push_back(drp);
+        differences->push(drp);
         summary->add(drp);
     }
 
@@ -558,7 +558,7 @@
         if (getBounds) {
             get_bounds(*drp);
         }
-        differences->push_back(drp);
+        differences->push(drp);
         summary->add(drp);
     }
 
@@ -705,7 +705,7 @@
             continue;
         }
         if (!strcmp(argv[i], "--match")) {
-            matchSubstrings.push_back(new SkString(argv[++i]));
+            matchSubstrings.push(new SkString(argv[++i]));
             continue;
         }
         if (!strcmp(argv[i], "--nocolorspace")) {
@@ -717,7 +717,7 @@
             continue;
         }
         if (!strcmp(argv[i], "--nomatch")) {
-            nomatchSubstrings.push_back(new SkString(argv[++i]));
+            nomatchSubstrings.push(new SkString(argv[++i]));
             continue;
         }
         if (!strcmp(argv[i], "--noprintdirs")) {
@@ -809,7 +809,7 @@
     // If no matchSubstrings were specified, match ALL strings
     // (except for whatever nomatchSubstrings were specified, if any).
     if (matchSubstrings.isEmpty()) {
-        matchSubstrings.push_back(new SkString(""));
+        matchSubstrings.push(new SkString(""));
     }
 
     create_diff_images(diffProc, colorThreshold, ignoreColorSpace, &differences,
diff --git a/tools/viewer/ImGuiLayer.cpp b/tools/viewer/ImGuiLayer.cpp
index 3ed94a0..fe55a61 100644
--- a/tools/viewer/ImGuiLayer.cpp
+++ b/tools/viewer/ImGuiLayer.cpp
@@ -124,9 +124,9 @@
         pos.rewind(); uv.rewind(); color.rewind();
         for (int i = 0; i < drawList->VtxBuffer.size(); ++i) {
             const ImDrawVert& vert = drawList->VtxBuffer[i];
-            pos.push_back(SkPoint::Make(vert.pos.x, vert.pos.y));
-            uv.push_back(SkPoint::Make(vert.uv.x, vert.uv.y));
-            color.push_back(vert.col);
+            pos.push(SkPoint::Make(vert.pos.x, vert.pos.y));
+            uv.push(SkPoint::Make(vert.uv.x, vert.uv.y));
+            color.push(vert.col);
         }
         // ImGui colors are RGBA
         SkSwapRB(color.begin(), color.begin(), color.count());