[mutter/gnome-40] clutter/layer-paint-node: Fix variable naming



commit 11f275ab4ccc2c39adde8ce35f365eef4c86a393
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Jul 28 18:47:36 2021 +0200

    clutter/layer-paint-node: Fix variable naming
    
    It's elsewhere in the file referred to as lnode. No idea what "res"
    means.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1942>

 clutter/clutter/clutter-paint-nodes.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/clutter/clutter/clutter-paint-nodes.c b/clutter/clutter/clutter-paint-nodes.c
index f1f7fce318..0ab725b976 100644
--- a/clutter/clutter/clutter-paint-nodes.c
+++ b/clutter/clutter/clutter-paint-nodes.c
@@ -1551,7 +1551,7 @@ clutter_layer_node_new (const graphene_matrix_t *projection,
                         float                    height,
                         guint8                   opacity)
 {
-  ClutterLayerNode *res;
+  ClutterLayerNode *lnode;
   CoglContext *context;
   CoglTexture2D *tex_2d;
   CoglTexture *texture;
@@ -1559,21 +1559,21 @@ clutter_layer_node_new (const graphene_matrix_t *projection,
   CoglOffscreen *offscreen;
   g_autoptr (GError) error = NULL;
 
-  res = _clutter_paint_node_create (CLUTTER_TYPE_LAYER_NODE);
+  lnode = _clutter_paint_node_create (CLUTTER_TYPE_LAYER_NODE);
 
-  res->needs_fbo_setup = TRUE;
-  res->projection = *projection;
-  res->viewport = *viewport;
-  res->fbo_width = width;
-  res->fbo_height = height;
-  res->opacity = opacity;
+  lnode->needs_fbo_setup = TRUE;
+  lnode->projection = *projection;
+  lnode->viewport = *viewport;
+  lnode->fbo_width = width;
+  lnode->fbo_height = height;
+  lnode->opacity = opacity;
 
   /* the texture backing the FBO */
   context = clutter_backend_get_cogl_context (clutter_get_default_backend ());
 
   tex_2d = cogl_texture_2d_new_with_size (context,
-                                          MAX (res->fbo_width, 1),
-                                          MAX (res->fbo_height, 1));
+                                          MAX (lnode->fbo_width, 1),
+                                          MAX (lnode->fbo_height, 1));
   texture = COGL_TEXTURE (tex_2d);
   cogl_texture_set_premultiplied (texture, TRUE);
 
@@ -1586,7 +1586,7 @@ clutter_layer_node_new (const graphene_matrix_t *projection,
       goto out;
     }
 
-  res->offscreen = COGL_FRAMEBUFFER (offscreen);
+  lnode->offscreen = COGL_FRAMEBUFFER (offscreen);
 
   cogl_color_init_from_4ub (&color, opacity, opacity, opacity, opacity);
 
@@ -1594,17 +1594,17 @@ clutter_layer_node_new (const graphene_matrix_t *projection,
    * interpolation filters because the texture is always
    * going to be painted at a 1:1 texel:pixel ratio
    */
-  res->pipeline = cogl_pipeline_copy (default_texture_pipeline);
-  cogl_pipeline_set_layer_filters (res->pipeline, 0,
+  lnode->pipeline = cogl_pipeline_copy (default_texture_pipeline);
+  cogl_pipeline_set_layer_filters (lnode->pipeline, 0,
                                    COGL_PIPELINE_FILTER_NEAREST,
                                    COGL_PIPELINE_FILTER_NEAREST);
-  cogl_pipeline_set_layer_texture (res->pipeline, 0, texture);
-  cogl_pipeline_set_color (res->pipeline, &color);
+  cogl_pipeline_set_layer_texture (lnode->pipeline, 0, texture);
+  cogl_pipeline_set_color (lnode->pipeline, &color);
 
 out:
   cogl_object_unref (texture);
 
-  return (ClutterPaintNode *) res;
+  return (ClutterPaintNode *) lnode;
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]