Add a parameter GR_ALWAYS_ALLOCATE_ON_HEAP to allow for only ever creating temporary buffers on the heap instead of allowing stack allocation
Unfortunately this can't be a GR_GL_* config like we'd discussed because there are SkAutoSMalloc buffers that are built outside of gl/
R=bsalomon@google.com, bsalomon
BUG=skia:
Author: george@mozilla.com
Review URL: https://codereview.chromium.org/459263003
diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp
index 9f9ea13..5606fe3 100644
--- a/src/gpu/GrTextStrike.cpp
+++ b/src/gpu/GrTextStrike.cpp
@@ -306,7 +306,8 @@
int bytesPerPixel = GrMaskFormatBytesPerPixel(fMaskFormat);
size_t size = glyph->fBounds.area() * bytesPerPixel;
- SkAutoSMalloc<1024> storage(size);
+ GrAutoMalloc<1024> storage(size);
+
if (fUseDistanceField) {
if (!scaler->getPackedGlyphDFImage(glyph->fPackedID, glyph->width(),
glyph->height(),