예제 #1
0
파일: api_entries.cpp 프로젝트: epowers/arc
// 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);
}
예제 #2
0
파일: api_entries.cpp 프로젝트: epowers/arc
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;
}