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 #include "egluDefs.hpp"
24
25 using namespace tcu;
26 using namespace OHOS_ROSEN;
27 using namespace egl;
28
29 using std::string;
30 using de::MovePtr;
31 using de::UniquePtr;
32 using glu::ContextFactory;
33 using eglu::GLContextFactory;
34 using eglu::NativeDisplay;
35 using eglu::NativeDisplayFactory;
36 using eglu::NativeWindow;
37 using eglu::NativeWindowFactory;
38 using eglu::NativePixmap;
39 using eglu::NativePixmapFactory;
40 using eglu::WindowParams;
41 using tcu::TextureLevel;
42
43 #include "ohos_context_i.h"
44
OhosDisplay(void)45 OhosDisplay::OhosDisplay (void)
46 : NativeDisplay(CAPABILITIES)
47 {
48 //TODO: create display
49 printf("OhosDisplay::OhosDisplay\n");
50 }
51
getPlatformNative(void)52 void* OhosDisplay::getPlatformNative (void) {
53 //TODO: 获取rosen display
54 printf("OhosDisplay::getPlatformNative\n");
55 return EGL_DEFAULT_DISPLAY;
56 }
57
58 // eglw::EGLNativeDisplayType OhosDisplay::getPlatformExtension (void)
59 // {
60 // //TODO: 获取rosen display
61 // printf("OhosDisplay::getPlatformExtension\n");
62 // return reinterpret_cast<eglw::EGLNativeDisplayType>(this);
63 // }
64
getLegacyNative(void)65 eglw::EGLNativeDisplayType OhosDisplay::getLegacyNative (void)
66 {
67 //TODO: 获取rosen display
68 printf("OhosDisplay::getLegacyNative\n");
69 return EGL_DEFAULT_DISPLAY;
70 }
71
72 // call2_BEGIN
bindAPI(eglw::EGLenum api) const73 eglw::EGLBoolean OhosLibrary::bindAPI(eglw::EGLenum api) const
74 {
75 return OHOS::OhosContextI::GetInstance().OH_bindAPI(api);
76 }
77
bindTexImage(eglw::EGLDisplay dpy,eglw::EGLSurface surface,eglw::EGLint buffer) const78 eglw::EGLBoolean OhosLibrary::bindTexImage(eglw::EGLDisplay dpy, eglw::EGLSurface surface, eglw::EGLint buffer) const
79 {
80 return OHOS::OhosContextI::GetInstance().OH_bindTexImage(dpy, surface, buffer);
81 }
82
chooseConfig(eglw::EGLDisplay dpy,const eglw::EGLint * attrib_list,eglw::EGLConfig * configs,eglw::EGLint config_size,eglw::EGLint * num_config) const83 eglw::EGLBoolean OhosLibrary::chooseConfig(eglw::EGLDisplay dpy, const eglw::EGLint *attrib_list, eglw::EGLConfig *configs, eglw::EGLint config_size, eglw::EGLint *num_config) const
84 {
85 return OHOS::OhosContextI::GetInstance().OH_chooseConfig(dpy, attrib_list, configs, config_size, num_config);
86 }
87
clientWaitSync(eglw::EGLDisplay dpy,eglw::EGLSync sync,eglw::EGLint flags,eglw::EGLTime timeout) const88 eglw::EGLint OhosLibrary::clientWaitSync(eglw::EGLDisplay dpy, eglw::EGLSync sync, eglw::EGLint flags, eglw::EGLTime timeout) const
89 {
90 return OHOS::OhosContextI::GetInstance().OH_clientWaitSync(dpy, sync, flags, timeout);
91 }
92
clientWaitSyncKHR(eglw::EGLDisplay dpy,eglw::EGLSyncKHR sync,eglw::EGLint flags,eglw::EGLTimeKHR timeout) const93 eglw::EGLint OhosLibrary::clientWaitSyncKHR(eglw::EGLDisplay dpy, eglw::EGLSyncKHR sync, eglw::EGLint flags, eglw::EGLTimeKHR timeout) const
94 {
95 return OHOS::OhosContextI::GetInstance().OH_clientWaitSyncKHR(dpy, sync, flags, timeout);
96 }
97
copyBuffers(eglw::EGLDisplay dpy,eglw::EGLSurface surface,eglw::EGLNativePixmapType target) const98 eglw::EGLBoolean OhosLibrary::copyBuffers(eglw::EGLDisplay dpy, eglw::EGLSurface surface, eglw::EGLNativePixmapType target) const
99 {
100 return OHOS::OhosContextI::GetInstance().OH_copyBuffers(dpy, surface, target);
101 }
102
createContext(eglw::EGLDisplay dpy,eglw::EGLConfig config,eglw::EGLContext share_context,const eglw::EGLint * attrib_list) const103 eglw::EGLContext OhosLibrary::createContext(eglw::EGLDisplay dpy, eglw::EGLConfig config, eglw::EGLContext share_context, const eglw::EGLint *attrib_list) const
104 {
105 return OHOS::OhosContextI::GetInstance().OH_createContext(dpy, config, share_context, attrib_list);
106 }
107
createImage(eglw::EGLDisplay dpy,eglw::EGLContext ctx,eglw::EGLenum target,eglw::EGLClientBuffer buffer,const eglw::EGLAttrib * attrib_list) const108 eglw::EGLImage OhosLibrary::createImage(eglw::EGLDisplay dpy, eglw::EGLContext ctx, eglw::EGLenum target, eglw::EGLClientBuffer buffer, const eglw::EGLAttrib *attrib_list) const
109 {
110 return OHOS::OhosContextI::GetInstance().OH_createImage(dpy, ctx, target, buffer, reinterpret_cast<const int *>(attrib_list));
111 }
112
createImageKHR(eglw::EGLDisplay dpy,eglw::EGLContext ctx,eglw::EGLenum target,eglw::EGLClientBuffer buffer,const eglw::EGLint * attrib_list) const113 eglw::EGLImageKHR OhosLibrary::createImageKHR(eglw::EGLDisplay dpy, eglw::EGLContext ctx, eglw::EGLenum target, eglw::EGLClientBuffer buffer, const eglw::EGLint *attrib_list) const
114 {
115 return OHOS::OhosContextI::GetInstance().OH_createImageKHR(dpy, ctx, target, buffer, attrib_list);
116 }
117
createPbufferFromClientBuffer(eglw::EGLDisplay dpy,eglw::EGLenum buftype,eglw::EGLClientBuffer buffer,eglw::EGLConfig config,const eglw::EGLint * attrib_list) const118 eglw::EGLSurface OhosLibrary::createPbufferFromClientBuffer(eglw::EGLDisplay dpy, eglw::EGLenum buftype, eglw::EGLClientBuffer buffer, eglw::EGLConfig config, const eglw::EGLint *attrib_list) const
119 {
120 return OHOS::OhosContextI::GetInstance().OH_createPbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list);
121 }
122
createPbufferSurface(eglw::EGLDisplay dpy,eglw::EGLConfig config,const eglw::EGLint * attrib_list) const123 eglw::EGLSurface OhosLibrary::createPbufferSurface(eglw::EGLDisplay dpy, eglw::EGLConfig config, const eglw::EGLint *attrib_list) const
124 {
125 return OHOS::OhosContextI::GetInstance().OH_createPbufferSurface(dpy, config, attrib_list);
126 }
127
createPixmapSurface(eglw::EGLDisplay dpy,eglw::EGLConfig config,eglw::EGLNativePixmapType pixmap,const eglw::EGLint * attrib_list) const128 eglw::EGLSurface OhosLibrary::createPixmapSurface(eglw::EGLDisplay dpy, eglw::EGLConfig config, eglw::EGLNativePixmapType pixmap, const eglw::EGLint *attrib_list) const
129 {
130 return OHOS::OhosContextI::GetInstance().OH_createPixmapSurface(dpy, config, pixmap, attrib_list);
131 }
132
createPlatformPixmapSurface(eglw::EGLDisplay dpy,eglw::EGLConfig config,void * native_pixmap,const eglw::EGLAttrib * attrib_list) const133 eglw::EGLSurface OhosLibrary::createPlatformPixmapSurface(eglw::EGLDisplay dpy, eglw::EGLConfig config, void *native_pixmap, const eglw::EGLAttrib *attrib_list) const
134 {
135 return OHOS::OhosContextI::GetInstance().OH_createPlatformPixmapSurface(dpy, config, native_pixmap, reinterpret_cast<const int *>(attrib_list));
136 }
137
createPlatformPixmapSurfaceEXT(eglw::EGLDisplay dpy,eglw::EGLConfig config,void * native_pixmap,const eglw::EGLint * attrib_list) const138 eglw::EGLSurface OhosLibrary::createPlatformPixmapSurfaceEXT(eglw::EGLDisplay dpy, eglw::EGLConfig config, void *native_pixmap, const eglw::EGLint *attrib_list) const
139 {
140 return OHOS::OhosContextI::GetInstance().OH_createPlatformPixmapSurfaceEXT(dpy, config, native_pixmap, attrib_list);
141 }
142
createPlatformWindowSurface(eglw::EGLDisplay dpy,eglw::EGLConfig config,void * native_window,const eglw::EGLAttrib * attrib_list) const143 eglw::EGLSurface OhosLibrary::createPlatformWindowSurface(eglw::EGLDisplay dpy, eglw::EGLConfig config, void *native_window, const eglw::EGLAttrib *attrib_list) const
144 {
145 return OHOS::OhosContextI::GetInstance().OH_createPlatformWindowSurface(dpy, config, native_window, reinterpret_cast<const int *>(attrib_list));
146 }
147
createPlatformWindowSurfaceEXT(eglw::EGLDisplay dpy,eglw::EGLConfig config,void * native_window,const eglw::EGLint * attrib_list) const148 eglw::EGLSurface OhosLibrary::createPlatformWindowSurfaceEXT(eglw::EGLDisplay dpy, eglw::EGLConfig config, void *native_window, const eglw::EGLint *attrib_list) const
149 {
150 return OHOS::OhosContextI::GetInstance().OH_createPlatformWindowSurfaceEXT(dpy, config, native_window, attrib_list);
151 }
152
createSync(eglw::EGLDisplay dpy,eglw::EGLenum type,const eglw::EGLAttrib * attrib_list) const153 eglw::EGLSync OhosLibrary::createSync(eglw::EGLDisplay dpy, eglw::EGLenum type, const eglw::EGLAttrib *attrib_list) const
154 {
155 return OHOS::OhosContextI::GetInstance().OH_createSync(dpy, type, reinterpret_cast<const int *>(attrib_list));
156 }
157
createSyncKHR(eglw::EGLDisplay dpy,eglw::EGLenum type,const eglw::EGLint * attrib_list) const158 eglw::EGLSyncKHR OhosLibrary::createSyncKHR(eglw::EGLDisplay dpy, eglw::EGLenum type, const eglw::EGLint *attrib_list) const
159 {
160 return OHOS::OhosContextI::GetInstance().OH_createSyncKHR(dpy, type, attrib_list);
161 }
162
createWindowSurface(eglw::EGLDisplay dpy,eglw::EGLConfig config,eglw::EGLNativeWindowType win,const eglw::EGLint * attrib_list) const163 eglw::EGLSurface OhosLibrary::createWindowSurface(eglw::EGLDisplay dpy, eglw::EGLConfig config, eglw::EGLNativeWindowType win, const eglw::EGLint *attrib_list) const
164 {
165 return OHOS::OhosContextI::GetInstance().OH_createWindowSurface(dpy, config, win, attrib_list);
166 }
167
destroyContext(eglw::EGLDisplay dpy,eglw::EGLContext ctx) const168 eglw::EGLBoolean OhosLibrary::destroyContext(eglw::EGLDisplay dpy, eglw::EGLContext ctx) const
169 {
170 return OHOS::OhosContextI::GetInstance().OH_destroyContext(dpy, ctx);
171 }
172
destroyImage(eglw::EGLDisplay dpy,eglw::EGLImage image) const173 eglw::EGLBoolean OhosLibrary::destroyImage(eglw::EGLDisplay dpy, eglw::EGLImage image) const
174 {
175 return OHOS::OhosContextI::GetInstance().OH_destroyImage(dpy, image);
176 }
177
destroyImageKHR(eglw::EGLDisplay dpy,eglw::EGLImageKHR image) const178 eglw::EGLBoolean OhosLibrary::destroyImageKHR(eglw::EGLDisplay dpy, eglw::EGLImageKHR image) const
179 {
180 return OHOS::OhosContextI::GetInstance().OH_destroyImageKHR(dpy, image);
181 }
182
destroySurface(eglw::EGLDisplay dpy,eglw::EGLSurface surface) const183 eglw::EGLBoolean OhosLibrary::destroySurface(eglw::EGLDisplay dpy, eglw::EGLSurface surface) const
184 {
185 return OHOS::OhosContextI::GetInstance().OH_destroySurface(dpy, surface);
186 }
187
destroySync(eglw::EGLDisplay dpy,eglw::EGLSync sync) const188 eglw::EGLBoolean OhosLibrary::destroySync(eglw::EGLDisplay dpy, eglw::EGLSync sync) const
189 {
190 return OHOS::OhosContextI::GetInstance().OH_destroySync(dpy, sync);
191 }
192
destroySyncKHR(eglw::EGLDisplay dpy,eglw::EGLSyncKHR sync) const193 eglw::EGLBoolean OhosLibrary::destroySyncKHR(eglw::EGLDisplay dpy, eglw::EGLSyncKHR sync) const
194 {
195 return OHOS::OhosContextI::GetInstance().OH_destroySyncKHR(dpy, sync);
196 }
197
getConfigAttrib(eglw::EGLDisplay dpy,eglw::EGLConfig config,eglw::EGLint attribute,eglw::EGLint * value) const198 eglw::EGLBoolean OhosLibrary::getConfigAttrib(eglw::EGLDisplay dpy, eglw::EGLConfig config, eglw::EGLint attribute, eglw::EGLint *value) const
199 {
200 return OHOS::OhosContextI::GetInstance().OH_getConfigAttrib(dpy, config, attribute, value);
201 }
202
getConfigs(eglw::EGLDisplay dpy,eglw::EGLConfig * configs,eglw::EGLint config_size,eglw::EGLint * num_config) const203 eglw::EGLBoolean OhosLibrary::getConfigs(eglw::EGLDisplay dpy, eglw::EGLConfig *configs, eglw::EGLint config_size, eglw::EGLint *num_config) const
204 {
205 return OHOS::OhosContextI::GetInstance().OH_getConfigs(dpy, configs, config_size, num_config);
206 }
207
getCurrentContext() const208 eglw::EGLContext OhosLibrary::getCurrentContext() const
209 {
210 return OHOS::OhosContextI::GetInstance().OH_getCurrentContext();
211 }
212
getCurrentDisplay() const213 eglw::EGLDisplay OhosLibrary::getCurrentDisplay() const
214 {
215 return OHOS::OhosContextI::GetInstance().OH_getCurrentDisplay();
216 }
217
getCurrentSurface(eglw::EGLint readdraw) const218 eglw::EGLSurface OhosLibrary::getCurrentSurface(eglw::EGLint readdraw) const
219 {
220 return OHOS::OhosContextI::GetInstance().OH_getCurrentSurface(readdraw);
221 }
222
getDisplay(eglw::EGLNativeDisplayType display_id) const223 eglw::EGLDisplay OhosLibrary::getDisplay(eglw::EGLNativeDisplayType display_id) const
224 {
225 return OHOS::OhosContextI::GetInstance().OH_getDisplay(display_id);
226 }
227
getError() const228 eglw::EGLint OhosLibrary::getError() const
229 {
230 return OHOS::OhosContextI::GetInstance().OH_getError();
231 }
232
getPlatformDisplay(eglw::EGLenum platform,void * native_display,const eglw::EGLAttrib * attrib_list) const233 eglw::EGLDisplay OhosLibrary::getPlatformDisplay(eglw::EGLenum platform, void *native_display, const eglw::EGLAttrib *attrib_list) const
234 {
235 return OHOS::OhosContextI::GetInstance().OH_getPlatformDisplay(platform, native_display, reinterpret_cast<const int *>(attrib_list));
236 }
237
getPlatformDisplayEXT(eglw::EGLenum platform,void * native_display,const eglw::EGLint * attrib_list) const238 eglw::EGLDisplay OhosLibrary::getPlatformDisplayEXT(eglw::EGLenum platform, void *native_display, const eglw::EGLint *attrib_list) const
239 {
240 return OHOS::OhosContextI::GetInstance().OH_getPlatformDisplayEXT(platform, native_display, attrib_list);
241 }
242
getProcAddress(const char * procname) const243 eglw::__eglMustCastToProperFunctionPointerType OhosLibrary::getProcAddress(const char *procname) const
244 {
245 return OHOS::OhosContextI::GetInstance().OH_getProcAddress(procname);
246 }
247
getSyncAttrib(eglw::EGLDisplay dpy,eglw::EGLSync sync,eglw::EGLint attribute,eglw::EGLAttrib * value) const248 eglw::EGLBoolean OhosLibrary::getSyncAttrib(eglw::EGLDisplay dpy, eglw::EGLSync sync, eglw::EGLint attribute, eglw::EGLAttrib *value) const
249 {
250 return OHOS::OhosContextI::GetInstance().OH_getSyncAttrib(dpy, sync, attribute, reinterpret_cast<int *>(value));
251 }
252
getSyncAttribKHR(eglw::EGLDisplay dpy,eglw::EGLSyncKHR sync,eglw::EGLint attribute,eglw::EGLint * value) const253 eglw::EGLBoolean OhosLibrary::getSyncAttribKHR(eglw::EGLDisplay dpy, eglw::EGLSyncKHR sync, eglw::EGLint attribute, eglw::EGLint *value) const
254 {
255 return OHOS::OhosContextI::GetInstance().OH_getSyncAttribKHR(dpy, sync, attribute, value);
256 }
257
initialize(eglw::EGLDisplay dpy,eglw::EGLint * major,eglw::EGLint * minor) const258 eglw::EGLBoolean OhosLibrary::initialize(eglw::EGLDisplay dpy, eglw::EGLint *major, eglw::EGLint *minor) const
259 {
260 return OHOS::OhosContextI::GetInstance().OH_initialize(dpy, major, minor);
261 }
262
lockSurfaceKHR(eglw::EGLDisplay dpy,eglw::EGLSurface surface,const eglw::EGLint * attrib_list) const263 eglw::EGLBoolean OhosLibrary::lockSurfaceKHR(eglw::EGLDisplay dpy, eglw::EGLSurface surface, const eglw::EGLint *attrib_list) const
264 {
265 return OHOS::OhosContextI::GetInstance().OH_lockSurfaceKHR(dpy, surface, attrib_list);
266 }
267
makeCurrent(eglw::EGLDisplay dpy,eglw::EGLSurface draw,eglw::EGLSurface read,eglw::EGLContext ctx) const268 eglw::EGLBoolean OhosLibrary::makeCurrent(eglw::EGLDisplay dpy, eglw::EGLSurface draw, eglw::EGLSurface read, eglw::EGLContext ctx) const
269 {
270 return OHOS::OhosContextI::GetInstance().OH_makeCurrent(dpy, draw, read, ctx);
271 }
272
queryAPI() const273 eglw::EGLenum OhosLibrary::queryAPI() const
274 {
275 return OHOS::OhosContextI::GetInstance().OH_queryAPI();
276 }
277
queryContext(eglw::EGLDisplay dpy,eglw::EGLContext ctx,eglw::EGLint attribute,eglw::EGLint * value) const278 eglw::EGLBoolean OhosLibrary::queryContext(eglw::EGLDisplay dpy, eglw::EGLContext ctx, eglw::EGLint attribute, eglw::EGLint *value) const
279 {
280 return OHOS::OhosContextI::GetInstance().OH_queryContext(dpy, ctx, attribute, value);
281 }
282
queryString(eglw::EGLDisplay dpy,eglw::EGLint name) const283 const char* OhosLibrary::queryString(eglw::EGLDisplay dpy, eglw::EGLint name) const
284 {
285 return OHOS::OhosContextI::GetInstance().OH_queryString(dpy, name);
286 }
287
querySurface(eglw::EGLDisplay dpy,eglw::EGLSurface surface,eglw::EGLint attribute,eglw::EGLint * value) const288 eglw::EGLBoolean OhosLibrary::querySurface(eglw::EGLDisplay dpy, eglw::EGLSurface surface, eglw::EGLint attribute, eglw::EGLint *value) const
289 {
290 return OHOS::OhosContextI::GetInstance().OH_querySurface(dpy, surface, attribute, value);
291 }
292
releaseTexImage(eglw::EGLDisplay dpy,eglw::EGLSurface surface,eglw::EGLint buffer) const293 eglw::EGLBoolean OhosLibrary::releaseTexImage(eglw::EGLDisplay dpy, eglw::EGLSurface surface, eglw::EGLint buffer) const
294 {
295 return OHOS::OhosContextI::GetInstance().OH_releaseTexImage(dpy, surface, buffer);
296 }
297
releaseThread() const298 eglw::EGLBoolean OhosLibrary::releaseThread() const
299 {
300 return OHOS::OhosContextI::GetInstance().OH_releaseThread();
301 }
302
setDamageRegionKHR(eglw::EGLDisplay dpy,eglw::EGLSurface surface,eglw::EGLint * rects,eglw::EGLint n_rects) const303 eglw::EGLBoolean OhosLibrary::setDamageRegionKHR(eglw::EGLDisplay dpy, eglw::EGLSurface surface, eglw::EGLint *rects, eglw::EGLint n_rects) const
304 {
305 return OHOS::OhosContextI::GetInstance().OH_setDamageRegionKHR(dpy, surface, rects, n_rects);
306 }
307
signalSyncKHR(eglw::EGLDisplay dpy,eglw::EGLSyncKHR sync,eglw::EGLenum mode) const308 eglw::EGLBoolean OhosLibrary::signalSyncKHR(eglw::EGLDisplay dpy, eglw::EGLSyncKHR sync, eglw::EGLenum mode) const
309 {
310 return OHOS::OhosContextI::GetInstance().OH_signalSyncKHR(dpy, sync, mode);
311 }
312
surfaceAttrib(eglw::EGLDisplay dpy,eglw::EGLSurface surface,eglw::EGLint attribute,eglw::EGLint value) const313 eglw::EGLBoolean OhosLibrary::surfaceAttrib(eglw::EGLDisplay dpy, eglw::EGLSurface surface, eglw::EGLint attribute, eglw::EGLint value) const
314 {
315 return OHOS::OhosContextI::GetInstance().OH_surfaceAttrib(dpy, surface, attribute, value);
316 }
317
swapBuffers(eglw::EGLDisplay dpy,eglw::EGLSurface surface) const318 eglw::EGLBoolean OhosLibrary::swapBuffers(eglw::EGLDisplay dpy, eglw::EGLSurface surface) const
319 {
320 return OHOS::OhosContextI::GetInstance().OH_swapBuffers(dpy, surface);
321 }
322
swapBuffersWithDamageKHR(eglw::EGLDisplay dpy,eglw::EGLSurface surface,eglw::EGLint * rects,eglw::EGLint n_rects) const323 eglw::EGLBoolean OhosLibrary::swapBuffersWithDamageKHR(eglw::EGLDisplay dpy, eglw::EGLSurface surface, eglw::EGLint *rects, eglw::EGLint n_rects) const
324 {
325 return OHOS::OhosContextI::GetInstance().OH_swapBuffersWithDamageKHR(dpy, surface, rects, n_rects);
326 }
327
swapInterval(eglw::EGLDisplay dpy,eglw::EGLint interval) const328 eglw::EGLBoolean OhosLibrary::swapInterval(eglw::EGLDisplay dpy, eglw::EGLint interval) const
329 {
330 return OHOS::OhosContextI::GetInstance().OH_swapInterval(dpy, interval);
331 }
332
terminate(eglw::EGLDisplay dpy) const333 eglw::EGLBoolean OhosLibrary::terminate(eglw::EGLDisplay dpy) const
334 {
335 return OHOS::OhosContextI::GetInstance().OH_terminate(dpy);
336 }
337
unlockSurfaceKHR(eglw::EGLDisplay dpy,eglw::EGLSurface surface) const338 eglw::EGLBoolean OhosLibrary::unlockSurfaceKHR(eglw::EGLDisplay dpy, eglw::EGLSurface surface) const
339 {
340 return OHOS::OhosContextI::GetInstance().OH_unlockSurfaceKHR(dpy, surface);
341 }
342
waitClient() const343 eglw::EGLBoolean OhosLibrary::waitClient() const
344 {
345 return OHOS::OhosContextI::GetInstance().OH_waitClient();
346 }
347
waitGL() const348 eglw::EGLBoolean OhosLibrary::waitGL() const
349 {
350 return OHOS::OhosContextI::GetInstance().OH_waitGL();
351 }
352
waitNative(eglw::EGLint engine) const353 eglw::EGLBoolean OhosLibrary::waitNative(eglw::EGLint engine) const
354 {
355 return OHOS::OhosContextI::GetInstance().OH_waitNative(engine);
356 }
357
waitSync(eglw::EGLDisplay dpy,eglw::EGLSync sync,eglw::EGLint flags) const358 eglw::EGLBoolean OhosLibrary::waitSync(eglw::EGLDisplay dpy, eglw::EGLSync sync, eglw::EGLint flags) const
359 {
360 return OHOS::OhosContextI::GetInstance().OH_waitSync(dpy, sync, flags);
361 }
362
waitSyncKHR(eglw::EGLDisplay dpy,eglw::EGLSyncKHR sync,eglw::EGLint flags) const363 eglw::EGLint OhosLibrary::waitSyncKHR(eglw::EGLDisplay dpy, eglw::EGLSyncKHR sync, eglw::EGLint flags) const
364 {
365 return OHOS::OhosContextI::GetInstance().OH_waitSyncKHR(dpy, sync, flags);
366 }
367
368 // call2_END