From: Eunki, Hong Date: Wed, 22 Feb 2023 06:55:52 +0000 (+0900) Subject: Move message queue instead of copy X-Git-Tag: dali_2.2.16~7 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-core.git;a=commitdiff_plain;h=5cb00dc7b3e7be449e942c1e0aafc9ff500fe81f Move message queue instead of copy Minor optimzation for message queue Change-Id: I214367f6c7a4cce33ce4b128119476bbaf912344 Signed-off-by: Eunki, Hong --- diff --git a/dali/internal/update/queue/update-message-queue.cpp b/dali/internal/update/queue/update-message-queue.cpp index ba391b0..6f24a68 100644 --- a/dali/internal/update/queue/update-message-queue.cpp +++ b/dali/internal/update/queue/update-message-queue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -248,15 +248,13 @@ bool MessageQueue::ProcessMessages(BufferIndex updateBufferIndex) { // queueMutex must be locked whilst accessing queue MessageQueueMutex::ScopedLock lock(mImpl->queueMutex); - copiedProcessQueue = mImpl->processQueue; mImpl->sceneUpdate >>= 1; - sceneUpdated = (mImpl->sceneUpdate & 0x01); // if it was previously 2, scene graph was updated. mImpl->queueWasEmpty = mImpl->processQueue.empty(); // Flag whether we processed anything - mImpl->processQueue.clear(); + copiedProcessQueue = std::move(mImpl->processQueue); // Move message queue } for(auto&& buffer : copiedProcessQueue)