diff options
author | 2017-12-07 12:33:05 -0500 | |
---|---|---|
committer | 2017-12-07 17:56:59 +0000 | |
commit | 384fab467e2a5f1754ec26eecde946ce28046d20 (patch) | |
tree | c19ad170f2932c666c937736be71237c335e79b3 /tests | |
parent | 1cfb6bc9b63e9840d198a1ea8b1a20da2bfde818 (diff) |
sk_spification of GrGpu creation.
Make GrContext::MakeGL take interface as sk_sp.
Make GrContext::MakeVulkan take GrVkBackendContext as sk_sp.
Change-Id: I13c22a57bd281c51738f503d9ed3418d35a466df
Reviewed-on: https://skia-review.googlesource.com/81842
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/EGLImageTest.cpp | 2 | ||||
-rw-r--r-- | tests/GpuSampleLocationsTest.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/EGLImageTest.cpp b/tests/EGLImageTest.cpp index 82e4c4bb55..53ff6f94f5 100644 --- a/tests/EGLImageTest.cpp +++ b/tests/EGLImageTest.cpp @@ -63,7 +63,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(EGLImageTest, reporter, ctxInfo) { if (!glCtx1) { return; } - sk_sp<GrContext> context1 = GrContext::MakeGL(glCtx1->gl()); + sk_sp<GrContext> context1 = GrContext::MakeGL(sk_ref_sp(glCtx1->gl())); const GrGLTextureInfo* backendTexture1 = nullptr; GrEGLImage image = GR_EGL_NO_IMAGE; GrGLTextureInfo externalTexture; diff --git a/tests/GpuSampleLocationsTest.cpp b/tests/GpuSampleLocationsTest.cpp index e78006344c..de15e03389 100644 --- a/tests/GpuSampleLocationsTest.cpp +++ b/tests/GpuSampleLocationsTest.cpp @@ -185,15 +185,15 @@ private: }; DEF_GPUTEST(GLSampleLocations, reporter, /* options */) { - GLTestSampleLocationsInterface testInterface; - sk_sp<GrContext> ctx(GrContext::MakeGL(&testInterface)); + auto testInterface = sk_make_sp<GLTestSampleLocationsInterface>(); + sk_sp<GrContext> ctx(GrContext::MakeGL(testInterface)); // This test relies on at least 2 samples. int supportedSample = ctx->caps()->getSampleCount(2, kRGBA_8888_GrPixelConfig); if (supportedSample < 2) { return; } - test_sampleLocations(reporter, &testInterface, ctx.get()); + test_sampleLocations(reporter, testInterface.get(), ctx.get()); } #endif |