Use sk_careful_memcpy when writing optional conic weights for GrShape path data key.

TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2359933002

NO_DEPENDENCY_CHECKS=true

Review-Url: https://codereview.chromium.org/2359933002
diff --git a/src/gpu/GrShape.cpp b/src/gpu/GrShape.cpp
index b3c1e0a..12fdd3b 100644
--- a/src/gpu/GrShape.cpp
+++ b/src/gpu/GrShape.cpp
@@ -89,7 +89,7 @@
 }
 
 // Writes the path data key into the passed pointer.
-static void write_path_key_from(const SkPath& path, uint32_t* origKey) {
+static void write_path_key_from_data(const SkPath& path, uint32_t* origKey) {
     uint32_t* key = origKey;
     // The check below should take care of negative values casted positive.
     const int verbCnt = path.countVerbs();
@@ -109,7 +109,7 @@
     memcpy(key, SkPathPriv::PointData(path), sizeof(SkPoint) * pointCnt);
     GR_STATIC_ASSERT(sizeof(SkPoint) == 2 * sizeof(uint32_t));
     key += 2 * pointCnt;
-    memcpy(key, SkPathPriv::ConicWeightData(path), sizeof(SkScalar) * conicWeightCnt);
+    sk_careful_memcpy(key, SkPathPriv::ConicWeightData(path), sizeof(SkScalar) * conicWeightCnt);
     GR_STATIC_ASSERT(sizeof(SkScalar) == sizeof(uint32_t));
     SkDEBUGCODE(key += conicWeightCnt);
     SkASSERT(key - origKey == path_key_from_data_size(path));
@@ -174,7 +174,7 @@
             case Type::kPath: {
                 int dataKeySize = path_key_from_data_size(fPathData.fPath);
                 if (dataKeySize >= 0) {
-                    write_path_key_from(fPathData.fPath, key);
+                    write_path_key_from_data(fPathData.fPath, key);
                     return;
                 }
                 SkASSERT(fPathData.fGenID);