drm_hwcomposer: Add Dump() to the Compositor interface

Add a Dump() function to the Compositor base class and pipe it
through hwcomposer. This can be invoked from the shell by
running "dumpsys SurfaceFlinger".

Change-Id: I87646f4e926ac6d52a04ba130957abdfab99c491
Signed-off-by: Sean Paul <seanpaul@chromium.org>
diff --git a/compositor.h b/compositor.h
index b4956b6..e148416 100644
--- a/compositor.h
+++ b/compositor.h
@@ -19,6 +19,8 @@
 
 #include "importer.h"
 
+#include <sstream>
+
 struct hwc_layer_1;
 struct hwc_drm_bo;
 
@@ -98,6 +100,9 @@
   // on a worker thread. Each Composite call handles one composition that was
   // submitted via QueueComposition in FIFO order. Returns 0 on success.
   virtual int Composite() = 0;
+
+  // Dumps state from the Compositor to the out stream
+  virtual void Dump(std::ostringstream *out) const;
 };
 
 }  // namespace android