aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/EGLImageTest.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-07-25 10:05:01 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-25 14:33:03 +0000
commit02611d9afdd887ee443825ac88377f2eea093380 (patch)
tree3e35b4e4fde4b6f387f7bdb345b049c1ab76e182 /tests/EGLImageTest.cpp
parent10b6ad13f996d2f522bc057d17acea58e43a7f0b (diff)
Add Make[backend] calls for creating GrContexts
Docs-Preview: https://skia.org/?cl=26369 Bug: skia: Change-Id: I460ee63e466f85b05918479f068a2e5ca2d70550 Reviewed-on: https://skia-review.googlesource.com/26369 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/EGLImageTest.cpp')
-rw-r--r--tests/EGLImageTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/EGLImageTest.cpp b/tests/EGLImageTest.cpp
index 84a6bfdb7f..784ec5d99e 100644
--- a/tests/EGLImageTest.cpp
+++ b/tests/EGLImageTest.cpp
@@ -21,8 +21,9 @@
using sk_gpu_test::GLTestContext;
-static void cleanup(GLTestContext* glctx0, GrGLuint texID0, GLTestContext* glctx1, GrContext* grctx1,
- const GrGLTextureInfo* grbackendtex1, GrEGLImage image1) {
+static void cleanup(GLTestContext* glctx0, GrGLuint texID0, GLTestContext* glctx1,
+ sk_sp<GrContext> grctx1, const GrGLTextureInfo* grbackendtex1,
+ GrEGLImage image1) {
if (glctx1) {
glctx1->makeCurrent();
if (grctx1) {
@@ -31,7 +32,6 @@ static void cleanup(GLTestContext* glctx0, GrGLuint texID0, GLTestContext* glctx
GrBackendObject handle = reinterpret_cast<GrBackendObject>(grbackendtex1);
gpu1->deleteTestingOnlyBackendTexture(handle, false);
}
- grctx1->unref();
}
if (GR_EGL_NO_IMAGE != image1) {
glctx1->destroyEGLImage(image1);
@@ -63,7 +63,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(EGLImageTest, reporter, ctxInfo) {
if (!glCtx1) {
return;
}
- GrContext* context1 = GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)glCtx1->gl());
+ sk_sp<GrContext> context1 = GrContext::MakeGL(glCtx1->gl());
const GrGLTextureInfo* backendTexture1 = nullptr;
GrEGLImage image = GR_EGL_NO_IMAGE;
GrGLTextureInfo externalTexture;