mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
cogl: Remove the framebuffer and source stacks
They have been deprecated for a long time, and all their uses in clutter and mutter has been removed. This also removes some no longer needed legacy state tracking, as they were only ever excercised in certain circumstances when there was sources (pipelines or materials) on the now removed source stack. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
77b3c0d670
commit
4ede6ea8c5
@ -269,7 +269,6 @@ set_cursor_visible (MetaStageX11 *stage_x11)
|
||||
static void
|
||||
meta_stage_x11_unrealize (ClutterStageWindow *stage_window)
|
||||
{
|
||||
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
|
||||
MetaStageX11 *stage_x11 = META_STAGE_X11 (stage_window);
|
||||
|
||||
if (clutter_stages_by_xid != NULL)
|
||||
@ -278,19 +277,6 @@ meta_stage_x11_unrealize (ClutterStageWindow *stage_window)
|
||||
GINT_TO_POINTER (stage_x11->xwin));
|
||||
}
|
||||
|
||||
/* Clutter still uses part of the deprecated stateful API of Cogl
|
||||
* (in particulart cogl_set_framebuffer). It means Cogl can keep an
|
||||
* internal reference to the onscreen object we rendered to. In the
|
||||
* case of foreign window, we want to avoid this, as we don't know
|
||||
* what's going to happen to that window.
|
||||
*
|
||||
* The following call sets the current Cogl framebuffer to a dummy
|
||||
* 1x1 one if we're unrealizing the current one, so Cogl doesn't
|
||||
* keep any reference to the foreign window.
|
||||
*/
|
||||
if (cogl_get_draw_framebuffer () == COGL_FRAMEBUFFER (stage_x11->onscreen))
|
||||
_clutter_backend_reset_cogl_framebuffer (stage_cogl->backend);
|
||||
|
||||
if (stage_x11->frame_closure)
|
||||
{
|
||||
cogl_onscreen_remove_frame_callback (stage_x11->onscreen,
|
||||
|
@ -307,32 +307,6 @@ static void
|
||||
meta_stage_x11_nested_unrealize (ClutterStageWindow *stage_window)
|
||||
{
|
||||
MetaStageX11Nested *stage_nested = META_STAGE_X11_NESTED (stage_window);
|
||||
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
MetaRenderer *renderer = meta_backend_get_renderer (backend);
|
||||
GList *l;
|
||||
|
||||
/* Clutter still uses part of the deprecated stateful API of Cogl
|
||||
* (in particulart cogl_set_framebuffer). It means Cogl can keep an
|
||||
* internal reference to the onscreen object we rendered to. In the
|
||||
* case of foreign window, we want to avoid this, as we don't know
|
||||
* what's going to happen to that window.
|
||||
*
|
||||
* The following call sets the current Cogl framebuffer to a dummy
|
||||
* 1x1 one if we're unrealizing the current one, so Cogl doesn't
|
||||
* keep any reference to the foreign window.
|
||||
*/
|
||||
for (l = meta_renderer_get_views (renderer); l ;l = l->next)
|
||||
{
|
||||
ClutterStageView *view = l->data;
|
||||
CoglFramebuffer *framebuffer = clutter_stage_view_get_framebuffer (view);
|
||||
|
||||
if (cogl_get_draw_framebuffer () == framebuffer)
|
||||
{
|
||||
_clutter_backend_reset_cogl_framebuffer (stage_cogl->backend);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_clear_pointer (&stage_nested->pipeline, cogl_object_unref);
|
||||
|
||||
|
Reference in New Issue
Block a user