diff options
| author | 2018-11-02 08:03:04 +0000 | |
|---|---|---|
| committer | 2018-11-02 08:03:04 +0000 | |
| commit | 1eb32e2ffd899e0e70d4cea1c5f5817fd52def1f (patch) | |
| tree | 1244a62c470852a794943a3ac95a68ec1a46bd55 /opengl | |
| parent | c8fb8bd76042d6caad0fe0d204e3731b5b082cea (diff) | |
| parent | 34cd2275ffb14500acb8b0fd82fd1e73ddc75c12 (diff) | |
Merge "EGL: always set data space even for UNKNOWN"
Diffstat (limited to 'opengl')
| -rw-r--r-- | opengl/libs/EGL/eglApi.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 11029c5b78..36deedcb85 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -745,14 +745,14 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, } android_dataspace dataSpace = dataSpaceFromEGLColorSpace(colorSpace); - if (dataSpace != HAL_DATASPACE_UNKNOWN) { - int err = native_window_set_buffers_data_space(window, dataSpace); - if (err != 0) { - ALOGE("error setting native window pixel dataSpace: %s (%d)", - strerror(-err), err); - native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL); - return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE); - } + // Set dataSpace even if it could be HAL_DATASPACE_UNKNOWN. HAL_DATASPACE_UNKNOWN + // is the default value, but it may have changed at this point. + int err = native_window_set_buffers_data_space(window, dataSpace); + if (err != 0) { + ALOGE("error setting native window pixel dataSpace: %s (%d)", + strerror(-err), err); + native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL); + return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE); } // the EGL spec requires that a new EGLSurface default to swap interval |