aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrTextureStripAtlas.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-24 14:46:47 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-24 14:46:47 +0000
commit95ed55adc6b8f0cee063c2cf2e14782773b0087f (patch)
tree0ff40233b89b318ba9eb573cc90dbf3e43c71da7 /src/gpu/effects/GrTextureStripAtlas.cpp
parentbaa0220dfddda3cd44f0ffb5f95a4a60443eb8c3 (diff)
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
Diffstat (limited to 'src/gpu/effects/GrTextureStripAtlas.cpp')
-rw-r--r--src/gpu/effects/GrTextureStripAtlas.cpp4
1 files changed, 1 insertions, 3 deletions
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, &params);
+ fTexture = fDesc.fContext->findAndRefTexture(texDesc, cacheID, &params);
if (NULL == fTexture) {
fTexture = fDesc.fContext->createTexture(&params, 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
-