Add purge all caches to our ashmem wrapper.

THIS IS COMPLETELY UNTESTED


Author: djsollen@google.com

Reviewed By: scroggo@google.com

Review URL: https://chromiumcodereview.appspot.com/12450016

git-svn-id: http://skia.googlecode.com/svn/trunk@8163 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/utils/android/ashmem.cpp b/src/utils/android/ashmem.cpp
index 0e1e816..461c062 100644
--- a/src/utils/android/ashmem.cpp
+++ b/src/utils/android/ashmem.cpp
@@ -80,3 +80,8 @@
 {
   return ioctl(fd, ASHMEM_GET_SIZE, NULL);
 }
+
+int ashmem_purge_all_caches(int fd)
+{
+  return ioctl(fd, ASHMEM_PURGE_ALL_CACHES, NULL);
+}
diff --git a/src/utils/android/ashmem.h b/src/utils/android/ashmem.h
index 2d6c0b5..278192b 100644
--- a/src/utils/android/ashmem.h
+++ b/src/utils/android/ashmem.h
@@ -19,6 +19,7 @@
 int ashmem_pin_region(int fd, size_t offset, size_t len);
 int ashmem_unpin_region(int fd, size_t offset, size_t len);
 int ashmem_get_size_region(int fd);
+int ashmem_purge_all_caches(int fd);
 
 #ifdef __cplusplus
 }