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

Commit f3450690 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

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

somehow this change got lost.

Change-Id: I36f6c7ef3f782918042b77e9dc91a4c811d84a40
parent 0e5484f7
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)
{