[mutter/gnome-3-36] stage: Only invoke paint phase callbacks when painting views
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-36] stage: Only invoke paint phase callbacks when painting views
- Date: Wed, 29 Apr 2020 16:41:26 +0000 (UTC)
commit b5691d6bf053470838705ed5c94e6f72cdddaf7e
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/1222
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 bb8db7b63..e3efe1cd8 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]