diff --git a/libqcomui/qcom_ui.cpp b/libqcomui/qcom_ui.cpp index 107827f..58f4ffb 100644 --- a/libqcomui/qcom_ui.cpp +++ b/libqcomui/qcom_ui.cpp @@ -399,12 +399,11 @@ int qcomuiClearRegion(Region region, EGLDisplay dpy, EGLSurface sur) (r.left + r.top*renderBuffer->stride)*bytesPerPixel; int w = r.width()*bytesPerPixel; int h = r.height(); - if(((int)dst + w ) > (fbHandle->base + renderBuffer->stride*bytesPerPixel)){ - LOGE("%s: Excedding the framebuffer limit",__FUNCTION__ ) ; - return -1; - } do { - android_memset32((uint32_t*)dst, 0, w); + if(4 == bytesPerPixel) + android_memset32((uint32_t*)dst, 0, w); + else + android_memset16((uint16_t*)dst, 0, w); dst += stride; } while(--h); }