summaryrefslogtreecommitdiffstats
path: root/modules/gralloc
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-08-07 18:13:47 -0700
committerMathias Agopian <mathias@google.com>2009-08-07 18:13:47 -0700
commite83629abb995cfdc49c0cd2ced2456c8eb41e73e (patch)
tree862648893145f3a895cd95af0c1357cc0ac6a10c /modules/gralloc
parent75cdfbb45d3d3fe60ed029178a14e3994ed8107f (diff)
downloadhardware_libhardware-e83629abb995cfdc49c0cd2ced2456c8eb41e73e.zip
hardware_libhardware-e83629abb995cfdc49c0cd2ced2456c8eb41e73e.tar.gz
hardware_libhardware-e83629abb995cfdc49c0cd2ced2456c8eb41e73e.tar.bz2
make sure to clear surface's buffers when they are allocated
Diffstat (limited to 'modules/gralloc')
-rw-r--r--modules/gralloc/gralloc.cpp1
1 files changed, 1 insertions, 0 deletions
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));