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

Commit 5caf3e3e authored by Mathias Agopian's avatar Mathias Agopian Committed by Android (Google) Code Review
Browse files

Merge "[3211070] camera preview image is rendered offset from the UI overlay frame"

parents 695b66f0 f3450690
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -233,12 +233,19 @@ void Layer::setPerFrameData(hwc_layer_t* hwcl) {
        return;
    }
    hwcl->handle = buffer->handle;
    // TODO: set the crop value properly

    if (!mBufferCrop.isEmpty()) {
        hwcl->sourceCrop.left   = mBufferCrop.left;
        hwcl->sourceCrop.top    = mBufferCrop.top;
        hwcl->sourceCrop.right  = mBufferCrop.right;
        hwcl->sourceCrop.bottom = mBufferCrop.bottom;
    } else {
        hwcl->sourceCrop.left   = 0;
        hwcl->sourceCrop.top    = 0;
        hwcl->sourceCrop.right  = buffer->width;
        hwcl->sourceCrop.bottom = buffer->height;
    }
}

void Layer::reloadTexture(const Region& dirty)
{