MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / InitDisplay

Function InitDisplay

tensorflow/lite/delegates/gpu/gl/egl_environment.cc:31–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29// and OpenGL ES is reinitialized. See eglMakeCurrent
30
31Status InitDisplay(EGLDisplay* egl_display) {
32 RETURN_IF_ERROR(
33 TFLITE_GPU_CALL_EGL(eglGetDisplay, egl_display, EGL_DEFAULT_DISPLAY));
34 if (*egl_display == EGL_NO_DISPLAY) {
35 return UnavailableError("eglGetDisplay returned nullptr");
36 }
37 bool is_initialized;
38 RETURN_IF_ERROR(TFLITE_GPU_CALL_EGL(eglInitialize, &is_initialized,
39 *egl_display, nullptr, nullptr));
40 if (!is_initialized) {
41 return InternalError("No EGL error, but eglInitialize failed");
42 }
43 return OkStatus();
44}
45
46} // namespace
47

Callers 1

InitMethod · 0.85

Calls 3

OkStatusFunction · 0.85
UnavailableErrorFunction · 0.50
InternalErrorFunction · 0.50

Tested by

no test coverage detected