80b3cd6bc608c5929096e3407de2b157be925d3e
Until now a leak was possible under the following scenario: Create a GLSurfaceView Register a renderer (this automatically starts a GLThread). Discard the GLSurfaceView without installing it in the view system. This scenario can occur when a device is rotated rapidly from orientation A to orientation B to orientation C. In that scenario, orientation B's GLSurfaceView might be discarded without ever being attached to a window. If this issue had been identified before GLSurfaceView had clients, one possible fix would have been to delay the construction of the GLThread until the GLSurfaceView was attached to a window. Unfortunately, it's too late, and so making that change would lead to observable changes in behavior, possibly breaking some clients. Instead, fixed by making GLThread and EGLHelper static classes that hold onto a weak reference to the GLSurfaceView. This allows the GLSurfaceView to be garbage collected when it is no longer used, even if the GLThread is active. GLSurfaceView's finalize method will manually stop the GLThread if it is still running when the GLSurfaceView exits. Part of this change was to remove the Renderer reference from GLThread, because Renderer is a user-supplied class that could contain a reference chain that points back to the GLSurfaceView. Fixes b/5606613 "GLSurfaceView that's never added to a window will leak threads and views, can leak activities" Change-Id: Iafdc329eb6e9e40062358e7c119f5547ffe23d5e
am
9a176507
: am b7a000a6
: Merge "Unhide the key to retriever location information in 3gp/mp4 files" into ics-mr1
am
30870e32
: am 19b1c12b
: Merge "Docs: update state list drawable with state_activated and revise selected/focused" into ics-mr0
am
738d8cae
: am c93a151f
: Merge "Define, document, and test the behavior of very large SurfaceTextures" into ics-mr1
am
716747f7
: am 481ffa50
: Merge "Fix for issue 5309336 -add videoeditor maximum prefetch YUV frames in media_profiles.xml to limit the total memory usage." into ics-mr1
am
556a406c
: am 3aa684ec
: Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1
am
716747f7
: am 481ffa50
: Merge "Fix for issue 5309336 -add videoeditor maximum prefetch YUV frames in media_profiles.xml to limit the total memory usage." into ics-mr1
am
9ebb030a
: am e5129d7f
: Merge "Defer adding large icon until when we compose the final notification. (Bug 5566846)" into ics-mr1
…
Description
No description provided
Languages
Java
77.3%
Kotlin
9.2%
PowerBuilder
6.6%
C++
5.5%
AIDL
1%