Skip to content

Commit

Permalink
Reset Shell::weak_factory_gpu_ on the raster thread (flutter#20869)
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-simmons authored Aug 31, 2020
1 parent 8ec8af7 commit 1bd9b8e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions shell/common/shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 1bd9b8e

Please sign in to comment.