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

Commit 4860b74b authored by Mathias Agopian's avatar Mathias Agopian Committed by The Android Open Source Project
Browse files

am 4d2dbebf: fix for [1885684] E/SurfaceFlinger( 60): not enough memory for...

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

Merge commit '4d2dbebf3d08209f751585d8cc367369e2f6e32f'

* commit '4d2dbebf3d08209f751585d8cc367369e2f6e32f':
  fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap size=4294938624
parents 39433427 6e2d6483
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1212,6 +1212,13 @@ sp<ISurface> SurfaceFlinger::createSurface(ClientID clientId, int pid,
{
    sp<LayerBaseClient> layer;
    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);
    sp<Client> client = mClientsMap.valueFor(clientId);
    if (UNLIKELY(client == 0)) {