Handle null colorspace in SkToSRGBColorFilter.
This was uncovered by the linked fuzzer issue.
I haven't looked hard at it, but I'd guess it's fuzzed an ICC profile
into one that can't be deserialized, and we get a null in CreateProc().
We could probably restrict the null check to just CreateProc(), but
putting it in Make() and asserting in the constructor feels cozy.
BUG=chromium:787718
Change-Id: Ic4b1dad28c00ee5870f22093eedbf34686c32120
Reviewed-on: https://skia-review.googlesource.com/76080
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/gn/tests.gni b/gn/tests.gni
index 6579820..418ce01 100644
--- a/gn/tests.gni
+++ b/gn/tests.gni
@@ -258,6 +258,7 @@
"$_tests/Time.cpp",
"$_tests/TLSTest.cpp",
"$_tests/TopoSortTest.cpp",
+ "$_tests/ToSRGBColorFilter.cpp",
"$_tests/TraceMemoryDumpTest.cpp",
"$_tests/TracingTest.cpp",
"$_tests/TransferPixelsTest.cpp",