diff options
author | 2015-04-30 14:18:54 -0700 | |
---|---|---|
committer | 2015-04-30 14:18:54 -0700 | |
commit | d309e7aa0efa2d5dd7e7b1af97026fcd3a047e98 (patch) | |
tree | 28290abc67fd60111bba896722a14dcb0611df84 /src/gpu/effects/GrTextureStripAtlas.cpp | |
parent | 3ffa126066542590dc7430514a1174e49191b875 (diff) |
This replaces the texture creation/caching functions on GrContext with a GrTextureProvider interface. The goal is to pass this narrowly focused object in places that currently take a GrContext but don't need and shouldn't use its other methods. It also has an extended private interface for interacting with non-texture resource types.
Review URL: https://codereview.chromium.org/1107973004
Diffstat (limited to 'src/gpu/effects/GrTextureStripAtlas.cpp')
-rw-r--r-- | src/gpu/effects/GrTextureStripAtlas.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/effects/GrTextureStripAtlas.cpp b/src/gpu/effects/GrTextureStripAtlas.cpp index 65096bf650..8610691a43 100644 --- a/src/gpu/effects/GrTextureStripAtlas.cpp +++ b/src/gpu/effects/GrTextureStripAtlas.cpp @@ -204,13 +204,13 @@ void GrTextureStripAtlas::lockTexture() { builder[0] = static_cast<uint32_t>(fCacheKey); builder.finish(); - fTexture = fDesc.fContext->findAndRefCachedTexture(key); + fTexture = fDesc.fContext->textureProvider()->findAndRefTextureByUniqueKey(key); if (NULL == fTexture) { - fTexture = fDesc.fContext->createTexture(texDesc, true, NULL, 0); + fTexture = fDesc.fContext->textureProvider()->createTexture(texDesc, true, NULL, 0); if (!fTexture) { return; } - fDesc.fContext->addResourceToCache(key, fTexture); + fDesc.fContext->textureProvider()->assignUniqueKeyToTexture(key, fTexture); // This is a new texture, so all of our cache info is now invalid this->initLRU(); fKeyTable.rewind(); |