mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
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
This commit is contained in:
parent
c5b7d73ce2
commit
62072838c9
@ -652,7 +652,6 @@ _cogl_flush_attributes_state (CoglFramebuffer *framebuffer,
|
|||||||
* pixel and the scene is just comprised of simple rectangles still
|
* pixel and the scene is just comprised of simple rectangles still
|
||||||
* in the journal. For this optimization to work we need to track
|
* in the journal. For this optimization to work we need to track
|
||||||
* when the framebuffer really does get drawn to. */
|
* when the framebuffer really does get drawn to. */
|
||||||
_cogl_framebuffer_mark_mid_scene (framebuffer);
|
|
||||||
_cogl_framebuffer_mark_clear_clip_dirty (framebuffer);
|
_cogl_framebuffer_mark_clear_clip_dirty (framebuffer);
|
||||||
|
|
||||||
if (G_UNLIKELY (!(flags & COGL_DRAW_SKIP_LEGACY_STATE)) &&
|
if (G_UNLIKELY (!(flags & COGL_DRAW_SKIP_LEGACY_STATE)) &&
|
||||||
|
@ -181,10 +181,6 @@ struct _CoglFramebuffer
|
|||||||
int clear_clip_y1;
|
int clear_clip_y1;
|
||||||
gboolean clear_clip_dirty;
|
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 */
|
/* driver specific */
|
||||||
gboolean dirty_bitmasks;
|
gboolean dirty_bitmasks;
|
||||||
CoglFramebufferBits bits;
|
CoglFramebufferBits bits;
|
||||||
@ -269,9 +265,6 @@ _cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer,
|
|||||||
void
|
void
|
||||||
_cogl_framebuffer_mark_clear_clip_dirty (CoglFramebuffer *framebuffer);
|
_cogl_framebuffer_mark_clear_clip_dirty (CoglFramebuffer *framebuffer);
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_framebuffer_mark_mid_scene (CoglFramebuffer *framebuffer);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _cogl_framebuffer_get_clip_stack:
|
* _cogl_framebuffer_get_clip_stack:
|
||||||
* @framebuffer: A #CoglFramebuffer
|
* @framebuffer: A #CoglFramebuffer
|
||||||
|
@ -241,12 +241,6 @@ _cogl_framebuffer_mark_clear_clip_dirty (CoglFramebuffer *framebuffer)
|
|||||||
framebuffer->clear_clip_dirty = TRUE;
|
framebuffer->clear_clip_dirty = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_framebuffer_mark_mid_scene (CoglFramebuffer *framebuffer)
|
|
||||||
{
|
|
||||||
framebuffer->mid_scene = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
|
||||||
unsigned long buffers,
|
unsigned long buffers,
|
||||||
@ -381,7 +375,6 @@ cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
|
|||||||
|
|
||||||
cleared:
|
cleared:
|
||||||
|
|
||||||
_cogl_framebuffer_mark_mid_scene (framebuffer);
|
|
||||||
_cogl_framebuffer_mark_clear_clip_dirty (framebuffer);
|
_cogl_framebuffer_mark_clear_clip_dirty (framebuffer);
|
||||||
|
|
||||||
if (buffers & COGL_BUFFER_BIT_DEPTH)
|
if (buffers & COGL_BUFFER_BIT_DEPTH)
|
||||||
@ -1062,12 +1055,7 @@ cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
|||||||
if (framebuffer->dither_enabled == dither_enabled)
|
if (framebuffer->dither_enabled == dither_enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cogl_flush (); /* Currently dithering changes aren't tracked in the journal */
|
|
||||||
framebuffer->dither_enabled = dither_enabled;
|
framebuffer->dither_enabled = dither_enabled;
|
||||||
|
|
||||||
if (framebuffer->context->current_draw_buffer == framebuffer)
|
|
||||||
framebuffer->context->current_draw_buffer_changes |=
|
|
||||||
COGL_FRAMEBUFFER_STATE_DITHER;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1555,12 +1555,6 @@ _cogl_journal_log_quad (CoglJournal *journal,
|
|||||||
|
|
||||||
COGL_TIMER_START (_cogl_uprof_context, log_timer);
|
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
|
/* If the framebuffer was previously empty then we'll take a
|
||||||
reference to the current framebuffer. This reference will be
|
reference to the current framebuffer. This reference will be
|
||||||
removed when the journal is flushed */
|
removed when the journal is flushed */
|
||||||
|
@ -336,7 +336,6 @@ cogl_onscreen_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||||||
}
|
}
|
||||||
|
|
||||||
onscreen->frame_counter++;
|
onscreen->frame_counter++;
|
||||||
framebuffer->mid_scene = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -393,7 +392,6 @@ cogl_onscreen_swap_region (CoglOnscreen *onscreen,
|
|||||||
}
|
}
|
||||||
|
|
||||||
onscreen->frame_counter++;
|
onscreen->frame_counter++;
|
||||||
framebuffer->mid_scene = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user