add colorspace param to textblobdiff canvas

Bug: skia:8773
Change-Id: Ib5d04e02a1568ad8a2b3f1baccb9544515f772f9
Reviewed-on: https://skia-review.googlesource.com/c/193373
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/tools/remote_demo.cpp b/tools/remote_demo.cpp
index 105a9b3..8d80e94 100644
--- a/tools/remote_demo.cpp
+++ b/tools/remote_demo.cpp
@@ -132,12 +132,12 @@
     std::chrono::duration<double>                       fElapsedSeconds{0.0};
 };
 
-static bool push_font_data(const SkPicture& pic, SkStrikeServer* strikeServer, int writeFd) {
-    SkMatrix deviceMatrix = SkMatrix::I();
+static bool push_font_data(const SkPicture& pic, SkStrikeServer* strikeServer,
+                           sk_sp<SkColorSpace> colorSpace, int writeFd) {
     const SkIRect bounds = pic.cullRect().round();
     const SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType);
-    SkTextBlobCacheDiffCanvas filter(bounds.width(), bounds.height(), deviceMatrix, props,
-                                     strikeServer);
+    SkTextBlobCacheDiffCanvas filter(bounds.width(), bounds.height(), props,
+                                     strikeServer, std::move(colorSpace));
     pic.playback(&filter);
 
     std::vector<uint8_t> fontData;
@@ -236,6 +236,7 @@
     sk_sp<SkData> stream;
     if (gUseGpu) {
         auto pic = SkPicture::MakeFromData(skpData.get());
+        auto colorSpace = SkColorSpace::MakeSRGB();
         SkSerialProcs procs;
         auto encode = [](SkTypeface* tf, void* ctx) -> sk_sp<SkData> {
             return reinterpret_cast<SkStrikeServer*>(ctx)->serializeTypeface(tf);
@@ -257,7 +258,7 @@
                 return 0;
             }
             if (gPurgeFontCaches) discardableManager.purgeAll();
-            push_font_data(*pic.get(), &server, writeFd);
+            push_font_data(*pic.get(), &server, colorSpace, writeFd);
         }
     } else {
         stream = skpData;