[mutter] stage: Only invoke paint phase callbacks when painting views
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] stage: Only invoke paint phase callbacks when painting views
- Date: Thu, 23 Apr 2020 18:44:39 +0000 (UTC)
commit 90c4b6492fc227d59a53d6fa0b7c1cb602c52ca8
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Apr 20 22:39:08 2020 +0200
stage: Only invoke paint phase callbacks when painting views
These phase callbacks are not intended to be inovked when something
secondary is painting the stage, such as a screen cast stream, or
similar. Thus, only invoke the callbacks when there is a view associated
with the paint context, which will not be the case for offscreen
painting.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1207
src/backends/meta-stage.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/backends/meta-stage.c b/src/backends/meta-stage.c
index d5a5d8720..e5f156880 100644
--- a/src/backends/meta-stage.c
+++ b/src/backends/meta-stage.c
@@ -198,17 +198,22 @@ meta_stage_paint (ClutterActor *actor,
CLUTTER_ACTOR_CLASS (meta_stage_parent_class)->paint (actor, paint_context);
view = clutter_paint_context_get_stage_view (paint_context);
-
- notify_watchers_for_mode (stage, view, paint_context,
- META_STAGE_WATCH_AFTER_ACTOR_PAINT);
+ if (view)
+ {
+ notify_watchers_for_mode (stage, view, paint_context,
+ META_STAGE_WATCH_AFTER_ACTOR_PAINT);
+ }
g_signal_emit (stage, signals[ACTORS_PAINTED], 0);
for (l = stage->overlays; l; l = l->next)
meta_overlay_paint (l->data, paint_context);
- notify_watchers_for_mode (stage, view, paint_context,
- META_STAGE_WATCH_AFTER_OVERLAY_PAINT);
+ if (view)
+ {
+ notify_watchers_for_mode (stage, view, paint_context,
+ META_STAGE_WATCH_AFTER_OVERLAY_PAINT);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]