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:
parent
700de0ea8e
commit
7ab54be3b7
4 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue