diff --git a/tests/GrTextureMipMapInvalidationTest.cpp b/tests/GrTextureMipMapInvalidationTest.cpp index 465721e3ce8f2..d651e35cdeb1e 100644 --- a/tests/GrTextureMipMapInvalidationTest.cpp +++ b/tests/GrTextureMipMapInvalidationTest.cpp @@ -14,7 +14,12 @@ #include "Test.h" // Tests that MIP maps are created and invalidated as expected when drawing to and from GrTextures. -DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrTextureMipMapInvalidationTest, reporter, ctxInfo) { +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrTextureMipMapInvalidationTest, reporter, ctxInfo) { + GrContext* context = ctxInfo.grContext(); + if (!context->priv().caps()->mipMapSupport()) { + return; + } + auto isMipped = [] (SkSurface* surf) { const GrTexture* texture = surf->makeImageSnapshot()->getTexture(); return GrMipMapped::kYes == texture->texturePriv().mipMapped(); @@ -24,7 +29,6 @@ DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrTextureMipMapInvalidationTest, reporter, ctxInf return surf->makeImageSnapshot()->getTexture()->texturePriv().mipMapsAreDirty(); }; - GrContext* context = ctxInfo.grContext(); auto info = SkImageInfo::MakeN32Premul(256, 256); for (auto allocateMips : {false, true}) { auto surf1 = SkSurface::MakeRenderTarget(context, SkBudgeted::kYes, info, 0,