diff options
author | Diego Wilson <diegowilson@google.com> | 2018-11-20 11:38:33 -0800 |
---|---|---|
committer | Bill Peckham <bpeckham@google.com> | 2018-12-05 17:57:49 -0800 |
commit | b76115be4efabffaa6febc57cec47acc2f933c79 (patch) | |
tree | 3c75adb1327eb78655b3bd8e1fd47db1a650b233 /libs/hwui/renderthread/EglManager.cpp | |
parent | b1a0dd53db11fb24b5937212720aa92fa70b4fdd (diff) | |
parent | 5a05000482abc03a74556ae0e289172eb0ae5607 (diff) |
Merge QP1A.181119.002
Change-Id: Ieb6ae3730e8b01f867f9b5120de1ab3067653d21
Diffstat (limited to 'libs/hwui/renderthread/EglManager.cpp')
-rw-r--r-- | libs/hwui/renderthread/EglManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp index d4ffddde8def..65ced6ad9316 100644 --- a/libs/hwui/renderthread/EglManager.cpp +++ b/libs/hwui/renderthread/EglManager.cpp @@ -261,7 +261,7 @@ void EglManager::createPBufferSurface() { } } -EGLSurface EglManager::createSurface(EGLNativeWindowType window, ColorMode colorMode) { +Result<EGLSurface, EGLint> EglManager::createSurface(EGLNativeWindowType window, ColorMode colorMode) { LOG_ALWAYS_FATAL_IF(!hasEglContext(), "Not initialized"); bool wideColorGamut = colorMode == ColorMode::WideColorGamut && EglExtensions.glColorSpace && @@ -311,9 +311,9 @@ EGLSurface EglManager::createSurface(EGLNativeWindowType window, ColorMode color EGLSurface surface = eglCreateWindowSurface( mEglDisplay, wideColorGamut ? mEglConfigWideGamut : mEglConfig, window, attribs); - LOG_ALWAYS_FATAL_IF(surface == EGL_NO_SURFACE, - "Failed to create EGLSurface for window %p, eglErr = %s", (void*)window, - eglErrorString()); + if (surface == EGL_NO_SURFACE) { + return Error<EGLint> { eglGetError() }; + } if (mSwapBehavior != SwapBehavior::Preserved) { LOG_ALWAYS_FATAL_IF(eglSurfaceAttrib(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, |