diff options
author | robertphillips <robertphillips@google.com> | 2014-11-21 06:53:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-21 06:53:00 -0800 |
commit | 186a08ed72749976b533efe7abec062e20c48bda (patch) | |
tree | 68000b14d059d229ceb55eff4c5ef21f628c0e17 /bench/SKPBench.cpp | |
parent | 19996eda62181982d35c36e29515c1fe9c9fb2a3 (diff) |
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
Diffstat (limited to 'bench/SKPBench.cpp')
-rw-r--r-- | bench/SKPBench.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bench/SKPBench.cpp b/bench/SKPBench.cpp index fd8df429c2..3e692171db 100644 --- a/bench/SKPBench.cpp +++ b/bench/SKPBench.cpp @@ -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]); } |