Implement "dump displaylist" button for skia pipelines

Implement "dump displaylist" button in hierarchyviewer for skia
pipelines.

Test: ran hierarchyviewer for all pipelines.
bug: 34819877
Change-Id: Ifeb578260f636cb67268f9f9259e7318bf7de453
diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp
index 3853356..0ff101c 100644
--- a/libs/hwui/DisplayList.cpp
+++ b/libs/hwui/DisplayList.cpp
@@ -22,6 +22,7 @@
 #include "DamageAccumulator.h"
 #include "Debug.h"
 #include "DisplayList.h"
+#include "OpDumper.h"
 #include "RecordedOp.h"
 #include "RenderNode.h"
 #include "VectorDrawable.h"
@@ -127,5 +128,17 @@
     return isDirty;
 }
 
+void DisplayList::output(std::ostream& output, uint32_t level) {
+    for (auto&& op : getOps()) {
+        OpDumper::dump(*op, output, level + 1);
+        if (op->opId == RecordedOpId::RenderNodeOp) {
+            auto rnOp = reinterpret_cast<const RenderNodeOp*>(op);
+            rnOp->renderNode->output(output, level + 1);
+        } else {
+            output << std::endl;
+        }
+    }
+}
+
 }; // namespace uirenderer
 }; // namespace android