Index: src/gpu/SkGr.cpp |
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp |
index f937b16d55e166f0d1481186752e4507a2ed4816..60fcdd513965a3a678b509036f0f1ea916af4de8 100644 |
--- a/src/gpu/SkGr.cpp |
+++ b/src/gpu/SkGr.cpp |
@@ -453,10 +453,10 @@ |
return kUnknown_GrPixelConfig; |
} |
-bool GrPixelConfigToColorAndColorSpace(GrPixelConfig config, SkColorType* ctOut, |
- sk_sp<SkColorSpace>* csOut) { |
+bool GrPixelConfig2ColorAndProfileType(GrPixelConfig config, SkColorType* ctOut, |
+ SkColorProfileType* ptOut) { |
SkColorType ct; |
- sk_sp<SkColorSpace> cs = nullptr; |
+ SkColorProfileType pt = kLinear_SkColorProfileType; |
switch (config) { |
case kAlpha_8_GrPixelConfig: |
ct = kAlpha_8_SkColorType; |
@@ -478,11 +478,11 @@ |
break; |
case kSRGBA_8888_GrPixelConfig: |
ct = kRGBA_8888_SkColorType; |
- cs = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
+ pt = kSRGB_SkColorProfileType; |
break; |
case kSBGRA_8888_GrPixelConfig: |
ct = kBGRA_8888_SkColorType; |
- cs = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
+ pt = kSRGB_SkColorProfileType; |
break; |
case kRGBA_half_GrPixelConfig: |
ct = kRGBA_F16_SkColorType; |
@@ -493,8 +493,8 @@ |
if (ctOut) { |
*ctOut = ct; |
} |
- if (csOut) { |
- *csOut = cs; |
+ if (ptOut) { |
+ *ptOut = pt; |
} |
return true; |
} |
@@ -724,9 +724,9 @@ |
SkASSERT(h <= desc.fHeight); |
#endif |
const GrPixelConfig config = tex->config(); |
- SkColorType ct = kUnknown_SkColorType; |
+ SkColorType ct; |
SkAlphaType at = isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType; |
- if (!GrPixelConfigToColorAndColorSpace(config, &ct, nullptr)) { |
+ if (!GrPixelConfig2ColorAndProfileType(config, &ct, nullptr)) { |
ct = kUnknown_SkColorType; |
} |
return SkImageInfo::Make(w, h, ct, at); |