summaryrefslogtreecommitdiff
path: root/libs/androidfw/ApkParsing.cpp
diff options
context:
space:
mode:
author Patrick Williams <pdwilliams@google.com> 2023-06-06 13:38:43 -0500
committer Patrick Williams <pdwilliams@google.com> 2023-06-12 14:40:52 -0500
commit20ca02e27015e8ae53f4283500fb20933d55053c (patch)
treec396485f0cc42522920bf88ed8fa46320d22192f /libs/androidfw/ApkParsing.cpp
parent0673acc60e4fd9e39311b86852264ef8990a42aa (diff)
ScreenCaptureListenerWrapper - hold weak ref
This change should reduce the amount of time taken by Java's garbage collection to free hardware buffers. Without this change, cleaning up hardware buffers via GC required: * A GC cycle to collect ScreenCaptureListener * NativeAllocationRegistry to clean up ScreenCaptureListenerWrapper (this can be tens of seconds) * A second GC cycle to collect the consumer ScreenCaptureListenerWrapper referenced and the hardware buffer the consumer referenced With this change, ScreenCaptureListenerWrapper no longer holds a global reference to the consumer allowing GC to clean up unreferenced consumers immediately. The change also includes a small refactor of the interface used to create synchronous ScreenCaptureListeners. Bug: 283813337 Test: presumbits Change-Id: I318d73d6cbf2210db5e4386ab57e4ce3a3629166
Diffstat (limited to 'libs/androidfw/ApkParsing.cpp')
0 files changed, 0 insertions, 0 deletions