Fix 3Dmark crash - preserve more host connections
The CL
https://googleplex-android-review.git.corp.google.com/#/c/
1131769/
for killing host connections was too aggressive.
It incorrectly assumed that if eglInitialize was not called in the
current thread, it'd be treated as a gralloc-only connection.
It's perfectly possible to create a new thread,
not call eglInitialize, and call eglCreateContext instead,
which is within proper usage since after there is supposed
to be only one display per process.
This situation resulted in 3DMark crashing, because once the
connection is killed on a thread that is not actually gralloc-only,
all the state goes away and segfault is just a matter of time.
This CL makes it so that eglCreateContext / eglMakeCurrent
mark the connection as not gralloc only, preventing the
connection from being erroneously killed.
The behavior where no extra render threads are created
when opening recents is still preserved.
(Cherry-pick from
ebff5363850076de2623b6f6a0ff035ea3e823d5)
Change-Id: I20a204aefca91e5ac8f6b097d9fcd799f6b02583