diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h
index c0e0be1..2be04ff 100644
--- a/include/core/SkImageInfo.h
+++ b/include/core/SkImageInfo.h
@@ -198,9 +198,7 @@
 
     static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at,
                             SkColorProfileType pt = kLinear_SkColorProfileType) {
-        sk_sp<SkColorSpace> cs = (kSRGB_SkColorProfileType == pt) ?
-                                 SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named) : nullptr;
-        return SkImageInfo(width, height, ct, at, pt, cs);
+        return SkImageInfo(width, height, ct, at, pt, nullptr);
     }
 
     static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at,
@@ -211,9 +209,7 @@
      */
     static SkImageInfo MakeN32(int width, int height, SkAlphaType at,
                                SkColorProfileType pt = kLinear_SkColorProfileType) {
-        sk_sp<SkColorSpace> cs = (kSRGB_SkColorProfileType == pt) ?
-                                 SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named) : nullptr;
-        return SkImageInfo(width, height, kN32_SkColorType, at, pt, cs);
+        return SkImageInfo(width, height, kN32_SkColorType, at, pt, nullptr);
     }
 
     /**
@@ -221,9 +217,7 @@
      */
     static SkImageInfo MakeN32Premul(int width, int height,
                                      SkColorProfileType pt = kLinear_SkColorProfileType) {
-        sk_sp<SkColorSpace> cs = (kSRGB_SkColorProfileType == pt) ?
-                                 SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named) : nullptr;
-        return SkImageInfo(width, height, kN32_SkColorType, kPremul_SkAlphaType, pt, cs);
+        return SkImageInfo(width, height, kN32_SkColorType, kPremul_SkAlphaType, pt, nullptr);
     }
 
     /**
diff --git a/tests/ImageIsOpaqueTest.cpp b/tests/ImageIsOpaqueTest.cpp
index 51229bf..52d3b97 100644
--- a/tests/ImageIsOpaqueTest.cpp
+++ b/tests/ImageIsOpaqueTest.cpp
@@ -31,10 +31,7 @@
 
     info2.unflatten(rb);
     REPORTER_ASSERT(reporter, rb.offset() == wb.bytesWritten());
-
-    // FIXME (msarett):
-    // Support flatten/unflatten of SkColorSpace objects.
-    REPORTER_ASSERT(reporter, info.makeColorSpace(nullptr) == info2.makeColorSpace(nullptr));
+    REPORTER_ASSERT(reporter, info == info2);
 }
 
 DEF_TEST(ImageInfo_flattening, reporter) {
