From dc8f875a8ad48395acc72df8ac316e2ed7965618 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Fri, 11 Sep 2020 16:34:59 -0300 Subject: [PATCH] clutter/offscreen-effect: Stop using CoglMatrix API Switch to using CoglFramebuffer APIs, which use the modelview matrix stack. CoglMatrixStack will be ported to graphene APIs later, but it will be transparent to this change. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439 --- clutter/clutter/clutter-offscreen-effect.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/clutter/clutter/clutter-offscreen-effect.c b/clutter/clutter/clutter-offscreen-effect.c index e4a9a45e5..129d7e6f4 100644 --- a/clutter/clutter/clutter-offscreen-effect.c +++ b/clutter/clutter/clutter-offscreen-effect.c @@ -427,7 +427,6 @@ clutter_offscreen_effect_paint_texture (ClutterOffscreenEffect *effect, ClutterOffscreenEffectPrivate *priv = effect->priv; CoglFramebuffer *framebuffer = clutter_paint_context_get_framebuffer (paint_context); - graphene_matrix_t modelview; float resource_scale; cogl_framebuffer_push_matrix (framebuffer); @@ -435,21 +434,18 @@ clutter_offscreen_effect_paint_texture (ClutterOffscreenEffect *effect, /* The current modelview matrix is *almost* perfect already. It's only * missing a correction for the expanded FBO and offset rendering within... */ - cogl_framebuffer_get_modelview_matrix (framebuffer, &modelview); - resource_scale = clutter_actor_get_resource_scale (priv->actor); if (resource_scale != 1.0f) { float paint_scale = 1.0f / resource_scale; - cogl_matrix_scale (&modelview, paint_scale, paint_scale, 1); + cogl_framebuffer_scale (framebuffer, paint_scale, paint_scale, 1.f); } - cogl_matrix_translate (&modelview, - priv->fbo_offset_x, - priv->fbo_offset_y, - 0.0f); - cogl_framebuffer_set_modelview_matrix (framebuffer, &modelview); + cogl_framebuffer_translate (framebuffer, + priv->fbo_offset_x, + priv->fbo_offset_y, + 0.0f); /* paint the target material; this is virtualized for * sub-classes that require special hand-holding