diff options
Diffstat (limited to 'hwc/hwc.c')
-rw-r--r-- | hwc/hwc.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -811,7 +811,10 @@ static int omap4_hwc_set(struct hwc_composer_device *dev, hwc_display_t dpy, // LOGD("set %d layers (sgx=%d)\n", dsscomp->num_ovls, hwc_dev->use_sgx); - if (hwc_dev->use_sgx) { + if (hwc_dev->use_sgx && dpy && sur) { + // list can be NULL which means hwc is temporarily disabled. + // however, if dpy and sur are null it means we're turning the + // screen off. no shall not call eglSwapBuffers() in that case. if (!eglSwapBuffers((EGLDisplay)dpy, (EGLSurface)sur)) { LOGE("eglSwapBuffers error"); err = HWC_EGL_ERROR; |