1 /* 2 * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "tcuOhosEglDisplayFactory.hpp" 17 #include "window/tcuOhosWindowFactory.hpp" 18 #include "pixmap/tcuOhosPixmapFactory.hpp" 19 #include "tcuOhosNativeDisplay.hpp" 20 #include "egluGLContextFactory.hpp" 21 #include "eglwLibrary.hpp" 22 #include "eglwFunctions.hpp" 23 #include "eglwEnums.hpp" 24 #include "deUniquePtr.hpp" 25 26 using namespace tcu; 27 using namespace OHOS_ROSEN; 28 using namespace egl; 29 30 using std::string; 31 using de::MovePtr; 32 using de::UniquePtr; 33 using glu::ContextFactory; 34 using eglu::GLContextFactory; 35 using eglu::NativeDisplay; 36 using eglu::NativeDisplayFactory; 37 using eglu::NativeWindow; 38 using eglu::NativeWindowFactory; 39 using eglu::NativePixmap; 40 using eglu::NativePixmapFactory; 41 using eglu::WindowParams; 42 using tcu::TextureLevel; 43 OhosDisplayFactory(void)44OhosDisplayFactory::OhosDisplayFactory (void) 45 : eglu::NativeDisplayFactory("ROSEN", "Rosen Display", OhosDisplay::CAPABILITIES) 46 { 47 //TODO: 增加window,pixmap factory 48 m_nativeWindowRegistry.registerFactory(new OhosWindowFactory()); 49 m_nativePixmapRegistry.registerFactory(new OhosPixmapFactory()); 50 } 51 createDisplay(const eglw::EGLAttrib * attribList) const52NativeDisplay* OhosDisplayFactory::createDisplay (const eglw::EGLAttrib* attribList) const 53 { 54 //TODO: create Rosen display 55 DE_UNREF(attribList); 56 return new OhosDisplay(); 57 } 58