diff --git a/engine/src/flutter/shell/gpu/ganesh_context.cc b/engine/src/flutter/shell/gpu/ganesh_context.cc index 6f5de8b2548..bd3bac33b09 100644 --- a/engine/src/flutter/shell/gpu/ganesh_context.cc +++ b/engine/src/flutter/shell/gpu/ganesh_context.cc @@ -36,6 +36,7 @@ GaneshContext::GaneshContext(scoped_refptr gl_context) } GaneshContext::~GaneshContext() { + gr_context_->abandonContext(); } } // namespace shell diff --git a/engine/src/flutter/shell/gpu/rasterizer.cc b/engine/src/flutter/shell/gpu/rasterizer.cc index cd22c560f23..4d4ded4aa4f 100644 --- a/engine/src/flutter/shell/gpu/rasterizer.cc +++ b/engine/src/flutter/shell/gpu/rasterizer.cc @@ -68,6 +68,7 @@ void Rasterizer::DrawPicture(SkPicture* picture) { } void Rasterizer::OnOutputSurfaceDestroyed() { + CHECK(context_->MakeCurrent(surface_.get())); ganesh_surface_.reset(); ganesh_context_.reset(); context_ = nullptr;