mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
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
@ -60,7 +60,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
|
||||
|
@ -605,7 +605,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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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…
Reference in New Issue
Block a user