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

Commit 73114b9b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "C2BqPool: move pool data destruction out of lock"

parents a2ed315a 2c072724
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -576,10 +576,11 @@ public:
            }
        }
        int migrated = 0;
        // poolDatas dtor should not be called during lock is held.
        std::shared_ptr<C2BufferQueueBlockPoolData>
                poolDatas[NUM_BUFFER_SLOTS];
        {
            sp<GraphicBuffer> buffers[NUM_BUFFER_SLOTS];
            std::weak_ptr<C2BufferQueueBlockPoolData>
                    poolDatas[NUM_BUFFER_SLOTS];
            std::scoped_lock<std::mutex> lock(mMutex);
            bool noInit = false;
            for (int i = 0; i < NUM_BUFFER_SLOTS; ++i) {