From bb08c62a6a64638829f312d572fb1fd5cc58aea9 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Fri, 26 Aug 2022 21:40:58 +0900 Subject: [PATCH] Wait gles initialize when we try to get MaxTextureSize All other API in configureation-manager wait until GLES initialized. Let GetMaxTextureSize() API also follow this role Change-Id: Ieea15bdb5d807d344a9c1f6c153b2e29b69e7279 Signed-off-by: Eunki, Hong --- dali/internal/system/common/configuration-manager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dali/internal/system/common/configuration-manager.cpp b/dali/internal/system/common/configuration-manager.cpp index dcac08b..12c1c9a 100644 --- a/dali/internal/system/common/configuration-manager.cpp +++ b/dali/internal/system/common/configuration-manager.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. @@ -119,6 +119,13 @@ uint32_t ConfigurationManager::GetMaxTextureSize() if(!mMaxTextureSizeCached) { + if(!mGraphics->IsInitialized()) + { + // Wait until Graphics Subsystem is initialised, but this will happen once. + // This method blocks until the render thread has initialised the graphics. + mThreadController->WaitForGraphicsInitialization(); + } + mMaxTextureSize = mGraphics->GetMaxTextureSize(); mMaxTextureSizeCached = true; -- 2.7.4