avoid redundant idle if using FRAME_SYNC to throttle

This updates the examples and test-journal which now use the _FRAME_SYNC
events to throttle rendering so that they don't install a redundant idle
handler to paint when they get a FRAME_SYNC event and instead they now
directly paint when the event is received.

(cherry picked from commit 579eb75e6ac6f50d7a9cfe5093435126158b3c96)
This commit is contained in:
Robert Bragg 2013-02-15 16:51:11 +00:00
parent 700de0ea8e
commit 7ab54be3b7
4 changed files with 6 additions and 6 deletions

View File

@ -59,8 +59,8 @@ frame_event_cb (CoglOnscreen *onscreen,
CoglFrameInfo *info,
void *user_data)
{
if (event == COGL_FRAME_EVENT_SYNC)
g_idle_add (paint_cb, user_data);
if (event == COGL_FRAME_EVENT_SYNC)
paint_cb (user_data);
}
int

View File

@ -604,8 +604,8 @@ frame_event_cb (CoglOnscreen *onscreen,
CoglFrameInfo *info,
void *user_data)
{
if (event == COGL_FRAME_EVENT_SYNC)
g_idle_add (paint_cb, user_data);
if (event == COGL_FRAME_EVENT_SYNC)
paint_cb (user_data);
}
/**

View File

@ -29,7 +29,7 @@ frame_event_cb (CoglOnscreen *onscreen,
void *user_data)
{
if (event == COGL_FRAME_EVENT_SYNC)
g_idle_add (paint_cb, user_data);
paint_cb (user_data);
}
int

View File

@ -130,7 +130,7 @@ frame_event_cb (CoglOnscreen *onscreen,
void *user_data)
{
if (event == COGL_FRAME_EVENT_SYNC)
g_idle_add (paint_cb, user_data);
paint_cb (user_data);
}
int