Lines Matching refs:cnx
136 static bool addAnglePlatformAttributes(egl_connection_t* const cnx, in addAnglePlatformAttributes() argument
138 intptr_t vendorEGL = (intptr_t)cnx->vendorEGL; in addAnglePlatformAttributes()
143 attrs.push_back(cnx->angleBackend); in addAnglePlatformAttributes()
145 switch (cnx->angleBackend) { in addAnglePlatformAttributes()
163 ALOGV("%s: Requesting Unknown (%d) ANGLE back-end", __FUNCTION__, cnx->angleBackend); in addAnglePlatformAttributes()
172 static EGLDisplay getPlatformDisplayAngle(EGLNativeDisplayType display, egl_connection_t* const cnx, in getPlatformDisplayAngle() argument
177 if (cnx->egl.eglGetPlatformDisplay) { in getPlatformDisplayAngle()
186 if (!addAnglePlatformAttributes(cnx, attrs)) { in getPlatformDisplayAngle()
193 dpy = cnx->egl.eglGetPlatformDisplay(EGL_PLATFORM_ANGLE_ANGLE, in getPlatformDisplayAngle()
219 egl_connection_t* const cnx = &gEGLImpl; in getPlatformDisplay() local
220 if (cnx->dso) { in getPlatformDisplay()
223 if (cnx->useAngle) { in getPlatformDisplay()
225 dpy = getPlatformDisplayAngle(display, cnx, attrib_list, &error); in getPlatformDisplay()
233 if (cnx->egl.eglGetPlatformDisplay) { in getPlatformDisplay()
234 dpy = cnx->egl.eglGetPlatformDisplay(EGL_PLATFORM_ANDROID_KHR, display, in getPlatformDisplay()
245 dpy = cnx->egl.eglGetDisplay(display); in getPlatformDisplay()
251 loader.close(cnx); in getPlatformDisplay()
270 egl_connection_t* const cnx = &gEGLImpl; in initialize() local
276 if (major != nullptr) *major = cnx->major; in initialize()
277 if (minor != nullptr) *minor = cnx->minor; in initialize()
294 egl_connection_t* const cnx = &gEGLImpl; in initialize() local
295 cnx->major = -1; in initialize()
296 cnx->minor = -1; in initialize()
297 if (cnx->dso) { in initialize()
299 if (cnx->egl.eglInitialize(idpy, &cnx->major, &cnx->minor)) { in initialize()
307 disp.queryString.vendor = cnx->egl.eglQueryString(idpy, in initialize()
309 disp.queryString.version = cnx->egl.eglQueryString(idpy, in initialize()
311 disp.queryString.extensions = cnx->egl.eglQueryString(idpy, in initialize()
313 disp.queryString.clientApi = cnx->egl.eglQueryString(idpy, in initialize()
318 egl_tls_t::egl_strerror(cnx->egl.eglGetError())); in initialize()
322 if (cnx->minor == 5) { in initialize()
324 if (!cnx->egl.eglCreateImage || in initialize()
325 !cnx->egl.eglDestroyImage || in initialize()
326 !cnx->egl.eglGetPlatformDisplay || in initialize()
327 !cnx->egl.eglCreatePlatformWindowSurface || in initialize()
328 !cnx->egl.eglCreatePlatformPixmapSurface || in initialize()
329 !cnx->egl.eglCreateSync || in initialize()
330 !cnx->egl.eglDestroySync || in initialize()
331 !cnx->egl.eglClientWaitSync || in initialize()
332 !cnx->egl.eglGetSyncAttrib || in initialize()
333 !cnx->egl.eglWaitSync) { in initialize()
336 cnx->minor = 4; in initialize()
343 cnx->driverVersion = EGL_MAKE_VERSION(1, 4, 0); in initialize()
345 if ((cnx->major == 1) && (cnx->minor == 5)) { in initialize()
347 cnx->driverVersion = EGL_MAKE_VERSION(1, 5, 0); in initialize()
350 ALOGW("Unexpected driver version: %d.%d, want 1.4 or 1.5", cnx->major, cnx->minor); in initialize()
425 if (major != nullptr) *major = cnx->major; in initialize()
426 if (minor != nullptr) *minor = cnx->minor; in initialize()
464 egl_connection_t* const cnx = &gEGLImpl; in terminate() local
465 if (cnx->dso && disp.state == egl_display_t::INITIALIZED) { in terminate()
467 if (cnx->useAngle) { in terminate()
470 if (cnx->egl.eglTerminate(disp.dpy) == EGL_FALSE) { in terminate()
472 egl_tls_t::egl_strerror(cnx->egl.eglGetError())); in terminate()
552 result = c->cnx->egl.eglMakeCurrent( in makeCurrent()
558 result = cur_c->cnx->egl.eglMakeCurrent( in makeCurrent()