aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
diff options
context:
space:
mode:
Diffstat (limited to 'src/image')
-rw-r--r--src/image/SkImage.cpp2
-rw-r--r--src/image/SkSurface_Gpu.cpp6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp
index 566bdc092f..e45bbd7cf3 100644
--- a/src/image/SkImage.cpp
+++ b/src/image/SkImage.cpp
@@ -312,7 +312,7 @@ sk_sp<SkImage> SkImage_Base::makeColorSpace(sk_sp<SkColorSpace> target) const {
// (1) The color spaces are equal (nullptr is considered to be sRGB).
// (2) The color type is kAlpha8.
if ((!this->colorSpace() && target->isSRGB()) ||
- SkColorSpace_Base::EqualsIgnoreFlags(this->colorSpace(), target.get()) ||
+ SkColorSpace::Equals(this->colorSpace(), target.get()) ||
kAlpha_8_SkColorType == this->onImageInfo().colorType()) {
return sk_ref_sp(const_cast<SkImage_Base*>(this));
}
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index fdbbf82779..cef355e091 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -186,15 +186,13 @@ bool SkSurface_Gpu::Valid(GrContext* context, GrPixelConfig config, SkColorSpace
return !colorSpace || colorSpace->gammaIsLinear();
case kSRGBA_8888_GrPixelConfig:
case kSBGRA_8888_GrPixelConfig:
- return context->caps()->srgbSupport() && colorSpace && colorSpace->gammaCloseToSRGB() &&
- !as_CSB(colorSpace)->nonLinearBlending();
+ return context->caps()->srgbSupport() && colorSpace && colorSpace->gammaCloseToSRGB();
case kRGBA_8888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
// If we don't have sRGB support, we may get here with a color space. It still needs
// to be sRGB-like (so that the application will work correctly on sRGB devices.)
return !colorSpace ||
- (colorSpace->gammaCloseToSRGB() && (!context->caps()->srgbSupport() ||
- !as_CSB(colorSpace)->nonLinearBlending()));
+ (colorSpace->gammaCloseToSRGB() && !context->caps()->srgbSupport());
default:
return !colorSpace;
}