Add buffer helper to read directly into SkString to avoid extra copying

R=reed@google.com

Review URL: https://codereview.chromium.org/15179008

git-svn-id: http://skia.googlecode.com/svn/trunk@9218 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/images/SkImageRef_ashmem.cpp b/src/images/SkImageRef_ashmem.cpp
index dc60465..a4058ff 100644
--- a/src/images/SkImageRef_ashmem.cpp
+++ b/src/images/SkImageRef_ashmem.cpp
@@ -223,9 +223,8 @@
     fRec.fSize = 0;
     fRec.fPinned = false;
     fCT = NULL;
-    char* uri = buffer.readString();
-    if (uri) {
-        setURI(uri);
-        sk_free(uri);
-    }
+
+    SkString uri;
+    buffer.readString(&uri);
+    this->setURI(uri);
 }