aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GrSurfaceTest.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-04-30 14:18:54 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-30 14:18:54 -0700
commitd309e7aa0efa2d5dd7e7b1af97026fcd3a047e98 (patch)
tree28290abc67fd60111bba896722a14dcb0611df84 /tests/GrSurfaceTest.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.
Diffstat (limited to 'tests/GrSurfaceTest.cpp')
-rw-r--r--tests/GrSurfaceTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index 094ca7829a..685bf41874 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -27,7 +27,7 @@ DEF_GPUTEST(GrSurface, reporter, factory) {
desc.fWidth = 256;
desc.fHeight = 256;
desc.fSampleCnt = 0;
- GrSurface* texRT1 = context->createTexture(desc, false, NULL, 0);
+ GrSurface* texRT1 = context->textureProvider()->createTexture(desc, false, NULL, 0);
REPORTER_ASSERT(reporter, texRT1 == texRT1->asRenderTarget());
REPORTER_ASSERT(reporter, texRT1 == texRT1->asTexture());
@@ -39,7 +39,7 @@ DEF_GPUTEST(GrSurface, reporter, factory) {
static_cast<GrSurface*>(texRT1->asTexture()));
desc.fFlags = kNone_GrSurfaceFlags;
- GrSurface* tex1 = context->createTexture(desc, false, NULL, 0);
+ GrSurface* tex1 = context->textureProvider()->createTexture(desc, false, NULL, 0);
REPORTER_ASSERT(reporter, NULL == tex1->asRenderTarget());
REPORTER_ASSERT(reporter, tex1 == tex1->asTexture());
REPORTER_ASSERT(reporter, static_cast<GrSurface*>(tex1) == tex1->asTexture());
@@ -51,7 +51,7 @@ DEF_GPUTEST(GrSurface, reporter, factory) {
backendDesc.fHeight = 256;
backendDesc.fSampleCnt = 0;
backendDesc.fTextureHandle = 5;
- GrSurface* texRT2 = context->wrapBackendTexture(backendDesc);
+ GrSurface* texRT2 = context->textureProvider()->wrapBackendTexture(backendDesc);
REPORTER_ASSERT(reporter, texRT2 == texRT2->asRenderTarget());
REPORTER_ASSERT(reporter, texRT2 == texRT2->asTexture());
REPORTER_ASSERT(reporter, static_cast<GrSurface*>(texRT2->asRenderTarget()) ==