[mutter] cogl: Flush specific framebuffers
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl: Flush specific framebuffers
- Date: Fri, 18 Sep 2020 12:14:15 +0000 (UTC)
commit 647eec5f7f08e60067234899c83d60d5d44cc6bb
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Thu Jul 9 14:03:53 2020 +0800
cogl: Flush specific framebuffers
This resolves a couple of FIXMEs. The FIXME comments were right in
stating that not *all* journals needed flushing, only the one we
are trying to put on screen needs flushing.
However we can't eliminate all flushes because the winsys swap calls
that follow go directly into OpenGL which knows nothing about cogl
journalling. So the journal *must* be flushed before the swap, to give
OpenGL the correct state.
P.S. If this turns out to cause any bugs then the next best answer is
to just remove the FIXME comments. Because flushing is still the right
thing to do.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1362
cogl/cogl/cogl-onscreen.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/cogl/cogl/cogl-onscreen.c b/cogl/cogl/cogl-onscreen.c
index 4f3f48fbe1..ef996017ac 100644
--- a/cogl/cogl/cogl-onscreen.c
+++ b/cogl/cogl/cogl-onscreen.c
@@ -304,8 +304,7 @@ cogl_onscreen_swap_buffers_with_damage (CoglOnscreen *onscreen,
info->frame_counter = onscreen->frame_counter;
g_queue_push_tail (&onscreen->pending_frame_infos, info);
- /* FIXME: we shouldn't need to flush *all* journals here! */
- cogl_flush ();
+ _cogl_framebuffer_flush_journal (framebuffer);
winsys = _cogl_framebuffer_get_winsys (framebuffer);
winsys->onscreen_swap_buffers_with_damage (onscreen,
@@ -354,8 +353,7 @@ cogl_onscreen_swap_region (CoglOnscreen *onscreen,
info->frame_counter = onscreen->frame_counter;
g_queue_push_tail (&onscreen->pending_frame_infos, info);
- /* FIXME: we shouldn't need to flush *all* journals here! */
- cogl_flush ();
+ _cogl_framebuffer_flush_journal (framebuffer);
winsys = _cogl_framebuffer_get_winsys (framebuffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]