@@ -1515,7 +1515,7 @@ bool GPUSink::readBack(SkSurface* surface, SkBitmap* dst) const {
15151515
15161516Result GPUSink::onDraw (const Src& src, SkBitmap* dst, SkWStream*, SkString* log,
15171517 const GrContextOptions& baseOptions,
1518- std::function<void (GrContext *)> initContext) const {
1518+ std::function<void (GrDirectContext *)> initContext) const {
15191519 GrContextOptions grOptions = baseOptions;
15201520
15211521 // We don't expect the src to mess with the persistent cache or the executor.
@@ -1675,9 +1675,11 @@ Result GPUPrecompileTestingSink::draw(const Src& src, SkBitmap* dst, SkWStream*
16751675 return result;
16761676 }
16771677
1678- auto precompileShaders = [&memoryCache](GrContext* context) {
1679- memoryCache.foreach ([context](sk_sp<const SkData> key, sk_sp<SkData> data, int /* count*/ ) {
1680- SkAssertResult (context->precompileShader (*key, *data));
1678+ auto precompileShaders = [&memoryCache](GrDirectContext* dContext) {
1679+ memoryCache.foreach ([dContext](sk_sp<const SkData> key,
1680+ sk_sp<SkData> data,
1681+ int /* count*/ ) {
1682+ SkAssertResult (dContext->precompileShader (*key, *data));
16811683 });
16821684 };
16831685
@@ -1911,7 +1913,7 @@ Result GPUDDLSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log
19111913 // with the main context
19121914 ContextInfo otherCtxInfo = factory.getSharedContextInfo(mainCtx);
19131915 sk_gpu_test::TestContext* otherTestCtx = otherCtxInfo.testContext();
1914- GrContext* otherCtx = otherCtxInfo.grContext ();
1916+ auto otherCtx = otherCtxInfo.directContext ();
19151917 if (!otherCtx) {
19161918 return Result::Fatal("Cound not create shared context.");
19171919 }
0 commit comments