change gm to use concat instead of setMatrix, so we don't trash the caller if
it was recorded into a picture.



git-svn-id: http://skia.googlecode.com/svn/trunk@4147 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 57cea7a..6eb96fd 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -277,8 +277,10 @@
 }
 
 static void invokeGM(GM* gm, SkCanvas* canvas, bool isPDF = false) {
+    SkAutoCanvasRestore acr(canvas, true);
+
     if (!isPDF) {
-        canvas->setMatrix(gm->getInitialTransform());
+        canvas->concat(gm->getInitialTransform());
     }
     installFilter(canvas);
     gm->draw(canvas);
diff --git a/src/core/SkOrderedWriteBuffer.cpp b/src/core/SkOrderedWriteBuffer.cpp
index 08938d0..33ee98a 100644
--- a/src/core/SkOrderedWriteBuffer.cpp
+++ b/src/core/SkOrderedWriteBuffer.cpp
@@ -95,5 +95,11 @@
 }
 
 void SkOrderedWriteBuffer::writeFunctionPtr(void* proc) {
+// enable this to catch writers who's function-ptrs will break if the
+// serialized buffer is read-back in a diff process
+#if 0
+    SkASSERT(!proc || !this->isCrossProcess());
+#endif
+
     *(void**)this->reserve(sizeof(void*)) = proc;
 }