Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index 282d6c4acc9f887a47af16b01831a5441191367e..180b1896c5814414277489937cf93f312b806fe5 100755 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -378,7 +378,11 @@ GrTexture* GrContext::createResizedTexture(const GrTextureDesc& desc, |
SkASSERT(!GrPixelConfigIsCompressed(desc.fConfig)); |
size_t bpp = GrBytesPerPixel(desc.fConfig); |
+#if GR_ALWAYS_ALLOCATE_ON_HEAP |
+ SkAutoMalloc stretchedPixels(bpp * rtDesc.fWidth * rtDesc.fHeight); |
+#else |
SkAutoSMalloc<128*128*4> stretchedPixels(bpp * rtDesc.fWidth * rtDesc.fHeight); |
+#endif |
stretch_image(stretchedPixels.get(), rtDesc.fWidth, rtDesc.fHeight, |
srcData, desc.fWidth, desc.fHeight, bpp); |