summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueue.cpp
diff options
context:
space:
mode:
author Jesse Hall <jessehall@google.com> 2012-04-17 12:02:26 -0700
committer Jesse Hall <jessehall@google.com> 2012-04-17 14:52:13 -0700
commita0fef1c8bb22443402fb3aeda7ce70f7d5775b0a (patch)
treeb066ac923d302a003e58255dc6da584fdd0b1276 /libs/gui/BufferQueue.cpp
parent3aecbb0715cb6928e0530ff1e4caa9c0993cc371 (diff)
Fix deadlock when cleaning objects in eglTerminate
When eglTerminate() is called with a window surface still exists, a deadlock would occur since egl_display_t::terminate() holds a lock while destroying the window surface, which calls onWindowSurfaceDestroyed() which attempts to take the same lock. This change refactors the hibernation code and data into a separate object with its own lock, separate from the egl_display_t lock. This avoids the deadlock and better encapsulates the hibernation logic. The change also fixes a bug discovered incidentally while debugging: hibernating after calling eglTerminate() succeeds, but will cause awakens from subsequent eglInitialize() to fail. We will no longer hibernate a terminated display. Change-Id: If55e5bb603d4f8953babc439ffc8d8a60af103d9
Diffstat (limited to 'libs/gui/BufferQueue.cpp')
0 files changed, 0 insertions, 0 deletions