From 5cb00dc7b3e7be449e942c1e0aafc9ff500fe81f Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Wed, 22 Feb 2023 15:55:52 +0900 Subject: [PATCH] Move message queue instead of copy Minor optimzation for message queue Change-Id: I214367f6c7a4cce33ce4b128119476bbaf912344 Signed-off-by: Eunki, Hong --- dali/internal/update/queue/update-message-queue.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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) -- 2.7.4