drm_hwcomposer: reimplement Dump for DrmDisplayCompositor

Also fixes hwc_dump sometimes failing to null terminate its output buffer.

TEST=dumpsys SurfaceFlinger

Change-Id: Ibf93cfd496a07a9375d78a8b239c2c7876aff986
diff --git a/seperate_rects.h b/seperate_rects.h
index 1e0a267..0703c97 100644
--- a/seperate_rects.h
+++ b/seperate_rects.h
@@ -18,6 +18,8 @@
 #define DRM_HWCOMPOSER_SEPERATE_RECTS_H_
 
 #include <stdint.h>
+
+#include <sstream>
 #include <vector>
 
 namespace seperate_rects {
@@ -76,6 +78,11 @@
   TFloat area() const {
     return width() * height();
   }
+
+  void Dump(std::ostringstream *out) const {
+    *out << "[x/y/w/h]=" << left << "/" << top << "/" << width() << "/"
+         << height();
+  }
 };
 
 template <typename TUInt>