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

Commit df75f8b3 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Notify surfaceflinger about (changes to) the crop rectangle output by the decoder."

parents 1d8479fa 5145d67e
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2109,6 +2109,17 @@ void OMXCodec::onEvent(OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2) {
                    CODEC_LOGV(
                            "output crop (%ld, %ld, %ld, %ld)",
                            rect.nLeft, rect.nTop, rect.nWidth, rect.nHeight);

                    if (mNativeWindow != NULL) {
                        android_native_rect_t crop;
                        crop.left = rect.nLeft;
                        crop.top = rect.nTop;
                        crop.right = crop.left + rect.nWidth - 1;
                        crop.bottom = crop.top + rect.nHeight - 1;

                        CHECK_EQ(0, native_window_set_crop(
                                    mNativeWindow.get(), &crop));
                    }
                } else {
                    CODEC_LOGE("getConfig(OMX_IndexConfigCommonOutputCrop) "
                               "returned error 0x%08x", err);