libmemtrack: avoid counting surfaceflinger buffers twice

The system wide Graphics memory usage is inaccurate because some ION
buffers which are shared between processes are counted twice, once for
the buffer's consumer (surfaceflinger), and again for the producer.
These ION buffers appear in surfaceflinger's kgsl memory dump with
usage=egl_image, and in the producer's dump with usage=egl_surface.

Improve the accuracy of Graphics memory tracking by ignoring all ION
buffers with usage=egl_image in the surfaceflinger process, under the
assumption that the buffers will be accounted for when examining the
producer's process.

Change-Id: I764c610f226d41e2897d6e0c2247793b0e321ed0
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
1 file changed