// Set the timestamp for the specified surface. void eglBeginFrame(EGLDisplay dpy, EGLSurface surface) { EGL_API_ENTRY("%p, %p", dpy, surface); EglDisplayImpl* display = EglDisplayImpl::GetDisplay(dpy); if (display == NULL || display->IsInitialized() == false) { SetError(EGL_BAD_DISPLAY); return; } SurfacePtr s = display->GetSurfaces().Get(surface); if (s == NULL) { SetError(EGL_BAD_SURFACE); return; } const int64_t timestamp = systemTime(SYSTEM_TIME_MONOTONIC); s->SetTimestamp(timestamp); }
EGLBoolean eglPresentationTimeANDROID(EGLDisplay dpy, EGLSurface surface, EGLnsecsANDROID time) { EGL_API_ENTRY("%p, %p, %lld", dpy, surface, time); EglDisplayImpl* display = EglDisplayImpl::GetDisplay(dpy); if (display == NULL || display->IsInitialized() == false) { SetError(EGL_BAD_DISPLAY); return EGL_FALSE; } SurfacePtr s = display->GetSurfaces().Get(surface); if (s == NULL) { SetError(EGL_BAD_SURFACE); return EGL_FALSE; } s->SetTimestamp(time); return EGL_TRUE; }