Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1397)

Unified Diff: bench/SKPBench.cpp

Issue 730343003: Fix memory leak in nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SKPBench.cpp
diff --git a/bench/SKPBench.cpp b/bench/SKPBench.cpp
index fd8df429c2ad7ccb088f48e7c570a05628118039..3e692171dbbb1bb46888bcb2838cde46fcb8063b 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]);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698