From 6bc8cf8f647002909bd4e437a442ec69c98028f6 Mon Sep 17 00:00:00 2001 From: "scroggo@google.com" Date: Fri, 31 Aug 2012 18:34:09 +0000 Subject: [PATCH] Fix windows build of tools. Review URL: https://codereview.appspot.com/6494068 git-svn-id: http://skia.googlecode.com/svn/trunk@5374 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tools/PictureRenderer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp index 3429285cfd..0bc3df10c2 100644 --- a/tools/PictureRenderer.cpp +++ b/tools/PictureRenderer.cpp @@ -335,7 +335,8 @@ void TiledPictureRenderer::drawTiles() { writer.endRecording(); // Create and start the threads. - TileData* tileData[fTiles.count()]; + TileData** tileData = SkNEW_ARRAY(TileData*, fTiles.count()); + SkAutoTDeleteArray deleteTileData(tileData); for (int i = 0; i < fTiles.count(); i++) { tileData[i] = SkNEW_ARGS(TileData, (fTiles[i], &controller)); if (!tileData[i]->fThread.start()) { @@ -350,7 +351,8 @@ void TiledPictureRenderer::drawTiles() { SkPicture* clones = SkNEW_ARRAY(SkPicture, fTiles.count()); SkAutoTDeleteArray autodelete(clones); fPicture->clone(clones, fTiles.count()); - CloneData* cloneData[fTiles.count()]; + CloneData** cloneData = SkNEW_ARRAY(CloneData*, fTiles.count()); + SkAutoTDeleteArray deleteCloneData(cloneData); for (int i = 0; i < fTiles.count(); i++) { cloneData[i] = SkNEW_ARGS(CloneData, (fTiles[i], &clones[i])); if (!cloneData[i]->fThread.start()) {