aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-03-29 13:06:57 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-29 18:28:02 +0000
commit769e80d23d1c1d240b1d510034ec57d19e768d07 (patch)
tree851e8c62bb7b3260ca5e41b1951e4678f95e1770 /tests
parent3e306f6bf40c4ade5e1c216fcc8043006d7dbcee (diff)
More GrSurfaceProxy-clean up
Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: I1ee39a23c749e420dce0ad561ee1c8b09bdcc763 Reviewed-on: https://skia-review.googlesource.com/10485 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/IntTextureTest.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/IntTextureTest.cpp b/tests/IntTextureTest.cpp
index 346f56bc68..8ef57318ed 100644
--- a/tests/IntTextureTest.cpp
+++ b/tests/IntTextureTest.cpp
@@ -221,6 +221,9 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(IntTexture, reporter, ctxInfo) {
}
texture->writePixels(0, 0, kS, kS, kRGBA_8888_sint_GrPixelConfig, testData.get());
+ sk_sp<GrTextureProxy> intTextureProxy = GrSurfaceProxy::MakeWrapped(sk_ref_sp(texture));
+ texture = nullptr; // unused from here on out
+
sk_sp<GrRenderTargetContext> rtContext = context->makeRenderTargetContext(
SkBackingFit::kExact, kS, kS, kRGBA_8888_GrPixelConfig, nullptr);
@@ -234,7 +237,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(IntTexture, reporter, ctxInfo) {
};
for (auto filter : kNamedFilters) {
- sk_sp<GrFragmentProcessor> fp(GrSimpleTextureEffect::Make(texture, nullptr,
+ sk_sp<GrFragmentProcessor> fp(GrSimpleTextureEffect::Make(context->resourceProvider(),
+ intTextureProxy, nullptr,
SkMatrix::I(),
filter.fMode));
REPORTER_ASSERT(reporter, fp);