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

Commit 0ffa62b2 authored by Chia-I Wu's avatar Chia-I Wu
Browse files

libui: log an error on allocation failure

This was on the gralloc0/gralloc1 path, but was missing from the HIDL
gralloc path.

Bug: 37444686
Test: allocate an invalid buffer
Change-Id: If1ea0e27c228d82abbcd6f6290eb8fee423828e7
parent 1fbefc70
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -137,6 +137,10 @@ status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height,

        return NO_ERROR;
    } else {
        ALOGE("Failed to allocate (%u x %u) layerCount %u format %d "
                "producerUsage %" PRIx64 " consumerUsage %" PRIx64 ": %d",
                width, height, layerCount, format, producerUsage,
                consumerUsage, error);
        return NO_MEMORY;
    }
}