From: Cedric BAIL Date: Thu, 5 Oct 2017 18:36:23 +0000 (-0700) Subject: evas: remove evas_canvas3d_texture_file_set and efl_file_set instead. X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~2368 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91957a41193319844bf446a5be9a4397fa2d433a;p=platform%2Fupstream%2Fefl.git evas: remove evas_canvas3d_texture_file_set and efl_file_set instead. --- diff --git a/src/examples/elementary/performance/graphical.c b/src/examples/elementary/performance/graphical.c index 420be6e..de4acb9 100644 --- a/src/examples/elementary/performance/graphical.c +++ b/src/examples/elementary/performance/graphical.c @@ -427,7 +427,7 @@ _init_scene(Evas_Object *img) globalGraphical.material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, globalGraphical.evas); globalGraphical.texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, globalGraphical.evas); - evas_canvas3d_texture_file_set(globalGraphical.texture, "target_texture.png", NULL); + efl_file_set(globalGraphical.texture, "target_texture.png", NULL); evas_canvas3d_texture_filter_set(globalGraphical.texture, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR); evas_canvas3d_texture_wrap_set(globalGraphical.texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); evas_canvas3d_material_texture_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, globalGraphical.texture); diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c index fac73ad..8531665 100644 --- a/src/examples/evas/evas-3d-aabb.c +++ b/src/examples/evas/evas-3d-aabb.c @@ -175,7 +175,7 @@ main(void) evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG); texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); - evas_canvas3d_texture_file_set(texture, image_path, NULL); + efl_file_set(texture, image_path, NULL); evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture); diff --git a/src/examples/evas/evas-3d-colorpick.c b/src/examples/evas/evas-3d-colorpick.c index 142af34..80c392a 100644 --- a/src/examples/evas/evas-3d-colorpick.c +++ b/src/examples/evas/evas-3d-colorpick.c @@ -256,7 +256,7 @@ _init_sphere(void *this, const char *texture) evas_canvas3d_mesh_color_pick_enable_set(sphere->mesh, EINA_TRUE); sphere->texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); - evas_canvas3d_texture_file_set(sphere->texture, texture, NULL); + efl_file_set(sphere->texture, texture, NULL); evas_canvas3d_texture_filter_set(sphere->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); evas_canvas3d_texture_wrap_set(sphere->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); evas_canvas3d_material_texture_set(sphere->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, sphere->texture); diff --git a/src/examples/evas/evas-3d-cube2.c b/src/examples/evas/evas-3d-cube2.c index f581d93..c07e530 100644 --- a/src/examples/evas/evas-3d-cube2.c +++ b/src/examples/evas/evas-3d-cube2.c @@ -168,7 +168,7 @@ _mesh_setup(Scene_Data *data) evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]); evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]); - evas_canvas3d_texture_file_set(data->texture_normal, normal_map_path, NULL); + efl_file_set(data->texture_normal, normal_map_path, NULL); evas_canvas3d_material_texture_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture0); evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture1); diff --git a/src/examples/evas/evas-3d-frustum.c b/src/examples/evas/evas-3d-frustum.c index 7515dad..776e61c 100644 --- a/src/examples/evas/evas-3d-frustum.c +++ b/src/examples/evas/evas-3d-frustum.c @@ -352,7 +352,7 @@ _mesh_setup_model(Scene_Data *data) data->material_model = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); data->texture_model = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); - evas_canvas3d_texture_file_set(data->texture_model, texture_path, NULL); + efl_file_set(data->texture_model, texture_path, NULL); evas_canvas3d_texture_filter_set(data->texture_model, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); evas_canvas3d_texture_wrap_set(data->texture_model, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); diff --git a/src/examples/evas/evas-3d-md2.c b/src/examples/evas/evas-3d-md2.c index 463c436..aed2781 100644 --- a/src/examples/evas/evas-3d-md2.c +++ b/src/examples/evas/evas-3d-md2.c @@ -129,7 +129,7 @@ main(void) evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG); texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); - evas_canvas3d_texture_file_set(texture, image_path, NULL); + efl_file_set(texture, image_path, NULL); evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture); diff --git a/src/examples/evas/evas-3d-obj.c b/src/examples/evas/evas-3d-obj.c index 76a263b..5f3454c 100644 --- a/src/examples/evas/evas-3d-obj.c +++ b/src/examples/evas/evas-3d-obj.c @@ -65,7 +65,7 @@ #define ADD_TEXTURE(name, path) \ name = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \ - evas_canvas3d_texture_file_set(name, path, NULL); \ + efl_file_set(name, path, NULL); \ evas_canvas3d_texture_filter_set(name, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \ EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \ evas_canvas3d_texture_wrap_set(name, EVAS_CANVAS3D_WRAP_MODE_REPEAT, \ diff --git a/src/examples/evas/evas-3d-parallax-occlusion.c b/src/examples/evas/evas-3d-parallax-occlusion.c index 9640f24..ec98f94 100644 --- a/src/examples/evas/evas-3d-parallax-occlusion.c +++ b/src/examples/evas/evas-3d-parallax-occlusion.c @@ -138,9 +138,9 @@ _mesh_setup(Scene_Data *data) data->texture_rocks = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); data->texture_rocks_n = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); - evas_canvas3d_texture_file_set(data->texture_rocks, rock_diffuse, NULL); + efl_file_set(data->texture_rocks, rock_diffuse, NULL); evas_canvas3d_texture_wrap_set(data->texture_rocks, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); - evas_canvas3d_texture_file_set(data->texture_rocks_n, rock_n_and_height_map, NULL); + efl_file_set(data->texture_rocks_n, rock_n_and_height_map, NULL); evas_canvas3d_texture_wrap_set(data->texture_rocks_n, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); evas_canvas3d_material_texture_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_rocks_n); @@ -160,9 +160,9 @@ _mesh_setup(Scene_Data *data) data->texture_wood = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); data->texture_four_n = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); - evas_canvas3d_texture_file_set(data->texture_wood, wood_diffuse, NULL); + efl_file_set(data->texture_wood, wood_diffuse, NULL); evas_canvas3d_texture_wrap_set(data->texture_wood, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); - evas_canvas3d_texture_file_set(data->texture_four_n, wood_n_and_height_map, NULL); + efl_file_set(data->texture_four_n, wood_n_and_height_map, NULL); evas_canvas3d_texture_wrap_set(data->texture_four_n, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); evas_canvas3d_material_texture_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_four_n); diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c index b6d20e7..2129722 100644 --- a/src/examples/evas/evas-3d-pick.c +++ b/src/examples/evas/evas-3d-pick.c @@ -143,7 +143,7 @@ main(void) material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); texture_diffuse = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); - evas_canvas3d_texture_file_set(texture_diffuse, image_path, NULL); + efl_file_set(texture_diffuse, image_path, NULL); evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR); evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse); evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c index 00d05f9..d0e396c 100644 --- a/src/examples/evas/evas-3d-ply.c +++ b/src/examples/evas/evas-3d-ply.c @@ -159,7 +159,7 @@ main(void) material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); - evas_canvas3d_texture_file_set(texture, image_path, NULL); + efl_file_set(texture, image_path, NULL); evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture); diff --git a/src/examples/evas/evas-3d-shadows.c b/src/examples/evas/evas-3d-shadows.c index f24824e..5571384 100644 --- a/src/examples/evas/evas-3d-shadows.c +++ b/src/examples/evas/evas-3d-shadows.c @@ -262,12 +262,12 @@ _fence_setup(Body_3D *fence) Eo *texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); evas_canvas3d_texture_atlas_enable_set(texture, EINA_FALSE); - evas_canvas3d_texture_file_set(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL); + efl_file_set(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL); evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); Eo *texture1 = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); evas_canvas3d_texture_atlas_enable_set(texture1, EINA_FALSE); - evas_canvas3d_texture_file_set(texture1, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL); + efl_file_set(texture1, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL); evas_canvas3d_texture_filter_set(texture1, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); evas_canvas3d_texture_wrap_set(texture1, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); fence->material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); @@ -344,7 +344,7 @@ static void _model_setup(Body_3D *model) { model->texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); - evas_canvas3d_texture_file_set(model->texture, image_path, NULL); + efl_file_set(model->texture, image_path, NULL); evas_canvas3d_texture_filter_set(model->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); evas_canvas3d_texture_wrap_set(model->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); model->material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); @@ -373,7 +373,7 @@ static void _billboard_setup(Scene_Data *data) { data->billboard.texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); - evas_canvas3d_texture_file_set(data->billboard.texture, b_image_path, NULL); + efl_file_set(data->billboard.texture, b_image_path, NULL); evas_canvas3d_texture_filter_set(data->billboard.texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); evas_canvas3d_texture_wrap_set(data->billboard.texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); diff --git a/src/examples/evas/shooter/evas-3d-shooter-macros.h b/src/examples/evas/shooter/evas-3d-shooter-macros.h index 7c1282a..a062e5e 100644 --- a/src/examples/evas/shooter/evas-3d-shooter-macros.h +++ b/src/examples/evas/shooter/evas-3d-shooter-macros.h @@ -156,7 +156,7 @@ typedef struct _vec2 data->texture_diffuse_##Object = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \ \ evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_##Object, EINA_FALSE); \ - evas_canvas3d_texture_file_set(data->texture_diffuse_##Object, image, NULL); \ + efl_file_set(data->texture_diffuse_##Object, image, NULL); \ evas_canvas3d_texture_filter_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \ EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \ evas_canvas3d_texture_wrap_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \ @@ -175,7 +175,7 @@ typedef struct _vec2 data->texture_diffuse_##Object = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \ \ evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_##Object, EINA_FALSE); \ - evas_canvas3d_texture_file_set(data->texture_diffuse_##Object, image, NULL); \ + efl_file_set(data->texture_diffuse_##Object, image, NULL); \ evas_canvas3d_texture_filter_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \ EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \ evas_canvas3d_texture_wrap_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \ @@ -190,7 +190,7 @@ typedef struct _vec2 data->texture_normal_##Object = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \ \ evas_canvas3d_texture_atlas_enable_set(data->texture_normal_##Object, EINA_FALSE); \ - evas_canvas3d_texture_file_set(data->texture_normal_##Object, normal, NULL); \ + efl_file_set(data->texture_normal_##Object, normal, NULL); \ evas_canvas3d_texture_filter_set(data->texture_normal_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \ EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \ evas_canvas3d_texture_wrap_set(data->texture_normal_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \ diff --git a/src/examples/evas/shooter/evas-3d-shooter.c b/src/examples/evas/shooter/evas-3d-shooter.c index 9fc7bb8..74f6584 100644 --- a/src/examples/evas/shooter/evas-3d-shooter.c +++ b/src/examples/evas/shooter/evas-3d-shooter.c @@ -133,14 +133,14 @@ _key_down(void *data, if (!scene->blending) { scene->blending = EINA_TRUE; - evas_canvas3d_texture_file_set(scene->texture_diffuse_carpet, gazebo_t_trans_path, NULL); + efl_file_set(scene->texture_diffuse_carpet, gazebo_t_trans_path, NULL); evas_canvas3d_mesh_blending_enable_set(scene->mesh_carpet, EINA_TRUE); evas_canvas3d_mesh_blending_func_set(scene->mesh_carpet, EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA); } else { scene->blending = EINA_FALSE; - evas_canvas3d_texture_file_set(scene->texture_diffuse_carpet, gazebo_t_path, NULL); + efl_file_set(scene->texture_diffuse_carpet, gazebo_t_path, NULL); evas_canvas3d_mesh_blending_enable_set(scene->mesh_carpet, EINA_FALSE); } } @@ -763,7 +763,7 @@ _mesh_setup_gun_planet(Scene_Data *data) if (data->blending) { evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_carpet, EINA_FALSE); - evas_canvas3d_texture_file_set(data->texture_diffuse_carpet, gazebo_t_trans_path, NULL); + efl_file_set(data->texture_diffuse_carpet, gazebo_t_trans_path, NULL); evas_canvas3d_mesh_blending_enable_set(data->mesh_carpet, EINA_TRUE); evas_canvas3d_mesh_blending_func_set(data->mesh_carpet, EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA); } @@ -888,7 +888,7 @@ _mesh_setup_column(Scene_Data *data, int index) data->texture_diffuse_column = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); - evas_canvas3d_texture_file_set(data->texture_diffuse_column, red_brick_path, NULL); + efl_file_set(data->texture_diffuse_column, red_brick_path, NULL); evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_column, EINA_FALSE); evas_canvas3d_texture_filter_set(data->texture_diffuse_column, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); evas_canvas3d_texture_wrap_set(data->texture_diffuse_column, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);