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

Commit ab702f51 authored by Courtney Goeltzenleuchter's avatar Courtney Goeltzenleuchter
Browse files

Log error when exceeding MAX_LAYERS count

This is not a fix, but logging to make it clearer
what's happening.
Test: for i in {1..1000}; do cts-tradefed run commandAndExit cts-dev \
        --abi armeabi-v7a --no-primary-abi-only       --module \
        CtsOpenGLTestCases -t android.opengl.cts.EglConfigTest#testEglConfigs ; \
      done
      May take a while to run.
      The log message below indicates an issue, most likely leaking layers.
      Once b/3712178 is resolved, should not see this error.
      AddClientLayer failed, mNumLayers (4096) >= MAX_LAYERS (4096)

Bug: 37121786
Also related to Bug: 30948621

Change-Id: I7ed931ae5433657bdc986edc66a9782ff08ed194
parent 4a3e28f4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2637,6 +2637,8 @@ status_t SurfaceFlinger::addClientLayer(const sp<Client>& client,
    {
        Mutex::Autolock _l(mStateLock);
        if (mNumLayers >= MAX_LAYERS) {
            ALOGE("AddClientLayer failed, mNumLayers (%zu) >= MAX_LAYERS (%zu)", mNumLayers,
                  MAX_LAYERS);
            return NO_MEMORY;
        }
        if (parent == nullptr) {