diff options
author | Matt Sarett <msarett@google.com> | 2017-03-24 10:06:03 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-24 17:11:26 +0000 |
commit | f3880933092c3226cd7ffd1690fe72c9c0cc376c (patch) | |
tree | 893a45cb711edc327e1a450f1ce3cb2974a42528 /src/image | |
parent | 70288c0a9179f308fc7de1b07899baef4446e444 (diff) |
Delete SkColorSpace::ColorSpaceFlags
BUG=skia:
Change-Id: Ia0688876915cd773614ca0c4ccd467cf6e7c603e
Reviewed-on: https://skia-review.googlesource.com/10105
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/image')
-rw-r--r-- | src/image/SkImage.cpp | 2 | ||||
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 6 |
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; } |