Index: src/gpu/SkGr.cpp |
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp |
index 45100f097bb1d4438c0cea06cad020f4d7a378b1..c2e284154a584dea54f71f323114a4e7391b5b12 100644 |
--- a/src/gpu/SkGr.cpp |
+++ b/src/gpu/SkGr.cpp |
@@ -243,7 +243,7 @@ |
GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(pixmap.info(), *caps); |
if (caps->srgbSupport() && !GrPixelConfigIsSRGB(desc.fConfig) && |
- pixmap.info().colorSpace() && pixmap.info().colorSpace()->gammaCloseToSRGB()) { |
+ kSRGB_SkColorProfileType == pixmap.info().profileType()) { |
// We were supplied sRGB as the profile type, but we don't have a suitable pixel config. |
// Convert to 8888 sRGB so we can handle the data correctly. The raster backend doesn't |
// handle sRGB Index8 -> sRGB 8888 correctly (yet), so lie about both the source and |
@@ -418,7 +418,7 @@ |
// alphatype is ignore for now, but if GrPixelConfig is expanded to encompass |
// alpha info, that will be considered. |
-GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType ct, SkAlphaType, const SkColorSpace* cs, |
+GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType ct, SkAlphaType, SkColorProfileType pt, |
const GrCaps& caps) { |
// We intentionally ignore profile type for non-8888 formats. Anything we can't support |
// in hardware will be expanded to sRGB 8888 in GrUploadPixmapToTexture. |
@@ -432,10 +432,10 @@ |
case kARGB_4444_SkColorType: |
return kRGBA_4444_GrPixelConfig; |
case kRGBA_8888_SkColorType: |
- return (caps.srgbSupport() && cs && cs->gammaCloseToSRGB()) |
+ return (kSRGB_SkColorProfileType == pt && caps.srgbSupport()) |
? kSRGBA_8888_GrPixelConfig : kRGBA_8888_GrPixelConfig; |
case kBGRA_8888_SkColorType: |
- return (caps.srgbSupport() && cs && cs->gammaCloseToSRGB()) |
+ return (kSRGB_SkColorProfileType == pt && caps.srgbSupport()) |
? kSBGRA_8888_GrPixelConfig : kBGRA_8888_GrPixelConfig; |
case kIndex_8_SkColorType: |
return kIndex_8_GrPixelConfig; |