remove dead SK_SUPPORT_LEGACY_RASTERLAYERCOLORSPACE code

Bug: skia:
Change-Id: I2a7300fc29bcbff109cc33e277ffbb1fa9d6d94c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200513
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2019-03-12 17:20:35 -04:00 committed by Skia Commit-Bot
parent d618027eaf
commit bf66ed3063
2 changed files with 0 additions and 16 deletions

View File

@ -957,13 +957,9 @@ static SkImageInfo make_layer_info(const SkImageInfo& prev, int w, int h, const
// Need to force L32 for now if we have an image filter.
// If filters ever support other colortypes, e.g. F16, we can modify this check.
if (paint && paint->getImageFilter()) {
#ifdef SK_SUPPORT_LEGACY_RASTERLAYERCOLORSPACE
return SkImageInfo::MakeN32Premul(w, h);
#else
// TODO: can we query the imagefilter, to see if it can handle floats (so we don't always
// use N32 when the layer itself was float)?
return SkImageInfo::MakeN32Premul(w, h, prev.refColorSpace());
#endif
}
SkColorType ct = prev.colorType();

View File

@ -257,14 +257,8 @@ public:
sk_sp<SkSpecialSurface> onMakeSurface(const SkImageFilter::OutputProperties& outProps,
const SkISize& size, SkAlphaType at,
const SkSurfaceProps* props) const override {
#ifdef SK_SUPPORT_LEGACY_RASTERLAYERCOLORSPACE
SkColorSpace* colorSpace = nullptr;
SkColorType colorType = colorSpace && colorSpace->gammaIsLinear()
? kRGBA_F16_SkColorType : kN32_SkColorType;
#else
SkColorSpace* colorSpace = outProps.colorSpace();
SkColorType colorType = kN32_SkColorType; // TODO: find ways to allow f16
#endif
SkImageInfo info = SkImageInfo::Make(size.width(), size.height(), colorType, at,
sk_ref_sp(colorSpace));
return SkSpecialSurface::MakeRaster(info, props);
@ -298,14 +292,8 @@ public:
sk_sp<SkSurface> onMakeTightSurface(const SkImageFilter::OutputProperties& outProps,
const SkISize& size, SkAlphaType at) const override {
#ifdef SK_SUPPORT_LEGACY_RASTERLAYERCOLORSPACE
SkColorSpace* colorSpace = nullptr;
SkColorType colorType = colorSpace && colorSpace->gammaIsLinear()
? kRGBA_F16_SkColorType : kN32_SkColorType;
#else
SkColorSpace* colorSpace = outProps.colorSpace();
SkColorType colorType = kN32_SkColorType; // TODO: find ways to allow f16
#endif
SkImageInfo info = SkImageInfo::Make(size.width(), size.height(), colorType, at,
sk_ref_sp(colorSpace));
return SkSurface::MakeRaster(info);