GrTextureProxy* fAtlas; }; private: skiatest::Reporter* fReporter; bool fHasOpTexture; bool fHasClipTexture; }; DEF_GPUTEST(LazyProxyTest, reporter, /* options */) { GrMockOptions mockOptions; mockOptions.fConfigOptions[kAlpha_half_GrPixelConfig].fRenderability = GrMockOptions::ConfigOptions::Renderability::kNonMSAA; mockOptions.fConfigOptions[kAlpha_half_GrPixelConfig].fTexturable = true; sk_sp<GrContext> ctx = GrContext::MakeMock(&mockOptions, GrContextOptions()); GrProxyProvider* proxyProvider = ctx->contextPriv().proxyProvider(); for (bool nullTexture : {false, true}) { LazyProxyTest test(reporter); ctx->contextPriv().addOnFlushCallbackObject(&test); sk_sp<GrRenderTargetContext> rtc = ctx->makeDeferredRenderTargetContext(SkBackingFit::kExact, 100, 100, kRGBA_8888_GrPixelConfig, nullptr); REPORTER_ASSERT(reporter, rtc); sk_sp<GrRenderTargetContext> mockAtlas = ctx->makeDeferredRenderTargetContext(SkBackingFit::kExact, 10, 10, kAlpha_half_GrPixelConfig, nullptr); REPORTER_ASSERT(reporter, mockAtlas); rtc->priv().testingOnly_addDrawOp(LazyProxyTest::Clip(&test, mockAtlas->asTextureProxy()), skstd::make_unique<LazyProxyTest::Op>(proxyProvider, &test, nullTexture)); ctx->contextPriv().testingOnly_flushAndRemoveOnFlushCallbackObject(&test); }