Fix memory leak in nanobench

This is cleanup for (Add MultiPictureDraw to nanobench - https://codereview.chromium.org/731973005/)

Review URL: https://codereview.chromium.org/730343003
This commit is contained in:
robertphillips 2014-11-21 06:53:00 -08:00 committed by Commit bot
parent 19996eda62
commit 186a08ed72

View File

@ -73,7 +73,8 @@ void SKPBench::onPerCanvasPostDraw(SkCanvas* canvas) {
// Draw the last set of tiles into the master canvas in case we're
// saving the images
for (int i = 0; i < fTileRects.count(); ++i) {
canvas->drawImage(fSurfaces[i]->newImageSnapshot(),
SkAutoTUnref<SkImage> image(fSurfaces[i]->newImageSnapshot());
canvas->drawImage(image,
SkIntToScalar(fTileRects[i].fLeft), SkIntToScalar(fTileRects[i].fTop));
SkSafeSetNull(fSurfaces[i]);
}