Make GM::onGpuSetup take a GrDirectContext This should, hopefully, clarify the role of onGpuSetup vis a vis onDraw. The remaining tools are updated in: https://skia-review.googlesource.com/c/skia/+/300220/ (Update remaining tools to GrDirectContext) Change-Id: I19d6eec4d16cb9ebad8924763a18225cc871f0f2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300172 Reviewed-by: Adlai Holler <[email protected]> Commit-Queue: Robert Phillips <[email protected]>
diff --git a/dm/DMGpuTestProcs.cpp b/dm/DMGpuTestProcs.cpp index e9369d5..6c3eb4c 100644 --- a/dm/DMGpuTestProcs.cpp +++ b/dm/DMGpuTestProcs.cpp
@@ -7,6 +7,8 @@ #include "tests/Test.h" +#include "include/gpu/GrDirectContext.h" + using sk_gpu_test::GrContextFactory; using sk_gpu_test::GLTestContext; using sk_gpu_test::ContextInfo; @@ -65,12 +67,12 @@ } ReporterContext ctx(reporter, SkString(GrContextFactory::ContextTypeName(contextType))); - if (ctxInfo.grContext()) { + if (ctxInfo.directContext()) { (*test)(reporter, ctxInfo); // In case the test changed the current context make sure we move it back before // calling flush. ctxInfo.testContext()->makeCurrent(); - ctxInfo.grContext()->flushAndSubmit(); + ctxInfo.directContext()->flushAndSubmit(); } } }