gralloc: expose Gralloc4 get/dump functions
Expose Gralloc4 functions up to GraphicBufferAllocator/Mapper.
By adding the functions to GraphicBufferAllocator/Mapper,
the rest of the system can depend on GraphicBufferAllocator/Mapper
instead of talking directly to IAllocator/IMapper.
Bug: 141632767
Test: Implementation will be tested through
VtsHalGraphicsMapperV4_0TargetTest
Framework plumbing will be testing when it is exposed to
GraphicBuffer
Change-Id: Ie74a335a9d3a1e085e9fa186b327be8d21e870de
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 9f4dd2b..0a2890b 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2006,6 +2006,7 @@
// Even though ATRACE_INT64 already checks if tracing is enabled, it doesn't prevent the
// side-effect of getTotalSize(), so we check that again here
if (ATRACE_ENABLED()) {
+ // getTotalSize returns the total number of buffers that were allocated by SurfaceFlinger
ATRACE_INT64("Total Buffer Size", GraphicBufferAllocator::get().getTotalSize());
}
}