Index: src/image/SkSurface_Gpu.cpp |
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp |
index ebe103ac5a7bd3afcc7ede140bbe15e379ed9249..3007313118c9427fe2acc2c95838a389dea2f3a3 100644 |
--- a/src/image/SkSurface_Gpu.cpp |
+++ b/src/image/SkSurface_Gpu.cpp |
@@ -136,8 +136,7 @@ void SkSurface_Gpu::onPrepareForExternalIO() { |
bool SkSurface_Gpu::Valid(const SkImageInfo& info) { |
switch (info.colorType()) { |
case kRGBA_F16_SkColorType: |
- return info.colorSpace() && |
- SkColorSpace::kLinear_GammaNamed == info.colorSpace()->gammaNamed(); |
+ return info.colorSpace() && info.colorSpace()->gammaIsLinear(); |
case kRGBA_8888_SkColorType: |
case kBGRA_8888_SkColorType: |
return !info.colorSpace() || info.colorSpace()->gammaCloseToSRGB(); |
@@ -149,7 +148,7 @@ bool SkSurface_Gpu::Valid(const SkImageInfo& info) { |
bool SkSurface_Gpu::Valid(GrContext* context, GrPixelConfig config, SkColorSpace* colorSpace) { |
switch (config) { |
case kRGBA_half_GrPixelConfig: |
- return colorSpace && SkColorSpace::kLinear_GammaNamed == colorSpace->gammaNamed(); |
+ return colorSpace && colorSpace->gammaIsLinear(); |
case kSRGBA_8888_GrPixelConfig: |
case kSBGRA_8888_GrPixelConfig: |
return context->caps()->srgbSupport() && colorSpace && colorSpace->gammaCloseToSRGB(); |