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

Commit a88a2c36 authored by Sravan Kumar D.V.N's avatar Sravan Kumar D.V.N Committed by Giulio Cervera
Browse files

SurfaceTextureClient : Reset buffer size to 0 after setting geometry

Buffer size has to be reset to 0 after setting geometry , otherwise
the new request may get the buffer with wrong size.

CRs-Fixed: 337041
(cherry picked from commit 9b3ebedad4f53b7348135dac827392a39b01f69f)

Change-Id: Id9afe01c80912d3245c2f37ddac51f550c896dce
parent 6077d33a
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -399,13 +399,29 @@ int SurfaceTextureClient::dispatchSetBuffersGeometry(va_list args) {
    if (err != 0) {
        return err;
    }
#ifdef QCOM_HARDWARE
    LOGV("Resetting the Buffer size to 0 after SET GEOMETRY");
    err = performQcomOperation(NATIVE_WINDOW_SET_BUFFERS_SIZE, 0, 0, 0);
    if (err != 0) {
        return err;
    }
#endif
    return setBuffersFormat(f);
}

int SurfaceTextureClient::dispatchSetBuffersDimensions(va_list args) {
    int w = va_arg(args, int);
    int h = va_arg(args, int);
#ifndef QCOM_HARDWARE
    return setBuffersDimensions(w, h);
#else
    int err = setBuffersDimensions(w, h);
    if (err != 0) {
        return err;
    }
    LOGV("Resetting the Buffer size to 0 after SET DIMENSIONS");
    return performQcomOperation(NATIVE_WINDOW_SET_BUFFERS_SIZE, 0, 0, 0);
#endif
}

int SurfaceTextureClient::dispatchSetBuffersFormat(va_list args) {