1 #ifndef DALI_INTERNAL_ENVIRONMENT_CONFIGURATION_MANAGER_H
2 #define DALI_INTERNAL_ENVIRONMENT_CONFIGURATION_MANAGER_H
5 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
36 class ThreadController;
39 * This class retrieves and caches the system configuration.
40 * Some of the methods in this class can block system until GL has been initialized,
41 * only at the first time the DALi application is launched in the system.
43 class ConfigurationManager
50 ConfigurationManager( std::string systemCachePath, EglGraphics* eglGraphics, ThreadController* threadController );
53 * @brief Virtual Destructor for interface cleanup
55 virtual ~ConfigurationManager();
58 * @brief Retrieve all keys from the config file if the file exists.
60 void RetrieveKeysFromConfigFile( const std::string& configFilePath );
63 * @brief Get the maximum texture size.
64 * @return The maximum texture size
66 uint32_t GetMaxTextureSize();
69 * @brief Get the GLSL version that the system supports
70 * @return the GLSL version.
72 uint32_t GetShadingLanguageVersion();
75 * @brief Check whether multiple window is supported
76 * @return Whether multiple window is supported
78 bool IsMultipleWindowSupported();
81 * @brief Check whether blend equation advanced (extension) is supported
82 * @return Whether blend equation advanced (extension is supported
84 bool IsAdvancedBlendEquationSupported();
86 // Deleted copy constructor.
87 ConfigurationManager( const ConfigurationManager& ) = delete;
89 // Deleted move constructor.
90 ConfigurationManager( const ConfigurationManager&& ) = delete;
92 // Deleted assignment operator.
93 ConfigurationManager& operator=( const ConfigurationManager& ) = delete;
95 // Deleted move assignment operator.
96 ConfigurationManager& operator=( const ConfigurationManager&& ) = delete;
100 std::string mSystemCacheFilePath; ///< The path of system cache file
101 EglGraphics* mEglGraphics; ///< EGL graphics
102 ThreadController* mThreadController; ///< The thread controller
103 unsigned int mMaxTextureSize; ///< The largest texture that the GL can handle
104 unsigned int mGlslVersion; ///< The GLSL version that the system supports.
105 bool mIsMultipleWindowSupported:1; ///< Whether multiple window is supported by the GLES
106 bool mIsAdvancedBlendEquationSupported:1; ///< Whether blend equation advanced (extension) is supported by the GLES
107 bool mMaxTextureSizeCached:1; ///< Whether we have checked the maximum texture size
108 bool mIsMultipleWindowSupportedCached:1; ///< Whether we have checked the support of multiple window
109 bool mIsAdvancedBlendEquationSupportedCached:1;///< Whether we have checked the support of blend equation advanced (extension)
110 bool mGlslVersionCached:1; ///< Whether we have checked the GLSL version
117 #endif // DALI_INTERNAL_ENVIRONMENT_CONFIGURATION_MANAGER_H