예제 #1
0
static void gfx_ctx_drm_egl_swap_buffers(void *data)
{
   gfx_ctx_drm_egl_data_t *drm = (gfx_ctx_drm_egl_data_t*)
   driver.video_context_data;

   (void)data;

   eglSwapBuffers(drm->g_egl_dpy, drm->g_egl_surf);

   /* I guess we have to wait for flip to have taken 
    * place before another flip can be queued up. */
   if (waiting_for_flip)
   {
      wait_flip(drm->g_interval);

      /* We are still waiting for a flip 
       * (nonblocking mode, just drop the frame).
       */
      if (waiting_for_flip)
         return;
   }

   queue_flip();

   /* We have to wait for this flip to finish. 
    * This shouldn't happen as we have triple buffered page-flips. */
   if (!gbm_surface_has_free_buffers(drm->g_gbm_surface))
   {
      RARCH_WARN("[KMS/EGL]: Triple buffering is not working correctly ...\n");
      wait_flip(true);  
   }
}
예제 #2
0
static void gfx_ctx_swap_buffers(void)
{
   eglSwapBuffers(g_egl_dpy, g_egl_surf);

   // I guess we have to wait for flip to have taken place before another flip can be queued up.
   if (waiting_for_flip)
   {
      wait_flip(g_interval);
      if (waiting_for_flip) // We are still waiting for a flip (nonblocking mode, just drop the frame).
         return;
   }

   queue_flip();

   // We have to wait for this flip to finish. This shouldn't happen as we have triple buffered page-flips.
   if (!gbm_surface_has_free_buffers(g_gbm_surface))
   {
      RARCH_WARN("[KMS/EGL]: Triple buffering is not working correctly ...\n");
      wait_flip(true);  
   }
}