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

Commit d93edc76 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix potential thread violation in applying gainmaps" into udc-qpr-dev am: 7e9773de

parents a16769bc 7e9773de
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -54,14 +54,13 @@ float getTargetHdrSdrRatio(const SkColorSpace* destColorspace) {
        return maxPQLux / GenericSdrWhiteNits;
    } else if (skcms_TransferFunction_isHLGish(&destTF)) {
        return maxHLGLux / GenericSdrWhiteNits;
    } else {
#ifdef __ANDROID__
    } else if (RenderThread::isCurrent()) {
        CanvasContext* context = CanvasContext::getActiveContext();
        return context ? context->targetSdrHdrRatio() : 1.f;
#else
        return 1.f;
#endif
    }
    return 1.f;
}

void DrawGainmapBitmap(SkCanvas* c, const sk_sp<const SkImage>& image, const SkRect& src,