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

Unified Diff: tests/GrTextureStripAtlasTest.cpp

Issue 2272953003: Fix leak in GrTextureStripAtlasTest (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months 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: tests/GrTextureStripAtlasTest.cpp
diff --git a/tests/GrTextureStripAtlasTest.cpp b/tests/GrTextureStripAtlasTest.cpp
index a6e98207a0fdaacc4a0d57161db5d6646bbb635b..60b8a6dcc4601855113be2dc2a7613573f7379ac 100644
--- a/tests/GrTextureStripAtlasTest.cpp
+++ b/tests/GrTextureStripAtlasTest.cpp
@@ -52,7 +52,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrTextureStripAtlasFlush, reporter, ctxInfo)
SkBitmap bitmap;
bitmap.allocPixels(info, rowBytes);
memset(bitmap.getPixels(), 1, rowBytes * desc.fHeight);
- atlas->lockRow(bitmap);
+ int row = atlas->lockRow(bitmap);
if (!context->caps()->preferVRAMUseOverFlushes())
REPORTER_ASSERT(reporter, texture == atlas->getTexture());
@@ -65,6 +65,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrTextureStripAtlasFlush, reporter, ctxInfo)
!memcmp(pixels.get(), actualPixels.get(),
sizeof(uint32_t) * desc.fWidth * desc.fHeight));
target->unref();
+ atlas->unlockRow(row);
}
#endif
« 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