[mutter/gbsneto/screencast-improvements: 4/8] clutter/stage: Emit after-paint after painting
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/screencast-improvements: 4/8] clutter/stage: Emit after-paint after painting
- Date: Tue, 18 Jun 2019 15:30:12 +0000 (UTC)
commit 08d830f6a22f4d3e29f39180c335c25c3755f341
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Jun 17 19:16:47 2019 -0300
clutter/stage: Emit after-paint after painting
ClutterStage:after-paint is supposed to be emitted after all
painting is done, but before the frame is finished. However,
as it is right now, it is being emitted after each view is
painted -- on multi-monitor setups, after-frame is being
emitted multiple times.
Send after-paint only once, after all views are painted and
before finishing the frame.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/623
clutter/clutter/clutter-stage-private.h | 1 +
clutter/clutter/clutter-stage.c | 5 +++++
clutter/clutter/cogl/clutter-stage-cogl.c | 2 ++
3 files changed, 8 insertions(+)
---
diff --git a/clutter/clutter/clutter-stage-private.h b/clutter/clutter/clutter-stage-private.h
index 74d4f7bfd..b4255a475 100644
--- a/clutter/clutter/clutter-stage-private.h
+++ b/clutter/clutter/clutter-stage-private.h
@@ -40,6 +40,7 @@ void _clutter_stage_paint_view (ClutterStage
ClutterStageView *view,
const cairo_rectangle_int_t *clip);
+void _clutter_stage_emit_after_paint (ClutterStage *stage);
void _clutter_stage_set_window (ClutterStage *stage,
ClutterStageWindow *stage_window);
ClutterStageWindow *_clutter_stage_get_window (ClutterStage *stage);
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 8c4562e54..bb7227221 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -683,6 +683,11 @@ _clutter_stage_paint_view (ClutterStage *stage,
COGL_TRACE_BEGIN_SCOPED (ClutterStagePaintView, "Paint (view)");
clutter_stage_do_paint_view (stage, view, clip);
+}
+
+void
+_clutter_stage_emit_after_paint (ClutterStage *stage)
+{
g_signal_emit (stage, stage_signals[AFTER_PAINT], 0);
}
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index 8898a3b64..8f97a5fa6 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -983,6 +983,8 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
clutter_stage_cogl_redraw_view (stage_window, view) || swap_event;
}
+ _clutter_stage_emit_after_paint (stage_cogl->wrapper);
+
_clutter_stage_window_finish_frame (stage_window);
if (swap_event)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]