diff options
| author | 2018-11-02 01:22:32 -0700 | |
|---|---|---|
| committer | 2018-11-02 01:22:32 -0700 | |
| commit | 5468b1e0eb5f6a11f1dfbf91b2f129fe0b3395f1 (patch) | |
| tree | 5800dc5377d87992e401c761bfdcf1cf9825f853 | |
| parent | b76aac700b6581093c44c6741db7abadc6ea8d04 (diff) | |
| parent | 35f1cdccf944b2330bdb2b49f07db19752cc9961 (diff) | |
Merge "EGL: always set data space even for UNKNOWN" am: 1eb32e2ffd
am: 35f1cdccf9
Change-Id: I76a3854882c54e786c67cf995c9899c3493fb3c1
| -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 |