[mutter/gbsneto/graphene-matrix: 54/71] clutter/offscreen-effect: Use graphene APIs
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/graphene-matrix: 54/71] clutter/offscreen-effect: Use graphene APIs
- Date: Sun, 20 Sep 2020 21:39:42 +0000 (UTC)
commit 4bf897ca3efdfe20121478457fc4b818e5384f68
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Sep 11 16:34:59 2020 -0300
clutter/offscreen-effect: Use graphene APIs
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439
clutter/clutter/clutter-offscreen-effect.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/clutter/clutter/clutter-offscreen-effect.c b/clutter/clutter/clutter-offscreen-effect.c
index e4a9a45e5a..c76a973881 100644
--- a/clutter/clutter/clutter-offscreen-effect.c
+++ b/clutter/clutter/clutter-offscreen-effect.c
@@ -428,6 +428,7 @@ clutter_offscreen_effect_paint_texture (ClutterOffscreenEffect *effect,
CoglFramebuffer *framebuffer =
clutter_paint_context_get_framebuffer (paint_context);
graphene_matrix_t modelview;
+ graphene_matrix_t m;
float resource_scale;
cogl_framebuffer_push_matrix (framebuffer);
@@ -442,13 +443,19 @@ clutter_offscreen_effect_paint_texture (ClutterOffscreenEffect *effect,
if (resource_scale != 1.0f)
{
float paint_scale = 1.0f / resource_scale;
- cogl_matrix_scale (&modelview, paint_scale, paint_scale, 1);
+ graphene_matrix_init_scale (&m, paint_scale, paint_scale, 1.f);
}
+ else
+ {
+ graphene_matrix_init_identity (&m);
+ }
+
+ graphene_matrix_translate (&m,
+ &GRAPHENE_POINT3D_INIT (priv->fbo_offset_x,
+ priv->fbo_offset_y,
+ 0.0f));
+ graphene_matrix_multiply (&m, &modelview, &modelview);
- cogl_matrix_translate (&modelview,
- priv->fbo_offset_x,
- priv->fbo_offset_y,
- 0.0f);
cogl_framebuffer_set_modelview_matrix (framebuffer, &modelview);
/* paint the target material; this is virtualized for
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]