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

Commit 25a147aa authored by Lajos Molnar's avatar Lajos Molnar
Browse files

stagefright: set crop rect in SoftwareRenderer

Bug: 9563986
Change-Id: Id66a21ef8cdd8350e3eb95d6359fe9c1b94c4f98
parent f7999047
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -112,6 +112,17 @@ SoftwareRenderer::SoftwareRenderer(
                bufHeight,
                halFormat));

    // NOTE: native window uses extended right-bottom coordinate
    android_native_rect_t crop;
    crop.left = mCropLeft;
    crop.top = mCropTop;
    crop.right = mCropRight + 1;
    crop.bottom = mCropBottom + 1;
    ALOGV("setting crop: [%d, %d, %d, %d] for size [%zu, %zu]",
          crop.left, crop.top, crop.right, crop.bottom, bufWidth, bufHeight);

    CHECK_EQ(0, native_window_set_crop(mNativeWindow.get(), &crop));

    uint32_t transform;
    switch (rotationDegrees) {
        case 0: transform = 0; break;