hwc: Implement dump function
Does a basic implementation of the dump function
called by SurfaceFlinger in dumpsys.
Further logs in different areas can be added later on
using the dumpsys_log utility.
Change-Id: I2194b4ed7f10947272b7b824ef802ce2ee3c8a48
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index a7de804..256b840 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -23,6 +23,7 @@
#include <hardware/hwcomposer.h>
#include <gr.h>
#include <gralloc_priv.h>
+#include <utils/String8.h>
#define ALIGN_TO(x, align) (((x) + ((align)-1)) & ~((align)-1))
#define LIKELY( exp ) (__builtin_expect( (exp) != 0, true ))
@@ -125,6 +126,9 @@
bool isSecuring(hwc_context_t* ctx);
bool isExternalActive(hwc_context_t* ctx);
+//Helper function to dump logs
+void dumpsys_log(android::String8& buf, const char* fmt, ...);
+
//Sync point impl.
int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy);