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

Commit 3dec083f authored by Brian Osman's avatar Brian Osman Committed by Android (Google) Code Review
Browse files

Merge "Update RenderEngine to use newer SkRuntimeEffect::MakeForShader" into sc-dev

parents de2afa82 15d26578
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ BlurFilter::BlurFilter() {
        }
    )");

    auto [blurEffect, error] = SkRuntimeEffect::Make(blurString);
    auto [blurEffect, error] = SkRuntimeEffect::MakeForShader(blurString);
    if (!blurEffect) {
        LOG_ALWAYS_FATAL("RuntimeShader error: %s", error.c_str());
    }
@@ -65,11 +65,11 @@ BlurFilter::BlurFilter() {
        uniform float mixFactor;

        half4 main(float2 xy) {
            return half4(mix(sample(originalInput), sample(blurredInput), mixFactor));
            return half4(mix(sample(originalInput, xy), sample(blurredInput, xy), mixFactor));
        }
    )");

    auto [mixEffect, mixError] = SkRuntimeEffect::Make(mixString);
    auto [mixEffect, mixError] = SkRuntimeEffect::MakeForShader(mixString);
    if (!mixEffect) {
        LOG_ALWAYS_FATAL("RuntimeShader error: %s", mixError.c_str());
    }
+1 −1
Original line number Diff line number Diff line
@@ -438,7 +438,7 @@ sk_sp<SkRuntimeEffect> buildRuntimeEffect(const LinearEffect& linearEffect) {
    generateOETF(linearEffect.outputDataspace, shaderString);
    generateEffectiveOOTF(linearEffect.undoPremultipliedAlpha, shaderString);

    auto [shader, error] = SkRuntimeEffect::Make(shaderString);
    auto [shader, error] = SkRuntimeEffect::MakeForShader(shaderString);
    if (!shader) {
        LOG_ALWAYS_FATAL("LinearColorFilter construction error: %s", error.c_str());
    }