mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -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
@ -59,8 +59,8 @@ frame_event_cb (CoglOnscreen *onscreen,
|
|||||||
CoglFrameInfo *info,
|
CoglFrameInfo *info,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
if (event == COGL_FRAME_EVENT_SYNC)
|
if (event == COGL_FRAME_EVENT_SYNC)
|
||||||
g_idle_add (paint_cb, user_data);
|
paint_cb (user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -604,8 +604,8 @@ frame_event_cb (CoglOnscreen *onscreen,
|
|||||||
CoglFrameInfo *info,
|
CoglFrameInfo *info,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
if (event == COGL_FRAME_EVENT_SYNC)
|
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)
|
void *user_data)
|
||||||
{
|
{
|
||||||
if (event == COGL_FRAME_EVENT_SYNC)
|
if (event == COGL_FRAME_EVENT_SYNC)
|
||||||
g_idle_add (paint_cb, user_data);
|
paint_cb (user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -130,7 +130,7 @@ frame_event_cb (CoglOnscreen *onscreen,
|
|||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
if (event == COGL_FRAME_EVENT_SYNC)
|
if (event == COGL_FRAME_EVENT_SYNC)
|
||||||
g_idle_add (paint_cb, user_data);
|
paint_cb (user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user