mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Reset Shell::weak_factory_gpu_ on the raster thread (flutter/engine#20869)
This commit is contained in:
parent
f38bc774e7
commit
5aa323a30c
@ -400,13 +400,12 @@ Shell::~Shell() {
|
||||
|
||||
fml::TaskRunner::RunNowOrPostTask(
|
||||
task_runners_.GetRasterTaskRunner(),
|
||||
fml::MakeCopyable([rasterizer = std::move(rasterizer_),
|
||||
weak_factory_gpu = std::move(weak_factory_gpu_),
|
||||
&gpu_latch]() mutable {
|
||||
rasterizer.reset();
|
||||
weak_factory_gpu.reset();
|
||||
gpu_latch.Signal();
|
||||
}));
|
||||
fml::MakeCopyable(
|
||||
[this, rasterizer = std::move(rasterizer_), &gpu_latch]() mutable {
|
||||
rasterizer.reset();
|
||||
this->weak_factory_gpu_.reset();
|
||||
gpu_latch.Signal();
|
||||
}));
|
||||
gpu_latch.Wait();
|
||||
|
||||
fml::TaskRunner::RunNowOrPostTask(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user