cogl: Remove cogl_handle_ref/unref
This is for all intents and purposes the same as `cogl_object_ref/unref`, but still refers to handles rather than objects (while we're trying to get rid of the former) so it's a bit of unnecessary redundant API. https://gitlab.gnome.org/GNOME/mutter/merge_requests/451
This commit is contained in:

committed by
Jonas Ådahl

parent
317ce05a27
commit
23f77a1b63
@ -225,12 +225,12 @@ test_cogl_multitexture_main (int argc, char *argv[])
|
||||
|
||||
clutter_main();
|
||||
|
||||
cogl_handle_unref (state->material1);
|
||||
cogl_handle_unref (state->material0);
|
||||
cogl_handle_unref (state->alpha_tex);
|
||||
cogl_handle_unref (state->redhand_tex);
|
||||
cogl_handle_unref (state->light_tex0);
|
||||
cogl_handle_unref (state->light_tex1);
|
||||
cogl_object_unref (state->material1);
|
||||
cogl_object_unref (state->material0);
|
||||
cogl_object_unref (state->alpha_tex);
|
||||
cogl_object_unref (state->redhand_tex);
|
||||
cogl_object_unref (state->light_tex0);
|
||||
cogl_object_unref (state->light_tex1);
|
||||
g_free (state);
|
||||
|
||||
return 0;
|
||||
|
@ -133,8 +133,8 @@ test_coglbox_dispose (GObject *object)
|
||||
|
||||
priv = TEST_COGLBOX_GET_PRIVATE (object);
|
||||
|
||||
cogl_handle_unref (priv->texture_id);
|
||||
cogl_handle_unref (priv->offscreen_id);
|
||||
cogl_object_unref (priv->texture_id);
|
||||
cogl_object_unref (priv->offscreen_id);
|
||||
|
||||
G_OBJECT_CLASS (test_coglbox_parent_class)->dispose (object);
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ paint_cb (ClutterActor *stage, Data *data)
|
||||
cogl_set_source (data->material);
|
||||
cogl_vertex_buffer_draw (vbo, COGL_VERTICES_MODE_POINTS, 0, N_SPARKS);
|
||||
|
||||
cogl_handle_unref (vbo);
|
||||
cogl_object_unref (vbo);
|
||||
|
||||
cogl_set_projection_matrix (&old_matrix);
|
||||
cogl_pop_matrix ();
|
||||
@ -242,7 +242,7 @@ test_cogl_point_sprites_main (int argc, char *argv[])
|
||||
|
||||
tex = generate_round_texture ();
|
||||
cogl_material_set_layer (data.material, 0, tex);
|
||||
cogl_handle_unref (tex);
|
||||
cogl_object_unref (tex);
|
||||
|
||||
if (!cogl_material_set_layer_point_sprite_coords_enabled (data.material,
|
||||
0, TRUE,
|
||||
|
@ -197,7 +197,7 @@ set_shader_num (int new_no)
|
||||
|
||||
program = cogl_create_program ();
|
||||
cogl_program_attach_shader (program, shader);
|
||||
cogl_handle_unref (shader);
|
||||
cogl_object_unref (shader);
|
||||
cogl_program_link (program);
|
||||
|
||||
uniform_no = cogl_program_get_uniform_location (program, "tex");
|
||||
@ -215,7 +215,7 @@ set_shader_num (int new_no)
|
||||
cogl_program_set_uniform_1f (program, uniform_no, 1.0f / image_height);
|
||||
|
||||
cogl_material_set_user_program (material, program);
|
||||
cogl_handle_unref (program);
|
||||
cogl_object_unref (program);
|
||||
|
||||
shader_no = new_no;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ test_coglbox_dispose (GObject *object)
|
||||
TestCoglboxPrivate *priv;
|
||||
|
||||
priv = TEST_COGLBOX_GET_PRIVATE (object);
|
||||
cogl_handle_unref (priv->cogl_tex_id);
|
||||
cogl_object_unref (priv->cogl_tex_id);
|
||||
|
||||
G_OBJECT_CLASS (test_coglbox_parent_class)->dispose (object);
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ test_coglbox_paint (ClutterActor *self)
|
||||
|
||||
cogl_pop_matrix ();
|
||||
|
||||
cogl_handle_unref (material);
|
||||
cogl_object_unref (material);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -235,8 +235,8 @@ test_coglbox_dispose (GObject *object)
|
||||
TestCoglboxPrivate *priv;
|
||||
|
||||
priv = TEST_COGLBOX_GET_PRIVATE (object);
|
||||
cogl_handle_unref (priv->not_sliced_tex);
|
||||
cogl_handle_unref (priv->sliced_tex);
|
||||
cogl_object_unref (priv->not_sliced_tex);
|
||||
cogl_object_unref (priv->sliced_tex);
|
||||
|
||||
G_OBJECT_CLASS (test_coglbox_parent_class)->dispose (object);
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ test_coglbox_dispose (GObject *object)
|
||||
TestCoglboxPrivate *priv;
|
||||
|
||||
priv = TEST_COGLBOX_GET_PRIVATE (object);
|
||||
cogl_handle_unref (priv->cogl_tex_id);
|
||||
cogl_object_unref (priv->cogl_tex_id);
|
||||
|
||||
G_OBJECT_CLASS (test_coglbox_parent_class)->dispose (object);
|
||||
}
|
||||
|
@ -383,8 +383,8 @@ test_cogl_vertex_buffer_main (int argc, char *argv[])
|
||||
|
||||
clutter_main ();
|
||||
|
||||
cogl_handle_unref (state.buffer);
|
||||
cogl_handle_unref (state.indices);
|
||||
cogl_object_unref (state.buffer);
|
||||
cogl_object_unref (state.indices);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user