[clutter] Rename cogl_framebuffer_swap_* apis to cogl_onscreen_swap_*
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] Rename cogl_framebuffer_swap_* apis to cogl_onscreen_swap_*
- Date: Tue, 21 Feb 2012 17:50:52 +0000 (UTC)
commit 671ead6681db8e23708396dd8707ece82aaa4326
Author: Robert Bragg <robert linux intel com>
Date: Tue Feb 21 13:37:55 2012 +0000
Rename cogl_framebuffer_swap_* apis to cogl_onscreen_swap_*
Recently the cogl_framebuffer_swap_* apis were moved into the
cogl_onscreen_* namespace since only CoglOnscreen framebuffers can be
double buffered. This renames all uses of the cogl_framebuffer_swap_*
apis in Clutter.
clutter/cogl/clutter-stage-cogl.c | 27 +++++++++++++--------------
clutter/win32/clutter-stage-win32.c | 2 +-
2 files changed, 14 insertions(+), 15 deletions(-)
---
diff --git a/clutter/cogl/clutter-stage-cogl.c b/clutter/cogl/clutter-stage-cogl.c
index 6412b2c..618723a 100644
--- a/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/cogl/clutter-stage-cogl.c
@@ -138,9 +138,9 @@ clutter_stage_cogl_realize (ClutterStageWindow *stage_window)
if (cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT))
{
stage_cogl->swap_callback_id =
- cogl_framebuffer_add_swap_buffers_callback (framebuffer,
- handle_swap_complete_cb,
- stage_cogl);
+ cogl_onscreen_add_swap_buffers_callback (stage_cogl->onscreen,
+ handle_swap_complete_cb,
+ stage_cogl);
}
return TRUE;
@@ -462,7 +462,7 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
int copy_area[4];
/* XXX: It seems there will be a race here in that the stage
- * window may be resized before the cogl_framebuffer_swap_region
+ * window may be resized before the cogl_onscreen_swap_region
* is handled and so we may copy the wrong region. I can't
* really see how we can handle this with the current state of X
* but at least in this case a full redraw should be queued by
@@ -476,33 +476,32 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
copy_area[3] = clip->height;
CLUTTER_NOTE (BACKEND,
- "cogl_framebuffer_swap_region (onscreen: %p, "
- "x: %d, y: %d, "
- "width: %d, height: %d)",
+ "cogl_onscreen_swap_region (onscreen: %p, "
+ "x: %d, y: %d, "
+ "width: %d, height: %d)",
stage_cogl->onscreen,
copy_area[0], copy_area[1], copy_area[2], copy_area[3]);
CLUTTER_TIMER_START (_clutter_uprof_context, blit_sub_buffer_timer);
- cogl_framebuffer_swap_region (COGL_FRAMEBUFFER (stage_cogl->onscreen),
- copy_area, 1);
+ cogl_onscreen_swap_region (stage_cogl->onscreen, copy_area, 1);
CLUTTER_TIMER_STOP (_clutter_uprof_context, blit_sub_buffer_timer);
}
else
{
- CLUTTER_NOTE (BACKEND, "cogl_framebuffer_swap_buffers (onscreen: %p)",
+ CLUTTER_NOTE (BACKEND, "cogl_onscreen_swap_buffers (onscreen: %p)",
stage_cogl->onscreen);
- /* If we have swap buffer events then
- * cogl_framebuffer_swap_buffers will return immediately and we
- * need to track that there is a swap in progress... */
+ /* If we have swap buffer events then cogl_onscreen_swap_buffers
+ * will return immediately and we need to track that there is a
+ * swap in progress... */
if (clutter_feature_available (CLUTTER_FEATURE_SWAP_EVENTS))
stage_cogl->pending_swaps++;
CLUTTER_TIMER_START (_clutter_uprof_context, swapbuffers_timer);
- cogl_framebuffer_swap_buffers (COGL_FRAMEBUFFER (stage_cogl->onscreen));
+ cogl_onscreen_swap_buffers (stage_cogl->onscreen);
CLUTTER_TIMER_STOP (_clutter_uprof_context, swapbuffers_timer);
}
diff --git a/clutter/win32/clutter-stage-win32.c b/clutter/win32/clutter-stage-win32.c
index ef80c76..fcfbd60 100644
--- a/clutter/win32/clutter-stage-win32.c
+++ b/clutter/win32/clutter-stage-win32.c
@@ -542,7 +542,7 @@ clutter_stage_win32_redraw (ClutterStageWindow *stage_window)
cogl_flush ();
if (stage_win32->onscreen)
- cogl_framebuffer_swap_buffers (COGL_FRAMEBUFFER (stage_win32->onscreen));
+ cogl_onscreen_swap_buffers (COGL_FRAMEBUFFER (stage_win32->onscreen));
}
static CoglFramebuffer *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]