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

Commit a7ded878 authored by Rob Carr's avatar Rob Carr Committed by android-build-merger
Browse files

Merge "Transaction::setGeometry: Handle invalid src rect correctly" into qt-dev

am: 8b30c364

Change-Id: I553d0b00e31af6c45c8770b131017809b221f23a
parents f0b330aa 8b30c364
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1149,8 +1149,12 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setGeome

    int x = dst.left;
    int y = dst.top;
    float xScale = dst.getWidth() / static_cast<float>(source.getWidth());
    float yScale = dst.getHeight() / static_cast<float>(source.getHeight());

    float sourceWidth = source.getWidth();
    float sourceHeight = source.getHeight();

    float xScale = sourceWidth < 0 ? 1.0f : dst.getWidth() / sourceWidth;
    float yScale = sourceHeight < 0 ? 1.0f : dst.getHeight() / sourceHeight;
    float matrix[4] = {1, 0, 0, 1};

    switch (transform) {