diff options
author | Roman Kiryanov <rkir@google.com> | 2019-08-02 14:37:53 -0700 |
---|---|---|
committer | Roman Kiryanov <rkir@google.com> | 2019-08-02 14:37:53 -0700 |
commit | 6073613967b1b0ba070549291b33fc05de79114b (patch) | |
tree | f144c7ce16b8d72e92d587f1bd765e3e91051bbe /libs/hwui/renderthread/EglManager.cpp | |
parent | 5c5daf9a9f41b3a67cc4d3c2ce7d06f53ce1d1ee (diff) |
Crash in createPBufferSurface if eglCreatePbufferSurface fails
EglManager::makeCurrent assumes mPBufferSurface has a valid
surface. This assumtion is not satisfied if
eglCreatePbufferSurface fails.
Bug: 138733217
Test: build
Change-Id: I580dca24f440accda458d53f988bb24cbabede36
Signed-off-by: Roman Kiryanov <rkir@google.com>
Diffstat (limited to 'libs/hwui/renderthread/EglManager.cpp')
-rw-r--r-- | libs/hwui/renderthread/EglManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp index 159cf497384a..da27c1ff9044 100644 --- a/libs/hwui/renderthread/EglManager.cpp +++ b/libs/hwui/renderthread/EglManager.cpp @@ -289,6 +289,10 @@ void EglManager::createPBufferSurface() { if (mPBufferSurface == EGL_NO_SURFACE && !EglExtensions.surfacelessContext) { EGLint attribs[] = {EGL_WIDTH, 1, EGL_HEIGHT, 1, EGL_NONE}; mPBufferSurface = eglCreatePbufferSurface(mEglDisplay, mEglConfig, attribs); + LOG_ALWAYS_FATAL_IF(mPBufferSurface == EGL_NO_SURFACE, + "Failed to create a pixel buffer display=%p, " + "mEglConfig=%p, error=%s", + mEglDisplay, mEglConfig, eglErrorString()); } } |