Display/libqcomUI:Check for the clip width limit

clip width should not exceed with the render buffer width(fb0)

Change-Id: Ia927dc1e709a259910ae8f9e7d37979306eb3437
This commit is contained in:
Neti Ravi Kumar 2011-12-23 19:43:05 +05:30 committed by Giulio Cervera
parent 7abeff1de3
commit 6db0f47326

View File

@ -399,6 +399,10 @@ 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);
dst += stride;