• 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 #ifndef _TCUOHOSROSENNATIVEDISPLAY_HPP
16 #define _TCUOHOSROSENNATIVEDISPLAY_HPP
17 
18 #include "egluGLContextFactory.hpp"
19 #include "eglwLibrary.hpp"
20 #include "eglwFunctions.hpp"
21 #include "eglwEnums.hpp"
22 #include "deUniquePtr.hpp"
23 
24 namespace tcu
25 {
26 namespace OHOS_ROSEN
27 {
28 namespace egl
29 {
30 
31 using std::string;
32 using de::MovePtr;
33 using de::UniquePtr;
34 using glu::ContextFactory;
35 using eglu::GLContextFactory;
36 using eglu::NativeDisplay;
37 using eglu::NativeDisplayFactory;
38 using eglu::NativeWindow;
39 using eglu::NativeWindowFactory;
40 using eglu::NativePixmap;
41 using eglu::NativePixmapFactory;
42 using eglu::WindowParams;
43 using tcu::TextureLevel;
44 
45 class OhosLibrary : public eglw::DefaultLibrary
46 {
47 public:
OhosLibrary(void)48     OhosLibrary (void)
49         : eglw::DefaultLibrary("libEGL_impl.so")
50     {
51     }
52 };
53 
54 
55 class OhosDisplay : public NativeDisplay
56 {
57 public:
58     static const Capability CAPABILITIES        = Capability(CAPABILITY_GET_DISPLAY_LEGACY);
59 
60     OhosDisplay                (void);
61     // virtual ~OhosDisplay         (void) {};
62 
63     void*                        getPlatformNative        (void);
64     eglw::EGLNativeDisplayType    getPlatformExtension    (void);
65     eglw::EGLNativeDisplayType    getLegacyNative            (void);
66 
67     // NativeDisplay&                getOhosDisplay            (void)            { return *this;}
getLibrary(void) const68     const eglw::Library&        getLibrary                (void) const    { return m_library;    }
getPlatformAttributes(void) const69     const eglw::EGLAttrib*        getPlatformAttributes    (void) const    { return DE_NULL; }
70 
71 private:
72     OhosLibrary                        m_library;
73 };
74 
75 } // egl
76 } // OHOS
77 } // tcu
78 #endif // _TCUOHOSROSENNATIVEDISPLAY_HPP