Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5c3f876 authored by Noelle Scobie's avatar Noelle Scobie
Browse files

Remove now-obsolete destColorspace argument to SkGainmapShader::Make

With https://skia-review.googlesource.com/c/skia/+/986176, the canvas's
working colorspace is used internally (same as prior behavior here), and
this argument is now a no-op -- moving to the new API.

Test: presubmit
Flag: EXEMPT trivial refactor
Bug: N/A
Change-Id: Ibfddbe7689065f34e3e63c3e07e7e9e725211d80
parent ba9d9187
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -71,8 +71,7 @@ void DrawGainmapBitmap(SkCanvas* c, const sk_sp<const SkImage>& image, const SkR
                       const sk_sp<const SkImage>& gainmapImage, const SkGainmapInfo& gainmapInfo) {
    ATRACE_CALL();
#ifdef __ANDROID__
    auto destColorspace = c->imageInfo().refColorSpace();
    float targetSdrHdrRatio = getTargetHdrSdrRatio(destColorspace.get());
    float targetSdrHdrRatio = getTargetHdrSdrRatio(c->imageInfo().colorSpace());
    const bool baseImageHdr = gainmapInfo.fBaseImageType == SkGainmapInfo::BaseImageType::kHDR;
    if (gainmapImage && ((baseImageHdr && targetSdrHdrRatio < gainmapInfo.fDisplayRatioHdr) ||
                         (!baseImageHdr && targetSdrHdrRatio > gainmapInfo.fDisplayRatioSdr))) {
@@ -87,7 +86,7 @@ void DrawGainmapBitmap(SkCanvas* c, const sk_sp<const SkImage>& image, const SkR
        gainmapSrc.fBottom *= sY;
        auto shader =
                SkGainmapShader::Make(image, src, sampling, gainmapImage, gainmapSrc, sampling,
                                      gainmapInfo, dst, targetSdrHdrRatio, destColorspace);
                                      gainmapInfo, dst, targetSdrHdrRatio);
        gainmapPaint.setShader(shader);
        c->drawRect(dst, gainmapPaint);
    } else