From e83629abb995cfdc49c0cd2ced2456c8eb41e73e Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 7 Aug 2009 18:13:47 -0700 Subject: [PATCH] make sure to clear surface's buffers when they are allocated --- modules/gralloc/gralloc.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp index 4eb9317..54aa64c 100644 --- a/modules/gralloc/gralloc.cpp +++ b/modules/gralloc/gralloc.cpp @@ -329,6 +329,7 @@ try_ashmem: hnd->base = int(base)+offset; hnd->lockState = lockState; *pHandle = hnd; + memset((void*)hnd->base, 0, size); } LOGE_IF(err, "gralloc failed err=%s", strerror(-err)); -- 2.11.0