diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2019-02-05 11:01:40 -0200 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2019-10-16 16:25:08 +0200 |
commit | 62072838c92d3460d4836b91dc09806cc95e4856 (patch) | |
tree | 9316e92bc10cb250ab8b06609419deb22e042646 | |
parent | c5b7d73ce2e7650ead03932cc02047af2d007fdf (diff) | |
download | mutter-62072838c92d3460d4836b91dc09806cc95e4856.tar.gz |
cogl: Remove midscene tracking
Midscene tracking was used at a time that some Cogl users
could call random OpenGL API without going through Cogl.
That is not allowed anymore, and certainly not done by
Mutter and GNOME Shell.
Remove midscene tracking from CoglFramebuffer.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/402
-rw-r--r-- | cogl/cogl/cogl-attribute.c | 1 | ||||
-rw-r--r-- | cogl/cogl/cogl-framebuffer-private.h | 7 | ||||
-rw-r--r-- | cogl/cogl/cogl-framebuffer.c | 12 | ||||
-rw-r--r-- | cogl/cogl/cogl-journal.c | 6 | ||||
-rw-r--r-- | cogl/cogl/cogl-onscreen.c | 2 |
5 files changed, 0 insertions, 28 deletions
diff --git a/cogl/cogl/cogl-attribute.c b/cogl/cogl/cogl-attribute.c index e92546285..731da1543 100644 --- a/cogl/cogl/cogl-attribute.c +++ b/cogl/cogl/cogl-attribute.c @@ -652,7 +652,6 @@ _cogl_flush_attributes_state (CoglFramebuffer *framebuffer, * pixel and the scene is just comprised of simple rectangles still * in the journal. For this optimization to work we need to track * when the framebuffer really does get drawn to. */ - _cogl_framebuffer_mark_mid_scene (framebuffer); _cogl_framebuffer_mark_clear_clip_dirty (framebuffer); if (G_UNLIKELY (!(flags & COGL_DRAW_SKIP_LEGACY_STATE)) && diff --git a/cogl/cogl/cogl-framebuffer-private.h b/cogl/cogl/cogl-framebuffer-private.h index 1f5b31e51..e1a639411 100644 --- a/cogl/cogl/cogl-framebuffer-private.h +++ b/cogl/cogl/cogl-framebuffer-private.h @@ -181,10 +181,6 @@ struct _CoglFramebuffer int clear_clip_y1; gboolean clear_clip_dirty; - /* Whether something has been drawn to the buffer since the last - * swap buffers or swap region. */ - gboolean mid_scene; - /* driver specific */ gboolean dirty_bitmasks; CoglFramebufferBits bits; @@ -269,9 +265,6 @@ _cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer, void _cogl_framebuffer_mark_clear_clip_dirty (CoglFramebuffer *framebuffer); -void -_cogl_framebuffer_mark_mid_scene (CoglFramebuffer *framebuffer); - /* * _cogl_framebuffer_get_clip_stack: * @framebuffer: A #CoglFramebuffer diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c index f4d131315..9ffc4d136 100644 --- a/cogl/cogl/cogl-framebuffer.c +++ b/cogl/cogl/cogl-framebuffer.c @@ -242,12 +242,6 @@ _cogl_framebuffer_mark_clear_clip_dirty (CoglFramebuffer *framebuffer) } void -_cogl_framebuffer_mark_mid_scene (CoglFramebuffer *framebuffer) -{ - framebuffer->mid_scene = TRUE; -} - -void cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer, unsigned long buffers, float red, @@ -381,7 +375,6 @@ cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer, cleared: - _cogl_framebuffer_mark_mid_scene (framebuffer); _cogl_framebuffer_mark_clear_clip_dirty (framebuffer); if (buffers & COGL_BUFFER_BIT_DEPTH) @@ -1062,12 +1055,7 @@ cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer, if (framebuffer->dither_enabled == dither_enabled) return; - cogl_flush (); /* Currently dithering changes aren't tracked in the journal */ framebuffer->dither_enabled = dither_enabled; - - if (framebuffer->context->current_draw_buffer == framebuffer) - framebuffer->context->current_draw_buffer_changes |= - COGL_FRAMEBUFFER_STATE_DITHER; } void diff --git a/cogl/cogl/cogl-journal.c b/cogl/cogl/cogl-journal.c index 15de64e1b..d587b2ed1 100644 --- a/cogl/cogl/cogl-journal.c +++ b/cogl/cogl/cogl-journal.c @@ -1555,12 +1555,6 @@ _cogl_journal_log_quad (CoglJournal *journal, COGL_TIMER_START (_cogl_uprof_context, log_timer); - /* Adding something to the journal should mean that we are in the - * middle of the scene. Although this will also end up being set - * when the journal is actually flushed, we set it here explicitly - * so that we will know sooner */ - _cogl_framebuffer_mark_mid_scene (framebuffer); - /* If the framebuffer was previously empty then we'll take a reference to the current framebuffer. This reference will be removed when the journal is flushed */ diff --git a/cogl/cogl/cogl-onscreen.c b/cogl/cogl/cogl-onscreen.c index b06eea2a4..c68971c60 100644 --- a/cogl/cogl/cogl-onscreen.c +++ b/cogl/cogl/cogl-onscreen.c @@ -336,7 +336,6 @@ cogl_onscreen_swap_buffers_with_damage (CoglOnscreen *onscreen, } onscreen->frame_counter++; - framebuffer->mid_scene = FALSE; } void @@ -393,7 +392,6 @@ cogl_onscreen_swap_region (CoglOnscreen *onscreen, } onscreen->frame_counter++; - framebuffer->mid_scene = FALSE; } int |