aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrTextureStripAtlas.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-01-23 04:24:04 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-23 04:24:05 -0800
commit24db3b1c35fb935660229da164fc5ad31977387f (patch)
treebe22e794f54605ff37ef09df79b3e0869572b053 /src/gpu/effects/GrTextureStripAtlas.cpp
parentf98f2bb0e72df68320f707c8584e3c877ce98ec3 (diff)
Add specialized content key class for resources.
Diffstat (limited to 'src/gpu/effects/GrTextureStripAtlas.cpp')
-rw-r--r--src/gpu/effects/GrTextureStripAtlas.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/effects/GrTextureStripAtlas.cpp b/src/gpu/effects/GrTextureStripAtlas.cpp
index 134c99f452..2305586844 100644
--- a/src/gpu/effects/GrTextureStripAtlas.cpp
+++ b/src/gpu/effects/GrTextureStripAtlas.cpp
@@ -196,15 +196,15 @@ void GrTextureStripAtlas::lockTexture() {
texDesc.fHeight = fDesc.fHeight;
texDesc.fConfig = fDesc.fConfig;
- static const GrCacheID::Domain gTextureStripAtlasDomain = GrCacheID::GenerateDomain();
- GrCacheID::Key key;
- *key.fData32 = fCacheKey;
- memset(key.fData32 + 1, 0, sizeof(key) - sizeof(uint32_t));
- GrCacheID cacheID(gTextureStripAtlasDomain, key);
+ static const GrContentKey::Domain kDomain = GrContentKey::GenerateDomain();
+ GrContentKey key;
+ GrContentKey::Builder builder(&key, kDomain, 1);
+ builder[0] = static_cast<uint32_t>(fCacheKey);
+ builder.finish();
- fTexture = fDesc.fContext->findAndRefTexture(texDesc, cacheID, &params);
+ fTexture = fDesc.fContext->findAndRefTexture(texDesc, key, &params);
if (NULL == fTexture) {
- fTexture = fDesc.fContext->createTexture(&params, texDesc, cacheID, NULL, 0);
+ fTexture = fDesc.fContext->createTexture(&params, texDesc, key, NULL, 0);
// This is a new texture, so all of our cache info is now invalid
this->initLRU();
fKeyTable.rewind();