aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextStrike.cpp
diff options
context:
space:
mode:
authorGravatar george <george@mozilla.com>2014-08-12 18:00:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-12 18:00:47 -0700
commitb62508be81839be96f3d935d1e568e2ff3663670 (patch)
tree47b9350e838bfc36d80672fc37544e5d278377ae /src/gpu/GrTextStrike.cpp
parentcc03adb90901d226e8b0252a187b19a68fabcc42 (diff)
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
Diffstat (limited to 'src/gpu/GrTextStrike.cpp')
-rw-r--r--src/gpu/GrTextStrike.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp
index 9f9ea130f6..5606fe3bcc 100644
--- a/src/gpu/GrTextStrike.cpp
+++ b/src/gpu/GrTextStrike.cpp
@@ -306,7 +306,8 @@ bool GrTextStrike::addGlyphToAtlas(GrGlyph* glyph, GrFontScaler* scaler) {
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(),