diff options
author | John Reck <jreck@google.com> | 2016-02-26 15:01:52 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2016-02-26 15:43:09 -0800 |
commit | fc736869aced442057e5a2c16a9591dca1f93295 (patch) | |
tree | 2c6d93e824ed81ffccb35c6c782fbd34b534229a /libs/hwui/renderthread/EglManager.cpp | |
parent | c96955d9bb997b51be5fa929b5a67349d0459c3a (diff) |
Switch to pbuffer surface sooner
Bug: 27286867
If the system/app is slow, it might take too long to
stop drawing. Switch the ordering of destroying stuff so
that we switch to the pbuffer surface first, then do
cleanup
Change-Id: If64a3dbb71bb9fd53567231590436a89b2f1a09e
Diffstat (limited to 'libs/hwui/renderthread/EglManager.cpp')
-rw-r--r-- | libs/hwui/renderthread/EglManager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp index ac6a28fe6289..8def7ad03d34 100644 --- a/libs/hwui/renderthread/EglManager.cpp +++ b/libs/hwui/renderthread/EglManager.cpp @@ -270,6 +270,12 @@ bool EglManager::makeCurrent(EGLSurface surface, EGLint* errOut) { // Ensure we always have a valid surface & context surface = mPBufferSurface; } + // TODO: Temporary to help diagnose b/27286867 + if (mCurrentSurface == mPBufferSurface || surface == mPBufferSurface) { + ALOGD("Switching from surface %p%s to %p%s", mCurrentSurface, + mCurrentSurface == mPBufferSurface ? " (pbuffer)" : "", + surface, surface == mPBufferSurface ? " (pbuffer)" : ""); + } if (!eglMakeCurrent(mEglDisplay, surface, surface, mEglContext)) { if (errOut) { *errOut = eglGetError(); |