diff --git a/src/gpu/ganesh/GrDirectContext.cpp b/src/gpu/ganesh/GrDirectContext.cpp index 8258b7684ef8..8e1f76cef8c9 100644 --- a/src/gpu/ganesh/GrDirectContext.cpp +++ b/src/gpu/ganesh/GrDirectContext.cpp @@ -1235,10 +1235,9 @@ sk_sp GrDirectContext::MakeMetal(void* device, void* queue) { // remove include/gpu/mtl/GrMtlBackendContext.h, above, when removed sk_sp GrDirectContext::MakeMetal(void* device, void* queue, const GrContextOptions& options) { - sk_sp direct(new GrDirectContext(GrBackendApi::kMetal, options)); GrMtlBackendContext backendContext = {}; - backendContext.fDevice.reset(device); - backendContext.fQueue.reset(queue); + backendContext.fDevice.retain(device); + backendContext.fQueue.retain(queue); return GrDirectContext::MakeMetal(backendContext, options); }