Decouple the SkFlattenable from SkReader32/SkWriter32.

The current impl for SkFlattenable read/write buffers is 
that they extend from SkReader32 and SkWriter32, but that
dependency must be abstract if we are to add any other
serialization format.
Review URL: https://codereview.appspot.com/5999045

git-svn-id: http://skia.googlecode.com/svn/trunk@3654 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index ee6e2c7..fff2b56 100644
--- a/src/pipe/SkGPipeWrite.cpp
+++ b/src/pipe/SkGPipeWrite.cpp
@@ -23,6 +23,7 @@
 #include "SkMaskFilter.h"
 #include "SkRasterizer.h"
 #include "SkShader.h"
+#include "SkOrderedWriteBuffer.h"
 
 static SkFlattenable* get_paintflat(const SkPaint& paint, unsigned paintFlat) {
     SkASSERT(paintFlat < kCount_PaintFlats);
@@ -194,7 +195,7 @@
         return 0;
     }
 
-    SkFlattenableWriteBuffer tmpWriter(1024);
+    SkOrderedWriteBuffer tmpWriter(1024);
     tmpWriter.setFlags(SkFlattenableWriteBuffer::kInlineFactoryNames_Flag);
     tmpWriter.setFactoryRecorder(fFactorySet);
 
@@ -388,7 +389,7 @@
         NOTIFY_SETUP(this);
         if (this->needOpBytes(matrix.flatten(NULL))) {
             this->writeOp(kConcat_DrawOp);
-            SkWriteMatrix(&fWriter, matrix);
+            fWriter.writeMatrix(matrix);
         }
     }
     return this->INHERITED::concat(matrix);
@@ -398,7 +399,7 @@
     NOTIFY_SETUP(this);
     if (this->needOpBytes(matrix.flatten(NULL))) {
         this->writeOp(kSetMatrix_DrawOp);
-        SkWriteMatrix(&fWriter, matrix);
+        fWriter.writeMatrix(matrix);
     }
     this->INHERITED::setMatrix(matrix);
 }
@@ -426,7 +427,7 @@
     NOTIFY_SETUP(this);
     if (this->needOpBytes(region.flatten(NULL))) {
         this->writeOp(kClipRegion_DrawOp, 0, rgnOp);
-        SkWriteRegion(&fWriter, region);
+        fWriter.writeRegion(region);
     }
     return this->INHERITED::clipRegion(region, rgnOp);
 }
@@ -575,7 +576,7 @@
 
             path.flatten(fWriter);
             if (matrix) {
-                SkWriteMatrix(&fWriter, *matrix);
+                fWriter.writeMatrix(*matrix);
             }
         }
     }