diff options
author | jung-min.oh <jung-min.oh@samsung.com> | 2011-09-21 20:19:14 +0900 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-10-01 12:01:18 -0700 |
commit | cfe083ee838ce182a56ffea52d3b5bb7d9ea0c66 (patch) | |
tree | 397cf106eea133b3a670398f2d81dd5f048207b4 /libhwcomposer | |
parent | 41a8a0b4a06cfe4072985c7724b6189d59c610ca (diff) | |
download | device_samsung_crespo-cfe083ee838ce182a56ffea52d3b5bb7d9ea0c66.zip device_samsung_crespo-cfe083ee838ce182a56ffea52d3b5bb7d9ea0c66.tar.gz device_samsung_crespo-cfe083ee838ce182a56ffea52d3b5bb7d9ea0c66.tar.bz2 |
libhwcomposer: handle a NULL list & a numHwLayers of zero
Change-Id: I043263e87a21254a65ab05250562e239ef2e3d04
Signed-off-by: jung-min.oh <jung-min.oh@samsung.com>
Diffstat (limited to 'libhwcomposer')
-rw-r--r-- | libhwcomposer/SecHWC.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libhwcomposer/SecHWC.cpp b/libhwcomposer/SecHWC.cpp index 59736ed..4808470 100644 --- a/libhwcomposer/SecHWC.cpp +++ b/libhwcomposer/SecHWC.cpp @@ -291,6 +291,11 @@ static int hwc_set(hwc_composer_device_t *dev, struct sec_rect src_rect; struct sec_rect dst_rect; + EGLBoolean sucess = eglSwapBuffers((EGLDisplay)dpy, (EGLSurface)sur); + if (!sucess) { + return HWC_EGL_ERROR; + } + if (!list) { /* turn off the all windows */ for (int i = 0; i < NUM_OF_WIN; i++) { @@ -305,13 +310,6 @@ static int hwc_set(hwc_composer_device_t *dev, if(ctx->num_of_hwc_layer > NUM_OF_WIN) ctx->num_of_hwc_layer = NUM_OF_WIN; - if (0 < ctx->num_of_fb_layer) { - EGLBoolean sucess = eglSwapBuffers((EGLDisplay)dpy, (EGLSurface)sur); - if (!sucess) { - return HWC_EGL_ERROR; - } - } - /* compose hardware layers here */ for (uint32_t i = 0; i < ctx->num_of_hwc_layer; i++) { win = &ctx->win[i]; |