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

Commit 6e2d6483 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap size=4294938624

parent 7278a129
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -1236,6 +1236,13 @@ sp<ISurface> SurfaceFlinger::createSurface(ClientID clientId, int pid,
{
{
    LayerBaseClient* layer = 0;
    LayerBaseClient* layer = 0;
    sp<LayerBaseClient::Surface> surfaceHandle;
    sp<LayerBaseClient::Surface> surfaceHandle;

    if (int32_t(w|h) < 0) {
        LOGE("createSurface() failed, w or h is negative (w=%d, h=%d)",
                int(w), int(h));
        return surfaceHandle;
    }
    
    Mutex::Autolock _l(mStateLock);
    Mutex::Autolock _l(mStateLock);
    Client* const c = mClientsMap.valueFor(clientId);
    Client* const c = mClientsMap.valueFor(clientId);
    if (UNLIKELY(!c)) {
    if (UNLIKELY(!c)) {