Allocate cached ION buffers.

We're doing lots of CPU access of ION buffers and with no caching this
access is pretty slow. By allocating with ION_FLAG_CACHED CPU mapped
pages will be cached and for example a memcpy of a decoded 1080p video
frame is about 3x faster. When writing to a buffer from CPU ("software
rendering") ION will ensure proper cache management on munmap.

For cases not involving CPU access (e.g. VPU directly to GPU) this is
a no-op.

In the Android world this corresponds to gralloc-ing with

Change-Id: I52ca0ac7cc4ebfe3cb8a76aa38e437ac9a04cf02
1 file changed