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

Commit fab78640 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Let LayerDrawable choose the best scaling filter for readback." into...

Merge "Let LayerDrawable choose the best scaling filter for readback." into rvc-dev am: ee45de31 am: 59f97c80 am: 2aca970f am: ae8a59f7

Change-Id: I90e1f657ef52870299f57005a0165b488a71be6f
parents b23d3513 ae8a59f7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -145,12 +145,11 @@ CopyResult Readback::copyImageInto(const sk_sp<SkImage>& image, Matrix4& texTran
    }

    Layer layer(mRenderThread.renderState(), nullptr, 255, SkBlendMode::kSrc);
    bool disableFilter = MathUtils::areEqual(skiaSrcRect.width(), skiaDestRect.width()) &&
                         MathUtils::areEqual(skiaSrcRect.height(), skiaDestRect.height());
    layer.setForceFilter(!disableFilter);
    layer.setSize(displayedWidth, displayedHeight);
    texTransform.copyTo(layer.getTexTransform());
    layer.setImage(image);
    // Scaling filter is not explicitly set here, because it is done inside copyLayerInfo
    // after checking the necessity based on the src/dest rect size and the transformation.
    if (copyLayerInto(&layer, &skiaSrcRect, &skiaDestRect, bitmap)) {
        copyResult = CopyResult::Success;
    }