From 95ed55adc6b8f0cee063c2cf2e14782773b0087f Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Thu, 24 Jan 2013 14:46:47 +0000 Subject: Make all GrContext members that return a texture also ref the texture for the caller. Review URL: https://codereview.appspot.com/7198049 git-svn-id: http://skia.googlecode.com/svn/trunk@7362 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/effects/GrTextureStripAtlas.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/gpu/effects') diff --git a/src/gpu/effects/GrTextureStripAtlas.cpp b/src/gpu/effects/GrTextureStripAtlas.cpp index bd256c5745..9081fb6f1d 100644 --- a/src/gpu/effects/GrTextureStripAtlas.cpp +++ b/src/gpu/effects/GrTextureStripAtlas.cpp @@ -202,7 +202,7 @@ void GrTextureStripAtlas::lockTexture() { memset(key.fData32 + 1, 0, sizeof(key) - sizeof(uint32_t)); GrCacheID cacheID(gTextureStripAtlasDomain, key); - fTexture = fDesc.fContext->findTexture(texDesc, cacheID, ¶ms); + fTexture = fDesc.fContext->findAndRefTexture(texDesc, cacheID, ¶ms); if (NULL == fTexture) { fTexture = fDesc.fContext->createTexture(¶ms, texDesc, cacheID, NULL, 0); // This is a new texture, so all of our cache info is now invalid @@ -210,7 +210,6 @@ void GrTextureStripAtlas::lockTexture() { fKeyTable.rewind(); } GrAssert(NULL != fTexture); - fTexture->ref(); } void GrTextureStripAtlas::unlockTexture() { @@ -345,4 +344,3 @@ void GrTextureStripAtlas::validate() { } } #endif - -- cgit v1.2.3