1e5c31af7Sopenharmony_ci/* 2e5c31af7Sopenharmony_ci * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. 3e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License. 5e5c31af7Sopenharmony_ci * You may obtain a copy of the License at 6e5c31af7Sopenharmony_ci * 7e5c31af7Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8e5c31af7Sopenharmony_ci * 9e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and 13e5c31af7Sopenharmony_ci * limitations under the License. 14e5c31af7Sopenharmony_ci */ 15e5c31af7Sopenharmony_ci 16e5c31af7Sopenharmony_ci#ifndef _TCUOHOSPLATFORM_HPP 17e5c31af7Sopenharmony_ci#define _TCUOHOSPLATFORM_HPP 18e5c31af7Sopenharmony_ci 19e5c31af7Sopenharmony_ci#include "tcuPlatform.hpp" 20e5c31af7Sopenharmony_ci#include "gluPlatform.hpp" 21e5c31af7Sopenharmony_ci#include "egluPlatform.hpp" 22e5c31af7Sopenharmony_ci#include "vkPlatform.hpp" 23e5c31af7Sopenharmony_ci#include "vkWsiPlatform.hpp" 24e5c31af7Sopenharmony_ci 25e5c31af7Sopenharmony_cinamespace tcu 26e5c31af7Sopenharmony_ci{ 27e5c31af7Sopenharmony_cinamespace OHOS_ROSEN 28e5c31af7Sopenharmony_ci{ 29e5c31af7Sopenharmony_ci class OhosPlatform : public tcu::Platform, private eglu::Platform, private glu::Platform, private vk::Platform 30e5c31af7Sopenharmony_ci { 31e5c31af7Sopenharmony_ci public: 32e5c31af7Sopenharmony_ci OhosPlatform (void); 33e5c31af7Sopenharmony_ci virtual ~OhosPlatform (void) {}; 34e5c31af7Sopenharmony_ci const glu::Platform& getGLPlatform (void) const { return static_cast<const glu::Platform&>(*this); } 35e5c31af7Sopenharmony_ci const eglu::Platform& getEGLPlatform (void) const { return static_cast<const eglu::Platform&>(*this); } 36e5c31af7Sopenharmony_ci const vk::Platform& getVulkanPlatform (void) const { return static_cast<const vk::Platform&>(*this); } 37e5c31af7Sopenharmony_ci 38e5c31af7Sopenharmony_ci vk::wsi::Display* createWsiDisplay (vk::wsi::Type wsiType) const; 39e5c31af7Sopenharmony_ci vk::Library* createLibrary (LibraryType libraryType = LIBRARY_TYPE_VULKAN, const char* libraryPath = DE_NULL) const; 40e5c31af7Sopenharmony_ci bool hasDisplay (vk::wsi::Type wsiType) const; 41e5c31af7Sopenharmony_ci void describePlatform (std::ostream& dst) const; 42e5c31af7Sopenharmony_ci void getMemoryLimits (tcu::PlatformMemoryLimits& limits) const; 43e5c31af7Sopenharmony_ci private: 44e5c31af7Sopenharmony_ci }; 45e5c31af7Sopenharmony_ci 46e5c31af7Sopenharmony_ci } 47e5c31af7Sopenharmony_ci} 48e5c31af7Sopenharmony_ci 49e5c31af7Sopenharmony_citcu::Platform* createOhosPlatform (void); 50e5c31af7Sopenharmony_ci#endif // _TCUOHOSPLATFORM_HPP 51