aboutsummaryrefslogtreecommitdiff
path: root/tests/GLProgramsTest.cpp
diff options
context:
space:
mode:
authorbsalomon <bsalomon@google.com>2015-04-30 14:18:54 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-30 14:18:54 -0700
commitd309e7aa0efa2d5dd7e7b1af97026fcd3a047e98 (patch)
tree28290abc67fd60111bba896722a14dcb0611df84 /tests/GLProgramsTest.cpp
parent3ffa126066542590dc7430514a1174e49191b875 (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 'tests/GLProgramsTest.cpp')
-rw-r--r--tests/GLProgramsTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index c12e5e8781..1d7beecc75 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -115,11 +115,11 @@ static GrRenderTarget* random_render_target(GrContext* context, SkRandom* random
builder[0] = texDesc.fOrigin;
builder.finish();
- GrTexture* texture = context->findAndRefCachedTexture(key);
+ GrTexture* texture = context->textureProvider()->findAndRefTextureByUniqueKey(key);
if (!texture) {
- texture = context->createTexture(texDesc, true);
+ texture = context->textureProvider()->createTexture(texDesc, true);
if (texture) {
- context->addResourceToCache(key, texture);
+ context->textureProvider()->assignUniqueKeyToTexture(key, texture);
}
}
return texture ? texture->asRenderTarget() : NULL;