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

Commit 824fd90c authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

libgui: Allow a device to force asynchronous composition

Part of the "hack all the things" series for devices with old
EGL blobs, do async mode when the requested usage includes
HW_RENDER, to avoid timing issues and stuck buffers.
Enable with the EGL_ALWAYS_ASYNC cflag

Change-Id: I5461ef1b2ac10ff36b7587eeec6979f09901c25b
parent 7984461b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -134,6 +134,10 @@ int SurfaceTextureClient::setSwapInterval(int interval) {
    if (interval > maxSwapInterval)
        interval = maxSwapInterval;

#ifdef EGL_ALWAYS_ASYNC
    if (mReqUsage != 0)
        interval = 0;
#endif
    status_t res = mSurfaceTexture->setSynchronousMode(interval ? true : false);

    return res;