• 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 "tcuOhosNativeDisplay.hpp"
17 #include "egluGLContextFactory.hpp"
18 #include "eglwLibrary.hpp"
19 #include "eglwFunctions.hpp"
20 #include "eglwEnums.hpp"
21 #include "deUniquePtr.hpp"
22 
23 using namespace tcu;
24 using namespace OHOS_ROSEN;
25 using namespace egl;
26 
27 using std::string;
28 using de::MovePtr;
29 using de::UniquePtr;
30 using glu::ContextFactory;
31 using eglu::GLContextFactory;
32 using eglu::NativeDisplay;
33 using eglu::NativeDisplayFactory;
34 using eglu::NativeWindow;
35 using eglu::NativeWindowFactory;
36 using eglu::NativePixmap;
37 using eglu::NativePixmapFactory;
38 using eglu::WindowParams;
39 using tcu::TextureLevel;
40 
OhosDisplay(void)41 OhosDisplay::OhosDisplay (void)
42     : NativeDisplay(eglu::NativeDisplay::CAPABILITY_GET_DISPLAY_LEGACY)
43 {
44     //TODO: create display
45     printf("OhosDisplay::OhosDisplay\n");
46 }
47 
getPlatformNative(void)48 void* OhosDisplay::getPlatformNative (void) {
49     //TODO: 获取rosen display
50     printf("OhosDisplay::getPlatformNative\n");
51     return this;
52 }
53 
getPlatformExtension(void)54 eglw::EGLNativeDisplayType OhosDisplay::getPlatformExtension (void)
55 {
56     //TODO: 获取rosen display
57     printf("OhosDisplay::getPlatformExtension\n");
58     return reinterpret_cast<eglw::EGLNativeDisplayType>(this);
59 }
60 
getLegacyNative(void)61 eglw::EGLNativeDisplayType OhosDisplay::getLegacyNative (void)
62 {
63     //TODO: 获取rosen display
64     printf("OhosDisplay::getLegacyNative\n");
65     return EGL_DEFAULT_DISPLAY;
66 }
67