diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 8f69387993..12e2c0e1d0 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -1515,7 +1515,7 @@ bool GPUSink::readBack(SkSurface* surface, SkBitmap* dst) const { Result GPUSink::onDraw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log, const GrContextOptions& baseOptions, - std::function initContext) const { + std::function initContext) const { GrContextOptions grOptions = baseOptions; // 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* return result; } - auto precompileShaders = [&memoryCache](GrContext* context) { - memoryCache.foreach([context](sk_sp key, sk_sp data, int /*count*/) { - SkAssertResult(context->precompileShader(*key, *data)); + auto precompileShaders = [&memoryCache](GrDirectContext* dContext) { + memoryCache.foreach([dContext](sk_sp key, + sk_sp data, + int /*count*/) { + SkAssertResult(dContext->precompileShader(*key, *data)); }); }; @@ -1911,7 +1913,7 @@ Result GPUDDLSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log // with the main context ContextInfo otherCtxInfo = factory.getSharedContextInfo(mainCtx); sk_gpu_test::TestContext* otherTestCtx = otherCtxInfo.testContext(); - GrContext* otherCtx = otherCtxInfo.grContext(); + auto otherCtx = otherCtxInfo.directContext(); if (!otherCtx) { return Result::Fatal("Cound not create shared context."); } diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h index 23fd003307..015de62fde 100644 --- a/dm/DMSrcSink.h +++ b/dm/DMSrcSink.h @@ -386,7 +386,7 @@ public: Result draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; Result onDraw(const Src&, SkBitmap*, SkWStream*, SkString*, const GrContextOptions& baseOptions, - std::function initContext = nullptr) const; + std::function initContext = nullptr) const; sk_gpu_test::GrContextFactory::ContextType contextType() const { return fContextType; } const sk_gpu_test::GrContextFactory::ContextOverrides& contextOverrides() const {