aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar ajuma <ajuma@chromium.org>2016-08-24 12:09:12 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-24 12:09:12 -0700
commit8c99eabdd92d4fbdbcb74e979b527cdbf066b138 (patch)
treee22976a9bc680994fa8ab5635a0729fc11249036
parente55131c186116c0fe3ff8775f2a9d684174316bb (diff)
Fix leak in GrTextureStripAtlasTest
This is a followup to https://codereview.chromium.org/2262233002/, adding a missing call to GrTextureStripAtlas::unlockRow. BUG=chromium:637678 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2272953003 Review-Url: https://codereview.chromium.org/2272953003
-rw-r--r--tests/GrTextureStripAtlasTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/GrTextureStripAtlasTest.cpp b/tests/GrTextureStripAtlasTest.cpp
index a6e98207a0..60b8a6dcc4 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