diff --git a/src/xml/SkXMLWriter.cpp b/src/xml/SkXMLWriter.cpp
index 25d59b4..4640d73 100644
--- a/src/xml/SkXMLWriter.cpp
+++ b/src/xml/SkXMLWriter.cpp
@@ -190,14 +190,9 @@
 
 // SkXMLStreamWriter
 
-static void tab(SkWStream& stream, int level) {
-    for (int i = 0; i < level; i++) {
-        stream.writeText("\t");
-    }
-}
-
-SkXMLStreamWriter::SkXMLStreamWriter(SkWStream* stream) : fStream(*stream)
-{}
+SkXMLStreamWriter::SkXMLStreamWriter(SkWStream* stream, uint32_t flags)
+    : fStream(*stream)
+    , fFlags(flags) {}
 
 SkXMLStreamWriter::~SkXMLStreamWriter() {
     this->flush();
@@ -217,25 +212,25 @@
 
     if (!elem->fHasChildren && !elem->fHasText) {
         fStream.writeText(">");
-        fStream.newline();
+        this->newline();
     }
 
-    tab(fStream, fElems.count() + 1);
+    this->tab(fElems.count() + 1);
     fStream.write(text, length);
-    fStream.newline();
+    this->newline();
 }
 
 void SkXMLStreamWriter::onEndElement() {
     Elem* elem = getEnd();
     if (elem->fHasChildren || elem->fHasText) {
-        tab(fStream, fElems.count());
+        this->tab(fElems.count());
         fStream.writeText("</");
         fStream.writeText(elem->fName.c_str());
         fStream.writeText(">");
     } else {
         fStream.writeText("/>");
     }
-    fStream.newline();
+    this->newline();
     doEnd(elem);
 }
 
@@ -244,10 +239,10 @@
     if (this->doStart(name, length)) {
         // the first child, need to close with >
         fStream.writeText(">");
-        fStream.newline();
+        this->newline();
     }
 
-    tab(fStream, level);
+    this->tab(level);
     fStream.writeText("<");
     fStream.write(name, length);
 }
@@ -255,7 +250,21 @@
 void SkXMLStreamWriter::writeHeader() {
     const char* header = getHeader();
     fStream.write(header, strlen(header));
-    fStream.newline();
+    this->newline();
+}
+
+void SkXMLStreamWriter::newline() {
+    if (!(fFlags & kNoPretty_Flag)) {
+        fStream.newline();
+    }
+}
+
+void SkXMLStreamWriter::tab(int level) {
+    if (!(fFlags & kNoPretty_Flag)) {
+        for (int i = 0; i < level; i++) {
+            fStream.writeText("\t");
+        }
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////////////////////
