[mutter] tests/interactive: Replace most CoglHandles by CoglTextures



commit da8353dbcd3dd1e258786499e16b870ae2b034b6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Mar 31 11:46:57 2022 -0300

    tests/interactive: Replace most CoglHandles by CoglTextures
    
    There are 2 remaining CoglHandles, but they're for shaders, which
    actually return CoglHandle as part of the API signature.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355>

 src/tests/clutter/interactive/test-cogl-multitexture.c  | 8 ++++----
 src/tests/clutter/interactive/test-cogl-offscreen.c     | 4 ++--
 src/tests/clutter/interactive/test-cogl-point-sprites.c | 6 +++---
 src/tests/clutter/interactive/test-cogl-tex-convert.c   | 2 +-
 src/tests/clutter/interactive/test-cogl-tex-polygon.c   | 7 ++++---
 src/tests/clutter/interactive/test-cogl-tex-tile.c      | 2 +-
 6 files changed, 15 insertions(+), 14 deletions(-)
---
diff --git a/src/tests/clutter/interactive/test-cogl-multitexture.c 
b/src/tests/clutter/interactive/test-cogl-multitexture.c
index b86bb73691..5d825b7666 100644
--- a/src/tests/clutter/interactive/test-cogl-multitexture.c
+++ b/src/tests/clutter/interactive/test-cogl-multitexture.c
@@ -14,8 +14,8 @@
 typedef struct _TestMultiLayerPipelineState
 {
   ClutterActor    *group;
-  CoglHandle       alpha_tex;
-  CoglHandle       redhand_tex;
+  CoglTexture     *alpha_tex;
+  CoglTexture     *redhand_tex;
   gfloat          *tex_coords;
 
   ClutterTimeline *timeline;
@@ -23,12 +23,12 @@ typedef struct _TestMultiLayerPipelineState
   CoglPipeline *pipeline0;
   graphene_matrix_t tex_matrix0;
   graphene_matrix_t rot_matrix0;
-  CoglHandle       light_tex0;
+  CoglTexture     *light_tex0;
 
   CoglPipeline *pipeline1;
   graphene_matrix_t tex_matrix1;
   graphene_matrix_t rot_matrix1;
-  CoglHandle       light_tex1;
+  CoglTexture     *light_tex1;
 
 } TestMultiLayerPipelineState;
 
diff --git a/src/tests/clutter/interactive/test-cogl-offscreen.c 
b/src/tests/clutter/interactive/test-cogl-offscreen.c
index 57a713bfaa..967a23b36c 100644
--- a/src/tests/clutter/interactive/test-cogl-offscreen.c
+++ b/src/tests/clutter/interactive/test-cogl-offscreen.c
@@ -20,8 +20,8 @@ struct _TestCoglbox
 {
   ClutterActor           parent;
 
-  CoglHandle texhand_id;
-  CoglHandle texture_id;
+  CoglTexture *texhand_id;
+  CoglTexture *texture_id;
   CoglFramebuffer *framebuffer;
 };
 
diff --git a/src/tests/clutter/interactive/test-cogl-point-sprites.c 
b/src/tests/clutter/interactive/test-cogl-point-sprites.c
index 0b3feb0c35..66416719ed 100644
--- a/src/tests/clutter/interactive/test-cogl-point-sprites.c
+++ b/src/tests/clutter/interactive/test-cogl-point-sprites.c
@@ -59,12 +59,12 @@ test_cogl_point_sprites_main (int argc, char *argv[]);
 const char *
 test_cogl_point_sprites_describe (void);
 
-static CoglHandle
+static CoglTexture *
 generate_round_texture (void)
 {
   guint8 *p, *data;
   int x, y;
-  CoglHandle tex;
+  CoglTexture *tex;
 
   p = data = g_malloc (TEXTURE_SIZE * TEXTURE_SIZE * 4);
 
@@ -216,7 +216,7 @@ G_MODULE_EXPORT int
 test_cogl_point_sprites_main (int argc, char *argv[])
 {
   ClutterActor *stage;
-  CoglHandle tex;
+  CoglTexture *tex;
   CoglContext *ctx =
     clutter_backend_get_cogl_context (clutter_get_default_backend ());
   Data data;
diff --git a/src/tests/clutter/interactive/test-cogl-tex-convert.c 
b/src/tests/clutter/interactive/test-cogl-tex-convert.c
index ca36178964..d35e9318bb 100644
--- a/src/tests/clutter/interactive/test-cogl-tex-convert.c
+++ b/src/tests/clutter/interactive/test-cogl-tex-convert.c
@@ -20,7 +20,7 @@ struct _TestCoglbox
 {
   ClutterActor           parent;
 
-  CoglHandle cogl_tex_id[4];
+  CoglTexture *cogl_tex_id[4];
   gint       frame;
 };
 
diff --git a/src/tests/clutter/interactive/test-cogl-tex-polygon.c 
b/src/tests/clutter/interactive/test-cogl-tex-polygon.c
index 842f5a94f7..65f7c3763c 100644
--- a/src/tests/clutter/interactive/test-cogl-tex-polygon.c
+++ b/src/tests/clutter/interactive/test-cogl-tex-polygon.c
@@ -20,7 +20,8 @@ struct _TestCoglbox
 {
   ClutterActor           parent;
 
-  CoglHandle sliced_tex, not_sliced_tex;
+  CoglTexture *sliced_tex;
+  CoglTexture *not_sliced_tex;
   gint       frame;
   gboolean   use_sliced;
   gboolean   use_linear_filtering;
@@ -150,8 +151,8 @@ test_coglbox_paint (ClutterActor        *self,
                     ClutterPaintContext *paint_context)
 {
   TestCoglbox *coglbox = TEST_COGLBOX (self);
-  CoglHandle tex_handle = coglbox->use_sliced ? coglbox->sliced_tex
-                                              : coglbox->not_sliced_tex;
+  CoglTexture *tex_handle = coglbox->use_sliced ? coglbox->sliced_tex
+                                                : coglbox->not_sliced_tex;
   int tex_width = cogl_texture_get_width (tex_handle);
   int tex_height = cogl_texture_get_height (tex_handle);
   CoglPipeline *pipeline;
diff --git a/src/tests/clutter/interactive/test-cogl-tex-tile.c 
b/src/tests/clutter/interactive/test-cogl-tex-tile.c
index 95f5c48f97..bbd5b7ed4d 100644
--- a/src/tests/clutter/interactive/test-cogl-tex-tile.c
+++ b/src/tests/clutter/interactive/test-cogl-tex-tile.c
@@ -21,7 +21,7 @@ struct _TestCoglbox
 {
   ClutterActor           parent;
 
-  CoglHandle cogl_tex_id;
+  CoglTexture *cogl_tex_id;
   gdouble    animation_progress;
 };
 


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