diff options
Diffstat (limited to 'tests/SurfaceTest.cpp')
-rw-r--r-- | tests/SurfaceTest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp index bd3090cc8e..e74dcc915c 100644 --- a/tests/SurfaceTest.cpp +++ b/tests/SurfaceTest.cpp @@ -191,7 +191,10 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrContext_maxSurfaceSamplesForColorType, repo auto* gpu = ctxInfo.grContext()->contextPriv().getGpu(); GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( nullptr, kSize, kSize, colorType, true, GrMipMapped::kNo); - + if (!backendTex.isValid()) { + continue; + } + SkScopeExit freeTex([&backendTex, gpu] {gpu->deleteTestingOnlyBackendTexture(backendTex);}); auto info = SkImageInfo::Make(kSize, kSize, colorType, kOpaque_SkAlphaType, nullptr); auto surf = SkSurface::MakeFromBackendTexture(ctxInfo.grContext(), backendTex, kTopLeft_GrSurfaceOrigin, max, |