Index: src/gpu/SkGr.cpp |
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp |
index ef3a39bc61f27cd905aff9b93e44fec74c80f345..452218f517b97d5440c6eb967d2f9a22aeda9782 100644 |
--- a/src/gpu/SkGr.cpp |
+++ b/src/gpu/SkGr.cpp |
@@ -462,10 +462,8 @@ GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType ct, SkAlphaType, const SkCol |
return kUnknown_GrPixelConfig; |
} |
-bool GrPixelConfigToColorAndColorSpace(GrPixelConfig config, SkColorType* ctOut, |
- sk_sp<SkColorSpace>* csOut) { |
+bool GrPixelConfigToColorType(GrPixelConfig config, SkColorType* ctOut) { |
SkColorType ct; |
- sk_sp<SkColorSpace> cs = nullptr; |
switch (config) { |
case kAlpha_8_GrPixelConfig: |
ct = kAlpha_8_SkColorType; |
@@ -487,11 +485,9 @@ bool GrPixelConfigToColorAndColorSpace(GrPixelConfig config, SkColorType* ctOut, |
break; |
case kSRGBA_8888_GrPixelConfig: |
ct = kRGBA_8888_SkColorType; |
- cs = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
break; |
case kSBGRA_8888_GrPixelConfig: |
ct = kBGRA_8888_SkColorType; |
- cs = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
break; |
case kRGBA_half_GrPixelConfig: |
ct = kRGBA_F16_SkColorType; |
@@ -502,9 +498,6 @@ bool GrPixelConfigToColorAndColorSpace(GrPixelConfig config, SkColorType* ctOut, |
if (ctOut) { |
*ctOut = ct; |
} |
- if (csOut) { |
- *csOut = cs; |
- } |
return true; |
} |
@@ -741,22 +734,6 @@ bool SkPaintToGrPaintWithTexture(GrContext* context, |
//////////////////////////////////////////////////////////////////////////////////////////////// |
-SkImageInfo GrMakeInfoFromTexture(GrTexture* tex, int w, int h, bool isOpaque, |
- sk_sp<SkColorSpace> colorSpace) { |
-#ifdef SK_DEBUG |
- const GrSurfaceDesc& desc = tex->desc(); |
- SkASSERT(w <= desc.fWidth); |
- SkASSERT(h <= desc.fHeight); |
-#endif |
- const GrPixelConfig config = tex->config(); |
- SkColorType ct = kUnknown_SkColorType; |
- SkAlphaType at = isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType; |
- if (!GrPixelConfigToColorAndColorSpace(config, &ct, nullptr)) { |
- ct = kUnknown_SkColorType; |
- } |
- return SkImageInfo::Make(w, h, ct, at, std::move(colorSpace)); |
-} |
- |
GrTextureParams::FilterMode GrSkFilterQualityToGrFilterMode(SkFilterQuality paintFilterQuality, |
const SkMatrix& viewM, |
const SkMatrix& localM, |