Fix windows build of tools.
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 31 Aug 2012 18:34:09 +0000 (18:34 +0000)
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 31 Aug 2012 18:34:09 +0000 (18:34 +0000)
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

index 3429285..0bc3df1 100644 (file)
@@ -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<TileData*> 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<SkPicture> autodelete(clones);
             fPicture->clone(clones, fTiles.count());
-            CloneData* cloneData[fTiles.count()];
+            CloneData** cloneData = SkNEW_ARRAY(CloneData*, fTiles.count());
+            SkAutoTDeleteArray<CloneData*> deleteCloneData(cloneData);
             for (int i = 0; i < fTiles.count(); i++) {
                 cloneData[i] = SkNEW_ARGS(CloneData, (fTiles[i], &clones[i]));
                 if (!cloneData[i]->fThread.start()) {