mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
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
This commit is contained in:
parent
db7967327a
commit
647eec5f7f
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user