[cogl/wip/frame-synchronization: 223/223] Remove cogl_frame_info_get_complete()



commit 47bf79c31f0d8de8c1165d3fe9818a5021a17f1c
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu Jan 24 23:29:04 2013 -0500

    Remove cogl_frame_info_get_complete()
    
    An application gets a callback when a frame info is complete, so there
    may not be a need for a flag as well.

 cogl/cogl-frame-info-private.h    |    2 --
 cogl/cogl-frame-info.c            |    6 ------
 cogl/cogl-frame-info.h            |   14 --------------
 cogl/winsys/cogl-winsys-egl-kms.c |    2 --
 cogl/winsys/cogl-winsys-glx.c     |   11 ++++-------
 5 files changed, 4 insertions(+), 31 deletions(-)
---
diff --git a/cogl/cogl-frame-info-private.h b/cogl/cogl-frame-info-private.h
index dfce6d0..79b2a41 100644
--- a/cogl/cogl-frame-info-private.h
+++ b/cogl/cogl-frame-info-private.h
@@ -36,8 +36,6 @@ struct _CoglFrameInfo
   float refresh_rate;
 
   CoglOutput *output;
-
-  unsigned int complete : 1;
 };
 
 CoglFrameInfo *_cogl_frame_info_new (void);
diff --git a/cogl/cogl-frame-info.c b/cogl/cogl-frame-info.c
index c592170..a130f8d 100644
--- a/cogl/cogl-frame-info.c
+++ b/cogl/cogl-frame-info.c
@@ -47,12 +47,6 @@ _cogl_frame_info_free (CoglFrameInfo *info)
   g_slice_free (CoglFrameInfo, info);
 }
 
-CoglBool
-cogl_frame_info_get_complete (CoglFrameInfo *info)
-{
-  return info->complete;
-}
-
 int64_t
 cogl_frame_info_get_frame_counter (CoglFrameInfo *info)
 {
diff --git a/cogl/cogl-frame-info.h b/cogl/cogl-frame-info.h
index 08e4df6..1f5de5f 100644
--- a/cogl/cogl-frame-info.h
+++ b/cogl/cogl-frame-info.h
@@ -55,20 +55,6 @@ CoglBool
 cogl_is_frame_info (void *object);
 
 /**
- * cogl_frame_info_get_complete:
- * @info: a #CoglFrameInfo object
- *
- * Gets whether all information that will potentially be provided for
- * the frame has been provided. Once a frame info object is complete,
- * no further changes will be made to it.
- *
- * Return value: whether the frame info object is complete.
- * Since: 2.0
- * Stability: unstable
- */
-CoglBool cogl_frame_info_get_complete (CoglFrameInfo *info);
-
-/**
  * cogl_frame_info_get_frame_counter:
  * @info: a #CoglFrameInfo object
  *
diff --git a/cogl/winsys/cogl-winsys-egl-kms.c b/cogl/winsys/cogl-winsys-egl-kms.c
index b9d77db..1867e56 100644
--- a/cogl/winsys/cogl-winsys-egl-kms.c
+++ b/cogl/winsys/cogl-winsys-egl-kms.c
@@ -898,8 +898,6 @@ flush_pending_swap_notify_cb (void *data,
         {
           CoglFrameInfo *info = g_queue_pop_tail (&onscreen->pending_frame_infos);
 
-          info->complete = TRUE;
-
           _cogl_onscreen_notify_frame_sync (onscreen, info);
           _cogl_onscreen_notify_complete (onscreen, info);
           kms_onscreen->pending_swap_notify = FALSE;
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index ca51476..4e1c91c 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -282,14 +282,11 @@ ust_to_nanoseconds (CoglRenderer *renderer,
 }
 
 static void
-set_info_complete (CoglOnscreen *onscreen)
+set_complete_pending (CoglOnscreen *onscreen)
 {
   CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
   CoglContext *context = COGL_FRAMEBUFFER (onscreen)->context;
   CoglGLXDisplay *glx_display = context->display->winsys;
-  CoglFrameInfo *info = g_queue_peek_tail (&onscreen->pending_frame_infos);
-
-  info->complete = TRUE;
 
   glx_display->pending_complete_notify = TRUE;
   glx_onscreen->pending_complete_notify = TRUE;
@@ -323,7 +320,7 @@ notify_swap_buffers (CoglContext *context, GLXBufferSwapComplete *swap_event)
                             swap_event->ust);
     }
 
-  set_info_complete (onscreen);
+  set_complete_pending (onscreen);
 }
 
 static void
@@ -1688,7 +1685,7 @@ _cogl_winsys_onscreen_swap_region (CoglOnscreen *onscreen,
       set_frame_info_output (onscreen, output);
     }
 
-  set_info_complete (onscreen);
+  set_complete_pending (onscreen);
 }
 
 static void
@@ -1773,7 +1770,7 @@ _cogl_winsys_onscreen_swap_buffers (CoglOnscreen *onscreen)
 
   if (!(glx_renderer->glXSwapInterval &&
         _cogl_winsys_has_feature (COGL_WINSYS_FEATURE_VBLANK_WAIT)))
-    set_info_complete (onscreen);
+    set_complete_pending (onscreen);
 }
 
 static uint32_t



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]