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>
This commit is contained in:
Georges Basile Stavracas Neto 2022-03-31 11:46:57 -03:00
parent 9f3191fe9c
commit da8353dbcd
6 changed files with 15 additions and 14 deletions

View File

@ -14,8 +14,8 @@
typedef struct _TestMultiLayerPipelineState typedef struct _TestMultiLayerPipelineState
{ {
ClutterActor *group; ClutterActor *group;
CoglHandle alpha_tex; CoglTexture *alpha_tex;
CoglHandle redhand_tex; CoglTexture *redhand_tex;
gfloat *tex_coords; gfloat *tex_coords;
ClutterTimeline *timeline; ClutterTimeline *timeline;
@ -23,12 +23,12 @@ typedef struct _TestMultiLayerPipelineState
CoglPipeline *pipeline0; CoglPipeline *pipeline0;
graphene_matrix_t tex_matrix0; graphene_matrix_t tex_matrix0;
graphene_matrix_t rot_matrix0; graphene_matrix_t rot_matrix0;
CoglHandle light_tex0; CoglTexture *light_tex0;
CoglPipeline *pipeline1; CoglPipeline *pipeline1;
graphene_matrix_t tex_matrix1; graphene_matrix_t tex_matrix1;
graphene_matrix_t rot_matrix1; graphene_matrix_t rot_matrix1;
CoglHandle light_tex1; CoglTexture *light_tex1;
} TestMultiLayerPipelineState; } TestMultiLayerPipelineState;

View File

@ -20,8 +20,8 @@ struct _TestCoglbox
{ {
ClutterActor parent; ClutterActor parent;
CoglHandle texhand_id; CoglTexture *texhand_id;
CoglHandle texture_id; CoglTexture *texture_id;
CoglFramebuffer *framebuffer; CoglFramebuffer *framebuffer;
}; };

View File

@ -59,12 +59,12 @@ test_cogl_point_sprites_main (int argc, char *argv[]);
const char * const char *
test_cogl_point_sprites_describe (void); test_cogl_point_sprites_describe (void);
static CoglHandle static CoglTexture *
generate_round_texture (void) generate_round_texture (void)
{ {
guint8 *p, *data; guint8 *p, *data;
int x, y; int x, y;
CoglHandle tex; CoglTexture *tex;
p = data = g_malloc (TEXTURE_SIZE * TEXTURE_SIZE * 4); 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[]) test_cogl_point_sprites_main (int argc, char *argv[])
{ {
ClutterActor *stage; ClutterActor *stage;
CoglHandle tex; CoglTexture *tex;
CoglContext *ctx = CoglContext *ctx =
clutter_backend_get_cogl_context (clutter_get_default_backend ()); clutter_backend_get_cogl_context (clutter_get_default_backend ());
Data data; Data data;

View File

@ -20,7 +20,7 @@ struct _TestCoglbox
{ {
ClutterActor parent; ClutterActor parent;
CoglHandle cogl_tex_id[4]; CoglTexture *cogl_tex_id[4];
gint frame; gint frame;
}; };

View File

@ -20,7 +20,8 @@ struct _TestCoglbox
{ {
ClutterActor parent; ClutterActor parent;
CoglHandle sliced_tex, not_sliced_tex; CoglTexture *sliced_tex;
CoglTexture *not_sliced_tex;
gint frame; gint frame;
gboolean use_sliced; gboolean use_sliced;
gboolean use_linear_filtering; gboolean use_linear_filtering;
@ -150,8 +151,8 @@ test_coglbox_paint (ClutterActor *self,
ClutterPaintContext *paint_context) ClutterPaintContext *paint_context)
{ {
TestCoglbox *coglbox = TEST_COGLBOX (self); TestCoglbox *coglbox = TEST_COGLBOX (self);
CoglHandle tex_handle = coglbox->use_sliced ? coglbox->sliced_tex CoglTexture *tex_handle = coglbox->use_sliced ? coglbox->sliced_tex
: coglbox->not_sliced_tex; : coglbox->not_sliced_tex;
int tex_width = cogl_texture_get_width (tex_handle); int tex_width = cogl_texture_get_width (tex_handle);
int tex_height = cogl_texture_get_height (tex_handle); int tex_height = cogl_texture_get_height (tex_handle);
CoglPipeline *pipeline; CoglPipeline *pipeline;

View File

@ -21,7 +21,7 @@ struct _TestCoglbox
{ {
ClutterActor parent; ClutterActor parent;
CoglHandle cogl_tex_id; CoglTexture *cogl_tex_id;
gdouble animation_progress; gdouble animation_progress;
}; };