From f6857330bd12f29b793ed22dc5ca82ec898a1280 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Thu, 12 May 2022 16:16:07 +0900 Subject: [PATCH] Delete Renderers before Shaders Change-Id: Ib7744acb7f4bed8032c50f7a388f74027afb55b2 --- dali/internal/update/common/discard-queue.cpp | 4 ++-- dali/internal/update/manager/update-manager.cpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dali/internal/update/common/discard-queue.cpp b/dali/internal/update/common/discard-queue.cpp index 947253c..0a889a6 100644 --- a/dali/internal/update/common/discard-queue.cpp +++ b/dali/internal/update/common/discard-queue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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. @@ -95,8 +95,8 @@ void DiscardQueue::Clear(BufferIndex updateBufferIndex) { // Destroy some discarded objects; these should no longer own any GL resources mNodeQueue[updateBufferIndex].Clear(); - mShaderQueue[updateBufferIndex].Clear(); mRendererQueue[updateBufferIndex].Clear(); + mShaderQueue[updateBufferIndex].Clear(); mCameraQueue[updateBufferIndex].Clear(); mSceneQueue[updateBufferIndex].Clear(); } diff --git a/dali/internal/update/manager/update-manager.cpp b/dali/internal/update/manager/update-manager.cpp index e5b96d0..879707b 100644 --- a/dali/internal/update/manager/update-manager.cpp +++ b/dali/internal/update/manager/update-manager.cpp @@ -228,6 +228,10 @@ struct UpdateManager::Impl scenes.clear(); delete sceneController; + + // Ensure to clear renderers + renderers.Clear(); + shaders.Clear(); } /** -- 2.7.4