Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e0b68d39 authored by Aurélien Pomini's avatar Aurélien Pomini
Browse files

Don't recycle the bitmap on CanvasEngine.onDestroy

A crash was possible due to race conditions if CanvasEngine.onDestroy is called before drawFrame has enough time to finish drawing.

We don't want to recycle the bitmap when onDestroy is called. The bitmap will be automatically recycled after loading, once the frame is drawn. We simply wait for the automatic recycling. This is similar to what was done in GLEngine.onDestroy: a message is queued to destroy the GL context, so the GLEngine first waits that other operations (i.e. drawFrame) are finished before unloading.

Bug: 255920551
Test: manual
Test: atest ImageWallpaperTest
Change-Id: I45b99f572dd89926ccdc1632abb20442bafcf854
parent 44e56a81
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment