add callbacks to Images that wrap client-provided content

BUG=skia:

Review URL: https://codereview.chromium.org/1169553003
diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h
index daa50dc..9a1ea5f 100644
--- a/include/core/SkImageInfo.h
+++ b/include/core/SkImageInfo.h
@@ -282,7 +282,11 @@
     }
 
     size_t getSafeSize(size_t rowBytes) const {
-        return (size_t)this->getSafeSize64(rowBytes);
+        int64_t size = this->getSafeSize64(rowBytes);
+        if (!sk_64_isS32(size)) {
+            return 0;
+        }
+        return sk_64_asS32(size);
     }
 
     bool validRowBytes(size_t rowBytes) const {