shell-global: Don't connect to the stage's paint signal
Doing so causes useless full stage redraws and breaks culling as clutter cannot know how the signal handler affects painting. So use clutter_threads_add_repaint_func_full instead. https://bugzilla.gnome.org/show_bug.cgi?id=694988
This commit is contained in:
parent
d99cd71408
commit
071a4e5f83
@ -803,16 +803,14 @@ global_stage_notify_height (GObject *gobject,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
global_stage_before_paint (ClutterStage *stage,
|
global_stage_before_paint (gpointer data)
|
||||||
ShellGlobal *global)
|
|
||||||
{
|
{
|
||||||
shell_perf_log_event (shell_perf_log_get_default (),
|
shell_perf_log_event (shell_perf_log_get_default (),
|
||||||
"clutter.stagePaintStart");
|
"clutter.stagePaintStart");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
global_stage_after_paint (ClutterStage *stage,
|
global_stage_after_paint (gpointer data)
|
||||||
ShellGlobal *global)
|
|
||||||
{
|
{
|
||||||
shell_perf_log_event (shell_perf_log_get_default (),
|
shell_perf_log_event (shell_perf_log_get_default (),
|
||||||
"clutter.stagePaintDone");
|
"clutter.stagePaintDone");
|
||||||
@ -939,10 +937,13 @@ _shell_global_set_plugin (ShellGlobal *global,
|
|||||||
g_signal_connect (global->stage, "notify::height",
|
g_signal_connect (global->stage, "notify::height",
|
||||||
G_CALLBACK (global_stage_notify_height), global);
|
G_CALLBACK (global_stage_notify_height), global);
|
||||||
|
|
||||||
g_signal_connect (global->stage, "paint",
|
clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_PRE_PAINT,
|
||||||
G_CALLBACK (global_stage_before_paint), global);
|
(GSourceFunc) global_stage_before_paint,
|
||||||
g_signal_connect_after (global->stage, "paint",
|
NULL, NULL);
|
||||||
G_CALLBACK (global_stage_after_paint), global);
|
|
||||||
|
clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_POST_PAINT,
|
||||||
|
(GSourceFunc) global_stage_after_paint,
|
||||||
|
NULL, NULL);
|
||||||
|
|
||||||
shell_perf_log_define_event (shell_perf_log_get_default(),
|
shell_perf_log_define_event (shell_perf_log_get_default(),
|
||||||
"clutter.stagePaintStart",
|
"clutter.stagePaintStart",
|
||||||
|
Loading…
Reference in New Issue
Block a user