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

Commit 1791e788 authored by Chia-I Wu's avatar Chia-I Wu
Browse files

graphics: early return in CommandWriterBase::writeQueue

When there is no data to be written, return early.

Bug: 67512553
Test: manual
Change-Id: I4e8dc72ec22293fac7a84b38c98e29d5cf7f78b6
parent ab8307a6
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -92,6 +92,13 @@ public:
    bool writeQueue(bool* outQueueChanged, uint32_t* outCommandLength,
            hidl_vec<hidl_handle>* outCommandHandles)
    {
        if (mDataWritten == 0) {
            *outQueueChanged = false;
            *outCommandLength = 0;
            outCommandHandles->setToExternal(nullptr, 0);
            return true;
        }

        // After data are written to the queue, it may not be read by the
        // remote reader when
        //