| Index: gm/texdata.cpp
|
| diff --git a/gm/texdata.cpp b/gm/texdata.cpp
|
| index 645ced1e670586e40640a60341f358ed4ac77c29..d2e5d05b485d4b66a2ef283d5498d55469b12793 100644
|
| --- a/gm/texdata.cpp
|
| +++ b/gm/texdata.cpp
|
| @@ -42,7 +42,7 @@ protected:
|
| GrRenderTarget* target = device->accessRenderTarget();
|
| GrContext* ctx = GM::GetGr(canvas);
|
| if (ctx && target) {
|
| - SkPMColor gTextureData[(2 * S) * (2 * S)];
|
| + SkAutoTArray<SkPMColor> gTextureData((2 * S) * (2 * S));
|
| static const int stride = 2 * S;
|
| static const SkPMColor gray = SkPackARGB32(0x40, 0x40, 0x40, 0x40);
|
| static const SkPMColor white = SkPackARGB32(0xff, 0xff, 0xff, 0xff);
|
| @@ -88,7 +88,7 @@ protected:
|
| desc.fWidth = 2 * S;
|
| desc.fHeight = 2 * S;
|
| GrTexture* texture =
|
| - ctx->createUncachedTexture(desc, gTextureData, 0);
|
| + ctx->createUncachedTexture(desc, gTextureData.get(), 0);
|
|
|
| if (!texture) {
|
| return;
|
| @@ -127,7 +127,7 @@ protected:
|
| }
|
| }
|
| texture->writePixels(S, (i ? 0 : S), S, S,
|
| - texture->config(), gTextureData,
|
| + texture->config(), gTextureData.get(),
|
| 4 * stride);
|
| ctx->drawRect(paint, SkRect::MakeWH(2*S, 2*S));
|
| }
|
|
|