未验证 提交 e2d9c603 编写于 作者: E Emmanuel Garcia 提交者: GitHub

Flush background canvas before allocating a new surface (#17308)

上级 5fddb9be
...@@ -451,6 +451,9 @@ bool FlutterPlatformViewsController::SubmitFrame(GrContext* gr_context, ...@@ -451,6 +451,9 @@ bool FlutterPlatformViewsController::SubmitFrame(GrContext* gr_context,
std::shared_ptr<IOSContext> ios_context, std::shared_ptr<IOSContext> ios_context,
SkCanvas* background_canvas) { SkCanvas* background_canvas) {
DisposeViews(); DisposeViews();
// Resolve all pending GPU operations before allocating a new surface.
background_canvas->flush();
// Clipping the background canvas before drawing the picture recorders requires to // Clipping the background canvas before drawing the picture recorders requires to
// save and restore the clip context. // save and restore the clip context.
SkAutoCanvasRestore save(background_canvas, /*doSave=*/true); SkAutoCanvasRestore save(background_canvas, /*doSave=*/true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册