mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
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
This commit is contained in:
parent
f9d1b7ca58
commit
dc8f875a8a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user