@@ -62,6 +62,7 @@ static char const * const sExtensionString =
6262 " EGL_KHR_fence_sync "
6363 " EGL_ANDROID_image_native_buffer "
6464 " EGL_ANDROID_swap_rectangle "
65+ " EGL_NV_system_time "
6566 ;
6667
6768struct extention_map_t {
@@ -80,6 +81,10 @@ static const extention_map_t sExtentionMap[] = {
8081 (__eglMustCastToProperFunctionPointerType)&eglDestroyImageKHR },
8182 { " eglSetSwapRectangleANDROID" ,
8283 (__eglMustCastToProperFunctionPointerType)&eglSetSwapRectangleANDROID },
84+ { " eglGetSystemTimeFrequencyNV" ,
85+ (__eglMustCastToProperFunctionPointerType)&eglGetSystemTimeFrequencyNV },
86+ { " eglGetSystemTimeNV" ,
87+ (__eglMustCastToProperFunctionPointerType)&eglGetSystemTimeNV },
8388};
8489
8590// accesses protected by sExtensionMapMutex
@@ -1454,3 +1459,46 @@ EGLBoolean eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw,
14541459 }
14551460 return setError (EGL_BAD_DISPLAY, NULL );
14561461}
1462+
1463+ // ----------------------------------------------------------------------------
1464+ // NVIDIA extensions
1465+ // ----------------------------------------------------------------------------
1466+ EGLuint64NV eglGetSystemTimeFrequencyNV ()
1467+ {
1468+ clearError ();
1469+
1470+ if (egl_init_drivers () == EGL_FALSE) {
1471+ return setError (EGL_BAD_PARAMETER, EGL_FALSE);
1472+ }
1473+
1474+ EGLuint64NV ret = 0 ;
1475+ egl_connection_t * const cnx = &gEGLImpl [IMPL_HARDWARE];
1476+
1477+ if (cnx->dso ) {
1478+ if (cnx->egl .eglGetSystemTimeFrequencyNV ) {
1479+ return cnx->egl .eglGetSystemTimeFrequencyNV ();
1480+ }
1481+ }
1482+
1483+ return setError (EGL_BAD_DISPLAY, 0 );;
1484+ }
1485+
1486+ EGLuint64NV eglGetSystemTimeNV ()
1487+ {
1488+ clearError ();
1489+
1490+ if (egl_init_drivers () == EGL_FALSE) {
1491+ return setError (EGL_BAD_PARAMETER, EGL_FALSE);
1492+ }
1493+
1494+ EGLuint64NV ret = 0 ;
1495+ egl_connection_t * const cnx = &gEGLImpl [IMPL_HARDWARE];
1496+
1497+ if (cnx->dso ) {
1498+ if (cnx->egl .eglGetSystemTimeNV ) {
1499+ return cnx->egl .eglGetSystemTimeNV ();
1500+ }
1501+ }
1502+
1503+ return setError (EGL_BAD_DISPLAY, 0 );;
1504+ }
0 commit comments