make producing GrTextBlob sub runs thread safe

Change-Id: Ie16e41fa6cef2d06d1e6e82036524dd5ad06b1ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375036
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
diff --git a/src/gpu/GrSurfaceDrawContext.cpp b/src/gpu/GrSurfaceDrawContext.cpp
index dff2642..3803946 100644
--- a/src/gpu/GrSurfaceDrawContext.cpp
+++ b/src/gpu/GrSurfaceDrawContext.cpp
@@ -429,18 +429,15 @@
             textBlobCache->add(glyphRunList, blob);
         }
 
-        // TODO(herb): redo processGlyphRunList to handle shifted draw matrix.
         bool supportsSDFT = fContext->priv().caps()->shaderCaps()->supportsDistanceFieldText();
-        for (auto& glyphRun : glyphRunList) {
-            fGlyphPainter.processGlyphRun(glyphRun,
-                                          viewMatrix.localToDevice(),
-                                          drawOrigin,
-                                          drawPaint,
-                                          fSurfaceProps,
-                                          supportsSDFT,
-                                          options,
-                                          blob.get());
-        }
+        blob->makeSubRuns(&fGlyphPainter,
+                          glyphRunList,
+                          viewMatrix.localToDevice(),
+                          drawOrigin,
+                          drawPaint,
+                          fSurfaceProps,
+                          supportsSDFT,
+                          options);
     }
 
     for (const GrSubRun& subRun : blob->subRunList()) {