@@ -489,12 +489,11 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrContext_colorTypeSupportedAsImage, reporter
489489
490490 auto mbet = sk_gpu_test::ManagedBackendTexture::MakeWithoutData (
491491 dContext, kSize , kSize , colorType, GrMipmapped::kNo , GrRenderable::kNo );
492- if (!mbet) {
493- ERRORF (reporter, " Could not create texture with color type %d." , colorType);
494- continue ;
492+ sk_sp<SkImage> img;
493+ if (mbet) {
494+ img = SkImage::MakeFromTexture (dContext, mbet->texture (), kTopLeft_GrSurfaceOrigin ,
495+ colorType, kOpaque_SkAlphaType , nullptr );
495496 }
496- auto img = SkImage::MakeFromTexture (dContext, mbet->texture (), kTopLeft_GrSurfaceOrigin ,
497- colorType, kOpaque_SkAlphaType , nullptr );
498497 REPORTER_ASSERT (reporter, can == SkToBool (img),
499498 " colorTypeSupportedAsImage:%d, actual:%d, ct:%d" , can, SkToBool (img),
500499 colorType);
@@ -839,6 +838,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SkImage_NewFromTextureRelease, reporter, c
839838 GrProtected::kNo );
840839 if (!mbet) {
841840 ERRORF (reporter, " couldn't create backend texture\n " );
841+ return ;
842842 }
843843
844844 TextureReleaseChecker releaseChecker;
0 commit comments