make matrix serialization private

Moves readFromMemory, writeToMemory to private section.
No sign that these are called from google3, android,
chromium, but function names are common enough that
it's hard to know for sure.

These are used inside templates internally and for
testing, so it is not quite as simple as adding alternate
entry points in SkMatrixPriv.

R=reed@google.com
Bug: skia:6898
Change-Id: I1fac142f4bf0f38608ea93438c46f39147606c4d
Reviewed-on: https://skia-review.googlesource.com/62361
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp
index 898b12f..da3c47c 100644
--- a/tests/SerializationTest.cpp
+++ b/tests/SerializationTest.cpp
@@ -14,6 +14,7 @@
 #include "SkImageSource.h"
 #include "SkMakeUnique.h"
 #include "SkMallocPixelRef.h"
+#include "SkMatrixPriv.h"
 #include "SkOSFile.h"
 #include "SkPictureRecorder.h"
 #include "SkShaderBase.h"
@@ -29,6 +30,9 @@
 static const uint32_t kArraySize = 64;
 static const int kBitmapSize = 256;
 
+class SerializationTest {
+public:
+
 template<typename T>
 static void TestAlignment(T* testObj, skiatest::Reporter* reporter) {
     // Test memory read/write functions directly
@@ -38,6 +42,7 @@
     size_t bytesReadFromMemory = testObj->readFromMemory(dataWritten, bytesWrittenToMemory);
     REPORTER_ASSERT(reporter, SkAlign4(bytesReadFromMemory) == bytesReadFromMemory);
 }
+};
 
 template<typename T> struct SerializationUtils {
     // Generic case for flattenables
@@ -183,7 +188,7 @@
 template<typename T>
 static void TestObjectSerialization(T* testObj, skiatest::Reporter* reporter) {
     TestObjectSerializationNoAlign<T, false>(testObj, reporter);
-    TestAlignment(testObj, reporter);
+    SerializationTest::TestAlignment(testObj, reporter);
 }
 
 template<typename T>
@@ -467,7 +472,7 @@
         SkRect rect = SkRect::MakeXYWH(1, 2, 20, 30);
         SkVector corners[4] = { {1, 2}, {2, 3}, {3,4}, {4,5} };
         rrect.setRectRadii(rect, corners);
-        TestAlignment(&rrect, reporter);
+        SerializationTest::TestAlignment(&rrect, reporter);
     }
 
     // Test readByteArray