diff options
| author | 2020-03-18 15:35:48 -0700 | |
|---|---|---|
| committer | 2020-03-19 16:24:54 +0000 | |
| commit | c65e8644c524ab1c75e1596864940c2d8dcb8761 (patch) | |
| tree | 0e8695e5a43aa84546989701d995ed84a786d04c /opengl/libagl/TextureObjectManager.cpp | |
| parent | 2c728339cdbf856c34d93e9418d2a2f4a1cac8aa (diff) | |
Remove promoting weak pointer off main thread.
If a Layer weak pointer is promoted on a thread other than the main
thread, it risks calling the destructor off the main thread. This causes
a lot of issues since there is no lock held in the Layer destructor. The
destructor expects to only ever get called on the main thread
The change here stores a raw pointer instead of a weak pointer. This
should be safe since BufferLayerConsumer lifecycle follows the Layer
lifecycle so the raw Layer pointer will never be invalid.
Test: Not easy to reproduce but no issues with this change
Fixes: 150879387
Change-Id: I51fbc2ca5052c5dbf8e875b557a034d40e4a0b39
Diffstat (limited to 'opengl/libagl/TextureObjectManager.cpp')
0 files changed, 0 insertions, 0 deletions