unified PNG encoding between SkDrawCommand and skiaserve
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1818043003

Review URL: https://codereview.chromium.org/1818043003
diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h
index 0a365c0..7eaf354 100644
--- a/tools/debugger/SkDrawCommand.h
+++ b/tools/debugger/SkDrawCommand.h
@@ -8,6 +8,8 @@
 #ifndef SKDRAWCOMMAND_H_
 #define SKDRAWCOMMAND_H_
 
+#include "png.h"
+
 #include "SkCanvas.h"
 #include "SkTLazy.h"
 #include "SkPath.h"
@@ -57,6 +59,9 @@
 
     static const int kOpTypeCount = kLast_OpType + 1;
 
+    static void WritePNG(const png_bytep rgba, png_uint_32 width, png_uint_32 height, 
+                         SkWStream& out);
+
     SkDrawCommand(OpType opType);
 
     virtual ~SkDrawCommand();