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

Commit 4d7aacd7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "ACodec: update native window crop rectangle""

parents d0844433 607e6528
Loading
Loading
Loading
Loading
+1 −19
Original line number Original line Diff line number Diff line
@@ -1079,7 +1079,7 @@ status_t ACodec::setupNativeWindowSizeFormatAndUsage(
    mLastNativeWindowDataSpace = HAL_DATASPACE_UNKNOWN;
    mLastNativeWindowDataSpace = HAL_DATASPACE_UNKNOWN;


    ALOGV("gralloc usage: %#x(OMX) => %#x(ACodec)", omxUsage, usage);
    ALOGV("gralloc usage: %#x(OMX) => %#x(ACodec)", omxUsage, usage);
    err = setNativeWindowSizeFormatAndUsage(
    return setNativeWindowSizeFormatAndUsage(
            nativeWindow,
            nativeWindow,
            def.format.video.nFrameWidth,
            def.format.video.nFrameWidth,
            def.format.video.nFrameHeight,
            def.format.video.nFrameHeight,
@@ -1087,24 +1087,6 @@ status_t ACodec::setupNativeWindowSizeFormatAndUsage(
            mRotationDegrees,
            mRotationDegrees,
            usage,
            usage,
            reconnect);
            reconnect);
    if (err == OK) {
        OMX_CONFIG_RECTTYPE rect;
        InitOMXParams(&rect);
        rect.nPortIndex = kPortIndexOutput;
        err = mOMXNode->getConfig(
                OMX_IndexConfigCommonOutputCrop, &rect, sizeof(rect));
        if (err == OK) {
            ALOGV("rect size = %d, %d, %d, %d", rect.nLeft, rect.nTop, rect.nWidth, rect.nHeight);
            android_native_rect_t crop;
            crop.left = rect.nLeft;
            crop.top = rect.nTop;
            crop.right = rect.nLeft + rect.nWidth - 1;
            crop.bottom = rect.nTop + rect.nHeight - 1;
            ALOGV("crop update (%d, %d), (%d, %d)", crop.left, crop.top, crop.right, crop.bottom);
            err = native_window_set_crop(nativeWindow, &crop);
        }
    }
    return err;
}
}


status_t ACodec::configureOutputBuffersFromNativeWindow(
status_t ACodec::configureOutputBuffersFromNativeWindow(