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

Commit c4039b03 authored by Wonsik Kim's avatar Wonsik Kim
Browse files

C2Buffer: don't check for right and bottom crop at mapping

When mapping the cropped region, it does not prevent calculation
when right and/or bottom is not aligned.

Bug: 353120096
Test: presubmit
Change-Id: I10841ffa76862adc452c8296190965d64b79d4dd
parent b1252561
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1311,8 +1311,7 @@ public:
                for (size_t planeIx = 0; planeIx < mLayout.numPlanes; ++planeIx) {
                    const uint32_t colSampling = mLayout.planes[planeIx].colSampling;
                    const uint32_t rowSampling = mLayout.planes[planeIx].rowSampling;
                    if (crop.left % colSampling || crop.right() % colSampling
                            || crop.top % rowSampling || crop.bottom() % rowSampling) {
                    if (crop.left % colSampling || crop.top % rowSampling) {
                        // cannot calculate data pointer
                        mImpl->getAllocation()->unmap(mData, crop, nullptr);
                        memset(&mLayout, 0, sizeof(mLayout));