summaryrefslogtreecommitdiff
path: root/libs/androidfw/ApkParsing.cpp
diff options
context:
space:
mode:
author Aurélien Pomini <pomini@google.com> 2022-10-28 14:42:23 +0000
committer Aurélien Pomini <pomini@google.com> 2022-10-28 17:06:24 +0000
commite0b68d396e3f72cd99934791080c988bf8f700b5 (patch)
tree46fbcc6def76c12d9b40195b0306907e6925637a /libs/androidfw/ApkParsing.cpp
parent44e56a8190cc8744c4008014408bfe037c6de41b (diff)
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
Diffstat (limited to 'libs/androidfw/ApkParsing.cpp')
0 files changed, 0 insertions, 0 deletions