• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "tcuOhosPlatform.hpp"
17 
18 #include "deUniquePtr.hpp"
19 
20 
21 #include "egluGLContextFactory.hpp"
22 #include "display/tcuOhosEglDisplayFactory.hpp"
23 #include "context/tcuOhosEglContextFactory.hpp"
24 
25 using de::MovePtr;
26 using de::UniquePtr;
27 
28 using namespace tcu;
29 using namespace OHOS_ROSEN;
30 
OhosPlatform(void)31 OhosPlatform::OhosPlatform (void)
32 {
33     printf("OhosPlatform construct!\n");
34     m_nativeDisplayFactoryRegistry.registerFactory(new OHOS_ROSEN::egl::OhosDisplayFactory());
35     m_contextFactoryRegistry.registerFactory(new OHOS_ROSEN::egl::OhosContextFactory());
36 }
37 
createOhosPlatform(void)38 tcu::Platform* createOhosPlatform (void)
39 {
40     return new tcu::OHOS_ROSEN::OhosPlatform();
41 }
42