summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2013-01-24 23:29:04 -0500
committerOwen W. Taylor <otaylor@fishsoup.net>2013-01-25 00:36:48 -0500
commit47bf79c31f0d8de8c1165d3fe9818a5021a17f1c (patch)
tree93612c883fcb5845fe53cbd2e9aa7e5e7315cac9
parent41de98629a23f594715c703d26671d039085cf93 (diff)
downloadcogl-47bf79c31f0d8de8c1165d3fe9818a5021a17f1c.tar.gz
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.
-rw-r--r--cogl/cogl-frame-info-private.h2
-rw-r--r--cogl/cogl-frame-info.c6
-rw-r--r--cogl/cogl-frame-info.h14
-rw-r--r--cogl/winsys/cogl-winsys-egl-kms.c2
-rw-r--r--cogl/winsys/cogl-winsys-glx.c11
5 files changed, 4 insertions, 31 deletions
diff --git a/cogl/cogl-frame-info-private.h b/cogl/cogl-frame-info-private.h
index dfce6d09..79b2a41f 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 c5921709..a130f8d5 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 08e4df68..1f5de5f3 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 b9d77dbb..1867e56a 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 ca514762..4e1c91cd 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