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

Commit 40efaae3 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Fix gainmaps being wrongly offset when rotated"

parents 3e1f2372 bb2b0a5f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -504,6 +504,8 @@ SkCodec::Result ImageDecoder::extractGainmap(Bitmap* destination) {
    ImageDecoder decoder{std::move(gainmapCodec)};
    // Gainmap inherits the origin of the containing image
    decoder.mOverrideOrigin.emplace(getOrigin());
    // Update mDecodeSize / mTargetSize for the overridden origin
    decoder.setTargetSize(decoder.width(), decoder.height());

    const bool isScaled = width() != mTargetSize.width() || height() != mTargetSize.height();