summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-10-27 12:58:47 -0700
committerJohn Reck <jreck@google.com>2014-10-27 13:23:20 -0700
commit950ff1b88cc1330f8e80d62ed3aa15bee6be0556 (patch)
tree5d51f8cafc49747128a34a97f86d01f92e5b63d6 /libs/hwui
parente67b8d28294d9af440d2ea23f1b2c68dfcba8b1b (diff)
downloadframeworks_base-950ff1b88cc1330f8e80d62ed3aa15bee6be0556.zip
frameworks_base-950ff1b88cc1330f8e80d62ed3aa15bee6be0556.tar.gz
frameworks_base-950ff1b88cc1330f8e80d62ed3aa15bee6be0556.tar.bz2
Be more conservative about current buffer
Bug: 18065565 Change-Id: I0b9c85ecf384ebe525e3a38803ab77d7ee37f33a
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/renderthread/EglManager.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp
index 760fc15..e37aafc 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() {