diff options
Diffstat (limited to 'libs/hwui/renderthread/EglManager.cpp')
-rw-r--r-- | libs/hwui/renderthread/EglManager.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp index 760fc15a8cf7..e37aafcd63fa 100644 --- a/libs/hwui/renderthread/EglManager.cpp +++ b/libs/hwui/renderthread/EglManager.cpp @@ -105,11 +105,10 @@ bool EglManager::hasEglContext() { void EglManager::requireGlContext() { LOG_ALWAYS_FATAL_IF(mEglDisplay == EGL_NO_DISPLAY, "No EGL context"); - // We don't care *WHAT* surface is active, just that one is active to give - // us access to the GL context - if (mCurrentSurface == EGL_NO_SURFACE) { - usePBufferSurface(); - } + // We can't be certain about the state of the current surface (whether + // or not it is destroyed, for example), so err on the side of using + // the pbuffer surface which we fully control + usePBufferSurface(); } void EglManager::loadConfig() { |