diff options
author | Savio Sena <savio.sena@acm.org> | 2014-09-24 00:41:41 -0300 |
---|---|---|
committer | Savio Sena <savio.sena@acm.org> | 2014-09-24 04:14:08 -0300 |
commit | 21216c5dffe5043b90637bad1f16ea30c67f23a5 (patch) | |
tree | da0081c0ffbcf6ad0f722bcc64781cfcbde90459 /src | |
parent | 46a88189ca8975b775e34cd4a14205f42d5e0ec9 (diff) |
Translated some _loops and _setups to C++.
Diffstat (limited to 'src')
51 files changed, 652 insertions, 867 deletions
diff --git a/src/bin/cxx/image_blend_many_smooth_same_scaled.cc b/src/bin/cxx/image_blend_many_smooth_same_scaled.cc index 6ca5619..e4a02ce 100644 --- a/src/bin/cxx/image_blend_many_smooth_same_scaled.cc +++ b/src/bin/cxx/image_blend_many_smooth_same_scaled.cc | |||
@@ -25,21 +25,19 @@ static efl::eina::list<evas::image> images; | |||
25 | /* setup */ | 25 | /* setup */ |
26 | static void _setup(void) | 26 | static void _setup(void) |
27 | { | 27 | { |
28 | int i, w, h, n; | ||
29 | evas::canvas canvas(::eo_ref(G_evas)); | 28 | evas::canvas canvas(::eo_ref(G_evas)); |
30 | for (i = 0; i < MANYNUM; i++) | 29 | for (int i = 0; i < MANYNUM; i++) |
31 | { | 30 | { |
32 | evas::image o(efl::eo::parent = canvas); | 31 | evas::image o(efl::eo::parent = canvas); |
33 | images.push_back(o); | 32 | images.push_back(o); |
34 | n = rnd() % 100; | 33 | int n = rnd() % 100; |
35 | w = 3 + ((n * (60 - 3)) / 100); | 34 | int w = 3 + ((n * (60 - 3)) / 100); |
36 | h = 4 + ((n * (80 - 4)) / 100); | 35 | int h = 4 + ((n * (80 - 4)) / 100); |
37 | eo_do(o, | 36 | o.file_set(build_path("logo.png"), NULL); |
38 | efl_file_set(build_path("logo.png"), NULL), | 37 | o.smooth_scale_set(1); |
39 | efl_image_smooth_scale_set(1), | 38 | o.evas::object::size_set(w, h); |
40 | evas_obj_size_set(w, h), | 39 | o.fill_set(0, 0, w, h); |
41 | evas_obj_image_fill_set(0, 0, w, h), | 40 | o.visibility_set(true); |
42 | evas_obj_visibility_set(EINA_TRUE)); | ||
43 | } | 41 | } |
44 | done = 0; | 42 | done = 0; |
45 | } | 43 | } |
@@ -53,16 +51,16 @@ static void _cleanup() | |||
53 | /* loop - do things */ | 51 | /* loop - do things */ |
54 | static void _loop(double t, int f) | 52 | static void _loop(double t, int f) |
55 | { | 53 | { |
56 | int i; | 54 | auto itr = images.begin(); |
57 | Evas_Coord x, y, w, h; | 55 | for (int i = 0; i < MANYNUM; i++, ++itr) |
58 | for (i = 0; i < MANYNUM; i++) | ||
59 | { | 56 | { |
60 | eo_do(o_images[i], evas_obj_size_get(&w, &h)); | 57 | Evas_Coord w, h; |
61 | x = (win_w / 2) - (w / 2); | 58 | (*itr).size_get(&w, &h); |
59 | Evas_Coord x = (win_w / 2) - (w / 2); | ||
62 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 2); | 60 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 2); |
63 | y = (win_h / 2) - (h / 2); | 61 | Evas_Coord y = (win_h / 2) - (h / 2); |
64 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 2); | 62 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 2); |
65 | eo_do(o_images[i], evas_obj_position_set(x, y)); | 63 | (*itr).position_set(x, y); |
66 | } | 64 | } |
67 | FPS_STD(NAME); | 65 | FPS_STD(NAME); |
68 | } | 66 | } |
diff --git a/src/bin/cxx/image_blend_nearest_same_scaled.cc b/src/bin/cxx/image_blend_nearest_same_scaled.cc index 71ed8ab..55bd802 100644 --- a/src/bin/cxx/image_blend_nearest_same_scaled.cc +++ b/src/bin/cxx/image_blend_nearest_same_scaled.cc | |||
@@ -44,32 +44,24 @@ static void _cleanup() | |||
44 | /* loop - do things */ | 44 | /* loop - do things */ |
45 | static void _loop(double t, int f) | 45 | static void _loop(double t, int f) |
46 | { | 46 | { |
47 | int i; | 47 | auto itr = images.begin(); |
48 | Evas_Coord x, y, w, h, w0, h0; | 48 | for (int i = 0; i < OBNUM; i++, ++itr) |
49 | for (i = 0; i < OBNUM; i++) | ||
50 | { | 49 | { |
51 | w0 = 80; | 50 | Evas_Coord w0 = 80; |
52 | h0 = 80; | 51 | Evas_Coord h0 = 80; |
53 | w = 40 + ((i % 3) * (w0 / 2)); | 52 | Evas_Coord w = 40 + ((i % 3) * (w0 / 2)); |
54 | h = 40 + ((i % 3) * (h0 / 2)); | 53 | Evas_Coord h = 40 + ((i % 3) * (h0 / 2)); |
55 | x = (win_w / 2) - (w / 2); | 54 | Evas_Coord x = (win_w / 2) - (w / 2); |
56 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); | 55 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); |
57 | y = (win_h / 2) - (h / 2); | 56 | Evas_Coord y = (win_h / 2) - (h / 2); |
58 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); | 57 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); |
59 | eo_do(images[i], | 58 | (*itr).position_set(x, y); |
60 | evas_obj_position_set(x, y), | 59 | (*itr).evas::object::size_set(w, h); |
61 | evas_obj_size_set(w, h), | 60 | (*itr).fill_set(0, 0, w, h); |
62 | evas_obj_image_fill_set(0, 0, w, h)); | ||
63 | } | 61 | } |
64 | FPS_STD(NAME); | 62 | FPS_STD(NAME); |
65 | } | 63 | } |
66 | 64 | ||
67 | /* cleanup */ | ||
68 | static void _cleanup(void) | ||
69 | { | ||
70 | images.clear(); | ||
71 | } | ||
72 | |||
73 | /* prepend special key handlers if interactive (before STD) */ | 65 | /* prepend special key handlers if interactive (before STD) */ |
74 | static void _key(char *key) | 66 | static void _key(char *key) |
75 | { | 67 | { |
diff --git a/src/bin/cxx/image_blend_nearest_scaled.cc b/src/bin/cxx/image_blend_nearest_scaled.cc index 1d9b520..9bee4e2 100644 --- a/src/bin/cxx/image_blend_nearest_scaled.cc +++ b/src/bin/cxx/image_blend_nearest_scaled.cc | |||
@@ -23,16 +23,14 @@ static efl::eina::list<evas::image> images; | |||
23 | /* setup */ | 23 | /* setup */ |
24 | static void _setup(void) | 24 | static void _setup(void) |
25 | { | 25 | { |
26 | int i; | ||
27 | evas::canvas canvas(::eo_ref(G_evas)); | 26 | evas::canvas canvas(::eo_ref(G_evas)); |
28 | for (i = 0; i < OBNUM; i++) | 27 | for (int i = 0; i < OBNUM; i++) |
29 | { | 28 | { |
30 | evas::image o(efl::eo::parent = canvas); | 29 | evas::image o(efl::eo::parent = canvas); |
31 | images.push_back(o); | 30 | images.push_back(o); |
32 | eo_do(o, | 31 | o.file_set(build_path("logo.png"), ""); |
33 | efl_file_set(build_path("logo.png"), NULL), | 32 | o.smooth_scale_set(0); |
34 | efl_image_smooth_scale_set(0), | 33 | o.visibility_set(true); |
35 | evas_obj_visibility_set(EINA_TRUE)); | ||
36 | } | 34 | } |
37 | done = 0; | 35 | done = 0; |
38 | } | 36 | } |
@@ -46,22 +44,20 @@ static void _cleanup() | |||
46 | /* loop - do things */ | 44 | /* loop - do things */ |
47 | static void _loop(double t, int f) | 45 | static void _loop(double t, int f) |
48 | { | 46 | { |
49 | int i; | 47 | auto itr = images.begin(); |
50 | Evas_Coord x, y, w, h, w0, h0; | 48 | for (int i = 0; i < OBNUM; i++, ++itr) |
51 | for (i = 0; i < OBNUM; i++) | ||
52 | { | 49 | { |
53 | w0 = 80; | 50 | Evas_Coord w0 = 80; |
54 | h0 = 80; | 51 | Evas_Coord h0 = 80; |
55 | w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); | 52 | Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); |
56 | h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); | 53 | Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); |
57 | x = (win_w / 2) - (w / 2); | 54 | Evas_Coord x = (win_w / 2) - (w / 2); |
55 | Evas_Coord y = (win_h / 2) - (h / 2); | ||
58 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); | 56 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); |
59 | y = (win_h / 2) - (h / 2); | ||
60 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); | 57 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); |
61 | eo_do(images[i], | 58 | (*itr).position_set(x, y); |
62 | evas_obj_position_set(x, y), | 59 | (*itr).evas::object::size_set(w, h); |
63 | evas_obj_size_set(w, h), | 60 | (*itr).fill_set(0, 0, w, h); |
64 | evas_obj_image_fill_set(0, 0, w, h)); | ||
65 | } | 61 | } |
66 | FPS_STD(NAME); | 62 | FPS_STD(NAME); |
67 | } | 63 | } |
diff --git a/src/bin/cxx/image_blend_nearest_solid_same_scaled.cc b/src/bin/cxx/image_blend_nearest_solid_same_scaled.cc index 86724c5..afcd872 100644 --- a/src/bin/cxx/image_blend_nearest_solid_same_scaled.cc +++ b/src/bin/cxx/image_blend_nearest_solid_same_scaled.cc | |||
@@ -23,16 +23,14 @@ static efl::eina::list<evas::image> images; | |||
23 | /* setup */ | 23 | /* setup */ |
24 | static void _setup(void) | 24 | static void _setup(void) |
25 | { | 25 | { |
26 | int i; | ||
27 | evas::canvas canvas(::eo_ref(G_evas)); | 26 | evas::canvas canvas(::eo_ref(G_evas)); |
28 | for (i = 0; i < OBNUM; i++) | 27 | for (int i = 0; i < OBNUM; i++) |
29 | { | 28 | { |
30 | evas::image o(efl::eo::parent = canvas); | 29 | evas::image o(efl::eo::parent = canvas); |
31 | images.push_back(o); | 30 | images.push_back(o); |
32 | eo_do(o, | 31 | o.file_set(build_path("image.png"), ""); |
33 | efl_file_set(build_path("image.png"), NULL), | 32 | o.smooth_scale_set(0); |
34 | efl_image_smooth_scale_set(0), | 33 | o.visibility_set(EINA_TRUE); |
35 | evas_obj_visibility_set(EINA_TRUE)); | ||
36 | } | 34 | } |
37 | done = 0; | 35 | done = 0; |
38 | } | 36 | } |
@@ -46,22 +44,20 @@ static void _cleanup() | |||
46 | /* loop - do things */ | 44 | /* loop - do things */ |
47 | static void _loop(double t, int f) | 45 | static void _loop(double t, int f) |
48 | { | 46 | { |
49 | int i; | 47 | auto itr = images.begin(); |
50 | Evas_Coord x, y, w, h, w0, h0; | 48 | for (int i = 0; i < OBNUM; i++, ++itr) |
51 | for (i = 0; i < OBNUM; i++) | ||
52 | { | 49 | { |
53 | w0 = 80; | 50 | Evas_Coord w0 = 80; |
54 | h0 = 80; | 51 | Evas_Coord h0 = 80; |
55 | w = 40 + ((i % 3) * (w0 / 2)); | 52 | Evas_Coord w = 40 + ((i % 3) * (w0 / 2)); |
56 | h = 40 + ((i % 3) * (h0 / 2)); | 53 | Evas_Coord h = 40 + ((i % 3) * (h0 / 2)); |
57 | x = (win_w / 2) - (w / 2); | 54 | Evas_Coord x = (win_w / 2) - (w / 2); |
58 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); | 55 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); |
59 | y = (win_h / 2) - (h / 2); | 56 | Evas_Coord y = (win_h / 2) - (h / 2); |
60 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); | 57 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); |
61 | eo_do(images[i], | 58 | (*itr).position_set(x, y); |
62 | evas_obj_position_set(x, y), | 59 | (*itr).evas::object::size_set(w, h); |
63 | evas_obj_size_set(w, h), | 60 | (*itr).fill_set(0, 0, w, h); |
64 | evas_obj_image_fill_set(0, 0, w, h)); | ||
65 | } | 61 | } |
66 | FPS_STD(NAME); | 62 | FPS_STD(NAME); |
67 | } | 63 | } |
diff --git a/src/bin/cxx/image_blend_nearest_solid_scaled.cc b/src/bin/cxx/image_blend_nearest_solid_scaled.cc index 1f09c4c..edb49e2 100644 --- a/src/bin/cxx/image_blend_nearest_solid_scaled.cc +++ b/src/bin/cxx/image_blend_nearest_solid_scaled.cc | |||
@@ -44,22 +44,20 @@ static void _cleanup() | |||
44 | /* loop - do things */ | 44 | /* loop - do things */ |
45 | static void _loop(double t, int f) | 45 | static void _loop(double t, int f) |
46 | { | 46 | { |
47 | int i; | 47 | auto itr = images.begin(); |
48 | Evas_Coord x, y, w, h, w0, h0; | 48 | for (int i = 0; i < OBNUM; i++, ++itr) |
49 | for (i = 0; i < OBNUM; i++) | ||
50 | { | 49 | { |
51 | w0 = 80; | 50 | Evas_Coord w0 = 80; |
52 | h0 = 80; | 51 | Evas_Coord h0 = 80; |
53 | w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); | 52 | Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); |
54 | h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); | 53 | Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); |
55 | x = (win_w / 2) - (w / 2); | 54 | Evas_Coord x = (win_w / 2) - (w / 2); |
56 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); | 55 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); |
57 | y = (win_h / 2) - (h / 2); | 56 | Evas_Coord y = (win_h / 2) - (h / 2); |
58 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); | 57 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); |
59 | eo_do(images[i], | 58 | (*itr).position_set(x, y); |
60 | evas_obj_position_set(x, y), | 59 | (*itr).evas::object::size_set(w, h); |
61 | evas_obj_size_set(w, h), | 60 | (*itr).fill_set(0, 0, w, h); |
62 | evas_obj_image_fill_set(0, 0, w, h)); | ||
63 | } | 61 | } |
64 | FPS_STD(NAME); | 62 | FPS_STD(NAME); |
65 | } | 63 | } |
diff --git a/src/bin/cxx/image_blend_occlude1.cc b/src/bin/cxx/image_blend_occlude1.cc index ecd2d65..c2034b8 100644 --- a/src/bin/cxx/image_blend_occlude1.cc +++ b/src/bin/cxx/image_blend_occlude1.cc | |||
@@ -23,16 +23,15 @@ static efl::eina::list<evas::image> images; | |||
23 | /* setup */ | 23 | /* setup */ |
24 | static void _setup(void) | 24 | static void _setup(void) |
25 | { | 25 | { |
26 | int i; | ||
27 | evas::canvas canvas(::eo_ref(G_evas)); | 26 | evas::canvas canvas(::eo_ref(G_evas)); |
28 | srnd(); | 27 | srnd(); |
29 | for (i = 0; i < OBNUM; i++) | 28 | for (int i = 0; i < OBNUM; i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
33 | if (i < (OBNUM / 2)) | 32 | if (i < (OBNUM / 2)) |
34 | { | 33 | { |
35 | eo_do(o, efl_file_set(build_path("logo.png"), NULL)); | 34 | o.file_set(build_path("logo.png"), ""); |
36 | } | 35 | } |
37 | else | 36 | else |
38 | { | 37 | { |
@@ -40,14 +39,12 @@ static void _setup(void) | |||
40 | 39 | ||
41 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 40 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
42 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 41 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); |
43 | eo_do(o, | 42 | o.file_set(build_path("image.png"), ""); |
44 | efl_file_set(build_path("image.png"), NULL), | 43 | o.position_set(x, y); |
45 | evas_obj_position_set(x, y)); | ||
46 | } | 44 | } |
47 | eo_do(o, | 45 | o.fill_set(0, 0, 120, 160); |
48 | evas_obj_image_fill_set(0, 0, 120, 160), | 46 | o.evas::object::size_set(120, 160); |
49 | evas_obj_size_set(120, 160), | 47 | o.visibility_set(true); |
50 | evas_obj_visibility_set(EINA_TRUE)); | ||
51 | } | 48 | } |
52 | done = 0; | 49 | done = 0; |
53 | } | 50 | } |
@@ -61,19 +58,18 @@ static void _cleanup() | |||
61 | /* loop - do things */ | 58 | /* loop - do things */ |
62 | static void _loop(double t, int f) | 59 | static void _loop(double t, int f) |
63 | { | 60 | { |
64 | int i; | 61 | auto itr = images.begin(); |
65 | Evas_Coord x, y, w, h; | 62 | for (int i = 0; i < OBNUM; i++, ++itr) |
66 | for (i = 0; i < OBNUM; i++) | ||
67 | { | 63 | { |
68 | if (i < (OBNUM / 2)) | 64 | if (i < (OBNUM / 2)) |
69 | { | 65 | { |
70 | w = 120; | 66 | Evas_Coord w = 120; |
71 | h = 160; | 67 | Evas_Coord h = 160; |
72 | x = (win_w / 2) - (w / 2); | 68 | Evas_Coord x = (win_w / 2) - (w / 2); |
73 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 69 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
74 | y = (win_h / 2) - (h / 2); | 70 | Evas_Coord y = (win_h / 2) - (h / 2); |
75 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 71 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
76 | eo_do(images[i], evas_obj_position_set(x, y)); | 72 | (*itr).position_set(x, y); |
77 | } | 73 | } |
78 | } | 74 | } |
79 | FPS_STD(NAME); | 75 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_occlude1_few.cc b/src/bin/cxx/image_blend_occlude1_few.cc index 9c04d0d..9c44975 100644 --- a/src/bin/cxx/image_blend_occlude1_few.cc +++ b/src/bin/cxx/image_blend_occlude1_few.cc | |||
@@ -26,16 +26,15 @@ static efl::eina::list<evas::image> images; | |||
26 | /* setup */ | 26 | /* setup */ |
27 | static void _setup(void) | 27 | static void _setup(void) |
28 | { | 28 | { |
29 | int i; | ||
30 | evas::canvas canvas(::eo_ref(G_evas)); | 29 | evas::canvas canvas(::eo_ref(G_evas)); |
31 | srnd(); | 30 | srnd(); |
32 | for (i = 0; i < OBNUM; i++) | 31 | for (int i = 0; i < OBNUM; i++) |
33 | { | 32 | { |
34 | evas::image o(efl::eo::parent = canvas); | 33 | evas::image o(efl::eo::parent = canvas); |
35 | images.push_back(o); | 34 | images.push_back(o); |
36 | if (i < (OBNUM / 2)) | 35 | if (i < (OBNUM / 2)) |
37 | { | 36 | { |
38 | eo_do(o, efl_file_set(PACKAGE_DATA_DIR"/data/logo.png", NULL)); | 37 | o.file_set(PACKAGE_DATA_DIR"/data/logo.png", ""); |
39 | } | 38 | } |
40 | else | 39 | else |
41 | { | 40 | { |
@@ -43,14 +42,12 @@ static void _setup(void) | |||
43 | 42 | ||
44 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 43 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
45 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 44 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); |
46 | eo_do(o, | 45 | o.file_set(PACKAGE_DATA_DIR"/data/image.png", ""); |
47 | efl_file_set(PACKAGE_DATA_DIR"/data/image.png", NULL), | 46 | o.evas::object::position_set(x, y); |
48 | evas_obj_position_set(x, y)); | ||
49 | } | 47 | } |
50 | eo_do(o, | 48 | o.fill_set(0, 0, 120, 160); |
51 | evas_obj_image_fill_set(0, 0, 120, 160), | 49 | o.size_set(120, 160); |
52 | evas_obj_size_set(120, 160), | 50 | o.visibility_set(true); |
53 | evas_obj_visibility_set(EINA_TRUE)); | ||
54 | } | 51 | } |
55 | done = 0; | 52 | done = 0; |
56 | } | 53 | } |
@@ -64,19 +61,18 @@ static void _cleanup() | |||
64 | /* loop - do things */ | 61 | /* loop - do things */ |
65 | static void _loop(double t, int f) | 62 | static void _loop(double t, int f) |
66 | { | 63 | { |
67 | int i; | 64 | auto itr = images.begin(); |
68 | Evas_Coord x, y, w, h; | 65 | for (int i = 0; i < OBNUM; i++, ++itr) |
69 | for (i = 0; i < OBNUM; i++) | ||
70 | { | 66 | { |
71 | if (i < (OBNUM / 2)) | 67 | if (i < (OBNUM / 2)) |
72 | { | 68 | { |
73 | w = 120; | 69 | Evas_Coord w = 120; |
74 | h = 160; | 70 | Evas_Coord h = 160; |
75 | x = (win_w / 2) - (w / 2); | 71 | Evas_Coord x = (win_w / 2) - (w / 2); |
72 | Evas_Coord y = (win_h / 2) - (h / 2); | ||
76 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 73 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
77 | y = (win_h / 2) - (h / 2); | ||
78 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 74 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
79 | eo_do(images[i], evas_obj_position_set(x, y)); | 75 | (*itr).position_set(x, y); |
80 | } | 76 | } |
81 | } | 77 | } |
82 | FPS_STD(NAME); | 78 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_occlude1_many.cc b/src/bin/cxx/image_blend_occlude1_many.cc index b77fdc5..1c9f102 100644 --- a/src/bin/cxx/image_blend_occlude1_many.cc +++ b/src/bin/cxx/image_blend_occlude1_many.cc | |||
@@ -26,31 +26,27 @@ static efl::eina::list<evas::image> images; | |||
26 | /* setup */ | 26 | /* setup */ |
27 | static void _setup(void) | 27 | static void _setup(void) |
28 | { | 28 | { |
29 | int i; | ||
30 | evas::canvas canvas(::eo_ref(G_evas)); | 29 | evas::canvas canvas(::eo_ref(G_evas)); |
31 | srnd(); | 30 | srnd(); |
32 | for (i = 0; i < OBNUM; i++) | 31 | for (int i = 0; i < OBNUM; i++) |
33 | { | 32 | { |
34 | evas::image o(efl::eo::parent = canvas); | 33 | evas::image o(efl::eo::parent = canvas); |
35 | images.push_back(o); | 34 | images.push_back(o); |
36 | if (i < (OBNUM / 2)) | 35 | if (i < (OBNUM / 2)) |
37 | { | 36 | { |
38 | eo_do(o, efl_file_set(build_path("logo.png"), NULL)); | 37 | o.file_set(build_path("logo.png"), ""); |
39 | } | 38 | } |
40 | else | 39 | else |
41 | { | 40 | { |
42 | Evas_Coord x, y; | 41 | Evas_Coord x, y; |
43 | |||
44 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 42 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
45 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 43 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); |
46 | eo_do(o, | 44 | o.file_set(build_path("image.png"), NULL); |
47 | efl_file_set(build_path("image.png"), NULL), | 45 | o.position_set(x, y); |
48 | evas_obj_position_set(x, y)); | ||
49 | } | 46 | } |
50 | eo_do(o, | 47 | o.fill_set(0, 0, 120, 160); |
51 | evas_obj_image_fill_set(0, 0, 120, 160), | 48 | o.evas::object::size_set(120, 160); |
52 | evas_obj_size_set(120, 160), | 49 | o.visibility_set(true); |
53 | evas_obj_visibility_set(EINA_TRUE)); | ||
54 | } | 50 | } |
55 | done = 0; | 51 | done = 0; |
56 | } | 52 | } |
@@ -64,19 +60,18 @@ static void _cleanup() | |||
64 | /* loop - do things */ | 60 | /* loop - do things */ |
65 | static void _loop(double t, int f) | 61 | static void _loop(double t, int f) |
66 | { | 62 | { |
67 | int i; | 63 | auto itr = images.begin(); |
68 | Evas_Coord x, y, w, h; | 64 | for (int i = 0; i < OBNUM; i++, itr++) |
69 | for (i = 0; i < OBNUM; i++) | ||
70 | { | 65 | { |
71 | if (i < (OBNUM / 2)) | 66 | if (i < (OBNUM / 2)) |
72 | { | 67 | { |
73 | w = 120; | 68 | Evas_Coord w = 120; |
74 | h = 160; | 69 | Evas_Coord h = 160; |
75 | x = (win_w / 2) - (w / 2); | 70 | Evas_Coord x = (win_w / 2) - (w / 2); |
71 | Evas_Coord y = (win_h / 2) - (h / 2); | ||
76 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 72 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
77 | y = (win_h / 2) - (h / 2); | ||
78 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 73 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
79 | eo_do(images[i], evas_obj_position_set(x, y)); | 74 | (*itr).position_set(x, y); |
80 | } | 75 | } |
81 | } | 76 | } |
82 | FPS_STD(NAME); | 77 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_occlude1_very_many.cc b/src/bin/cxx/image_blend_occlude1_very_many.cc index c3143d0..c8c5cbb 100644 --- a/src/bin/cxx/image_blend_occlude1_very_many.cc +++ b/src/bin/cxx/image_blend_occlude1_very_many.cc | |||
@@ -28,31 +28,26 @@ static efl::eina::list<evas::image> images; | |||
28 | /* setup */ | 28 | /* setup */ |
29 | static void _setup(void) | 29 | static void _setup(void) |
30 | { | 30 | { |
31 | int i; | ||
32 | evas::canvas canvas(::eo_ref(G_evas)); | 31 | evas::canvas canvas(::eo_ref(G_evas)); |
33 | srnd(); | 32 | srnd(); |
34 | for (i = 0; i < OBNUM; i++) | 33 | for (int i = 0; i < OBNUM; i++) |
35 | { | 34 | { |
36 | evas::image o(efl::eo::parent = canvas); | 35 | evas::image o(efl::eo::parent = canvas); |
37 | images.push_back(o); | 36 | images.push_back(o); |
38 | if (i < (OBNUM / 2)) | 37 | if (i < (OBNUM / 2)) |
39 | { | 38 | { |
40 | eo_do(o, efl_file_set(build_path("logo.png"), NULL)); | 39 | o.file_set(build_path("logo.png"), ""); |
41 | } | 40 | } |
42 | else | 41 | else |
43 | { | 42 | { |
44 | Evas_Coord x, y; | 43 | Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
45 | 44 | Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | |
46 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 45 | o.file_set(build_path("image.png"), ""); |
47 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 46 | o.position_set(x, y); |
48 | eo_do(o, | ||
49 | efl_file_set(build_path("image.png"), NULL), | ||
50 | evas_obj_position_set(x, y)); | ||
51 | } | 47 | } |
52 | eo_do(o, | 48 | o.fill_set(0, 0, 120, 160); |
53 | evas_obj_image_fill_set(0, 0, 120, 160), | 49 | o.evas::object::size_set(120, 160); |
54 | evas_obj_size_set(120, 160), | 50 | o.visibility_set(true); |
55 | evas_obj_visibility_set(EINA_TRUE)); | ||
56 | } | 51 | } |
57 | done = 0; | 52 | done = 0; |
58 | } | 53 | } |
@@ -66,19 +61,18 @@ static void _cleanup() | |||
66 | /* loop - do things */ | 61 | /* loop - do things */ |
67 | static void _loop(double t, int f) | 62 | static void _loop(double t, int f) |
68 | { | 63 | { |
69 | int i; | 64 | auto itr = images.begin(); |
70 | Evas_Coord x, y, w, h; | 65 | for (int i = 0; i < OBNUM; i++, ++itr) |
71 | for (i = 0; i < OBNUM; i++) | ||
72 | { | 66 | { |
73 | if (i < (OBNUM / 2)) | 67 | if (i < (OBNUM / 2)) |
74 | { | 68 | { |
75 | w = 120; | 69 | Evas_Coord w = 120; |
76 | h = 160; | 70 | Evas_Coord h = 160; |
77 | x = (win_w / 2) - (w / 2); | 71 | Evas_Coord x = (win_w / 2) - (w / 2); |
78 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 72 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
79 | y = (win_h / 2) - (h / 2); | 73 | Evas_Coord y = (win_h / 2) - (h / 2); |
80 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 74 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
81 | eo_do(images[i], evas_obj_position_set(x, y)); | 75 | (*itr).position_set(x, y); |
82 | } | 76 | } |
83 | } | 77 | } |
84 | FPS_STD(NAME); | 78 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_occlude2.cc b/src/bin/cxx/image_blend_occlude2.cc index eed4495..d5305ca 100644 --- a/src/bin/cxx/image_blend_occlude2.cc +++ b/src/bin/cxx/image_blend_occlude2.cc | |||
@@ -25,16 +25,15 @@ static efl::eina::list<evas::image> images; | |||
25 | /* setup */ | 25 | /* setup */ |
26 | static void _setup(void) | 26 | static void _setup(void) |
27 | { | 27 | { |
28 | int i; | ||
29 | evas::canvas canvas(::eo_ref(G_evas)); | 28 | evas::canvas canvas(::eo_ref(G_evas)); |
30 | srnd(); | 29 | srnd(); |
31 | for (i = 0; i < OBNUM; i++) | 30 | for (int i = 0; i < OBNUM; i++) |
32 | { | 31 | { |
33 | evas::image o(efl::eo::parent = canvas); | 32 | evas::image o(efl::eo::parent = canvas); |
34 | images.push_back(o); | 33 | images.push_back(o); |
35 | if (i & 0x1) | 34 | if (i & 0x1) |
36 | { | 35 | { |
37 | eo_do(o, efl_file_set(build_path("logo.png"), NULL)); | 36 | o.file_set(build_path("logo.png"), ""); |
38 | } | 37 | } |
39 | else | 38 | else |
40 | { | 39 | { |
@@ -42,14 +41,12 @@ static void _setup(void) | |||
42 | 41 | ||
43 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 42 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
44 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 43 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); |
45 | eo_do(o, | 44 | efl_file_set(build_path("image.png"), ""); |
46 | efl_file_set(build_path("image.png"), NULL), | 45 | evas_obj_position_set(x, y); |
47 | evas_obj_position_set(x, y)); | ||
48 | } | 46 | } |
49 | eo_do(o, | 47 | o.fill_set(0, 0, 120, 160); |
50 | evas_obj_image_fill_set(0, 0, 120, 160), | 48 | o.evas::object::size_set(120, 160); |
51 | evas_obj_size_set(120, 160), | 49 | o.visibility_set(true); |
52 | evas_obj_visibility_set(EINA_TRUE)); | ||
53 | } | 50 | } |
54 | done = 0; | 51 | done = 0; |
55 | } | 52 | } |
@@ -63,19 +60,18 @@ static void _cleanup() | |||
63 | /* loop - do things */ | 60 | /* loop - do things */ |
64 | static void _loop(double t, int f) | 61 | static void _loop(double t, int f) |
65 | { | 62 | { |
66 | int i; | 63 | auto itr = images.begin(); |
67 | Evas_Coord x, y, w, h; | 64 | for (int i = 0; i < OBNUM; i++, ++itr) |
68 | for (i = 0; i < OBNUM; i++) | ||
69 | { | 65 | { |
70 | if (i & 0x1) | 66 | if (i & 0x1) |
71 | { | 67 | { |
72 | w = 120; | 68 | Evas_Coord w = 120; |
73 | h = 160; | 69 | Evas_Coord h = 160; |
74 | x = (win_w / 2) - (w / 2); | 70 | Evas_Coord x = (win_w / 2) - (w / 2); |
75 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 71 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
76 | y = (win_h / 2) - (h / 2); | 72 | Evas_Coord y = (win_h / 2) - (h / 2); |
77 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 73 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
78 | eo_do(images[i], evas_obj_position_set(x, y)); | 74 | (*itr).position_set(x, y); |
79 | } | 75 | } |
80 | } | 76 | } |
81 | FPS_STD(NAME); | 77 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_occlude2_few.cc b/src/bin/cxx/image_blend_occlude2_few.cc index cc533a2..85716ae 100644 --- a/src/bin/cxx/image_blend_occlude2_few.cc +++ b/src/bin/cxx/image_blend_occlude2_few.cc | |||
@@ -28,31 +28,26 @@ static efl::eina::list<evas::image> images; | |||
28 | /* setup */ | 28 | /* setup */ |
29 | static void _setup(void) | 29 | static void _setup(void) |
30 | { | 30 | { |
31 | int i; | ||
32 | evas::canvas canvas(::eo_ref(G_evas)); | 31 | evas::canvas canvas(::eo_ref(G_evas)); |
33 | srnd(); | 32 | srnd(); |
34 | for (i = 0; i < OBNUM; i++) | 33 | for (int i = 0; i < OBNUM; i++) |
35 | { | 34 | { |
36 | evas::image o(efl::eo::parent = canvas); | 35 | evas::image o(efl::eo::parent = canvas); |
37 | images.push_back(o); | 36 | images.push_back(o); |
38 | if (i & 0x1) | 37 | if (i & 0x1) |
39 | { | 38 | { |
40 | eo_do(o, efl_file_set(build_path("logo.png"), NULL)); | 39 | o.file_set(build_path("logo.png"), ""); |
41 | } | 40 | } |
42 | else | 41 | else |
43 | { | 42 | { |
44 | Evas_Coord x, y; | 43 | Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
45 | 44 | Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | |
46 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 45 | o.file_set(build_path("image.png"), ""); |
47 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 46 | o.position_set(x, y); |
48 | eo_do(o, | ||
49 | efl_file_set(build_path("image.png"), NULL), | ||
50 | evas_obj_position_set(x, y)); | ||
51 | } | 47 | } |
52 | eo_do(o, | 48 | o.fill_set(0, 0, 120, 160); |
53 | evas_obj_image_fill_set(0, 0, 120, 160), | 49 | o.size_set(120, 160); |
54 | evas_obj_size_set(120, 160), | 50 | o.visibility_set(true); |
55 | evas_obj_visibility_set(EINA_TRUE)); | ||
56 | } | 51 | } |
57 | done = 0; | 52 | done = 0; |
58 | } | 53 | } |
@@ -66,19 +61,18 @@ static void _cleanup() | |||
66 | /* loop - do things */ | 61 | /* loop - do things */ |
67 | static void _loop(double t, int f) | 62 | static void _loop(double t, int f) |
68 | { | 63 | { |
69 | int i; | 64 | auto itr = images.begin(); |
70 | Evas_Coord x, y, w, h; | 65 | for (int i = 0; i < OBNUM; i++, ++itr) |
71 | for (i = 0; i < OBNUM; i++) | ||
72 | { | 66 | { |
73 | if (i & 0x1) | 67 | if (i & 0x1) |
74 | { | 68 | { |
75 | w = 120; | 69 | Evas_Coord w = 120; |
76 | h = 160; | 70 | Evas_Coord h = 160; |
77 | x = (win_w / 2) - (w / 2); | 71 | Evas_Coord x = (win_w / 2) - (w / 2); |
78 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 72 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
79 | y = (win_h / 2) - (h / 2); | 73 | Evas_Coord y = (win_h / 2) - (h / 2); |
80 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 74 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
81 | eo_do(images[i], evas_obj_position_set(x, y)); | 75 | (*itr).position_set(x, y); |
82 | } | 76 | } |
83 | } | 77 | } |
84 | FPS_STD(NAME); | 78 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_occlude2_many.cc b/src/bin/cxx/image_blend_occlude2_many.cc index cced7f9..f28554f 100644 --- a/src/bin/cxx/image_blend_occlude2_many.cc +++ b/src/bin/cxx/image_blend_occlude2_many.cc | |||
@@ -28,16 +28,15 @@ static efl::eina::list<evas::image> images; | |||
28 | /* setup */ | 28 | /* setup */ |
29 | static void _setup(void) | 29 | static void _setup(void) |
30 | { | 30 | { |
31 | int i; | ||
32 | evas::canvas canvas(::eo_ref(G_evas)); | 31 | evas::canvas canvas(::eo_ref(G_evas)); |
33 | srnd(); | 32 | srnd(); |
34 | for (i = 0; i < OBNUM; i++) | 33 | for (int i = 0; i < OBNUM; i++) |
35 | { | 34 | { |
36 | evas::image o(efl::eo::parent = canvas); | 35 | evas::image o(efl::eo::parent = canvas); |
37 | images.push_back(o); | 36 | images.push_back(o); |
38 | if (i & 0x1) | 37 | if (i & 0x1) |
39 | { | 38 | { |
40 | eo_do(o, efl_file_set(build_path("logo.png"), NULL)); | 39 | o.file_set(build_path("logo.png"), ""); |
41 | } | 40 | } |
42 | else | 41 | else |
43 | { | 42 | { |
@@ -45,14 +44,12 @@ static void _setup(void) | |||
45 | 44 | ||
46 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 45 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
47 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 46 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); |
48 | eo_do(o, | 47 | o.file_set(build_path("image.png"), ""); |
49 | efl_file_set(build_path("image.png"), NULL), | 48 | o.position_set(x, y); |
50 | evas_obj_position_set(x, y)); | ||
51 | } | 49 | } |
52 | eo_do(o, | 50 | o.fill_set(0, 0, 120, 160); |
53 | evas_obj_image_fill_set(0, 0, 120, 160), | 51 | o.evas::object::size_set(120, 160); |
54 | evas_obj_size_set(120, 160), | 52 | o.visibility_set(true); |
55 | evas_obj_visibility_set(EINA_TRUE)); | ||
56 | } | 53 | } |
57 | done = 0; | 54 | done = 0; |
58 | } | 55 | } |
@@ -66,19 +63,18 @@ static void _cleanup() | |||
66 | /* loop - do things */ | 63 | /* loop - do things */ |
67 | static void _loop(double t, int f) | 64 | static void _loop(double t, int f) |
68 | { | 65 | { |
69 | int i; | 66 | auto itr = images.begin(); |
70 | Evas_Coord x, y, w, h; | 67 | for (int i = 0; i < OBNUM; i++, ++itr) |
71 | for (i = 0; i < OBNUM; i++) | ||
72 | { | 68 | { |
73 | if (i & 0x1) | 69 | if (i & 0x1) |
74 | { | 70 | { |
75 | w = 120; | 71 | Evas_Coord w = 120; |
76 | h = 160; | 72 | Evas_Coord h = 160; |
77 | x = (win_w / 2) - (w / 2); | 73 | Evas_Coord x = (win_w / 2) - (w / 2); |
78 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 74 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
79 | y = (win_h / 2) - (h / 2); | 75 | Evas_Coord y = (win_h / 2) - (h / 2); |
80 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 76 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
81 | eo_do(images[i], evas_obj_position_set(x, y)); | 77 | (*itr).position_set(x, y); |
82 | } | 78 | } |
83 | } | 79 | } |
84 | FPS_STD(NAME); | 80 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_occlude2_very_many.cc b/src/bin/cxx/image_blend_occlude2_very_many.cc index a82143f..0a63bcf 100644 --- a/src/bin/cxx/image_blend_occlude2_very_many.cc +++ b/src/bin/cxx/image_blend_occlude2_very_many.cc | |||
@@ -28,31 +28,26 @@ static efl::eina::list<evas::image> images; | |||
28 | /* setup */ | 28 | /* setup */ |
29 | static void _setup(void) | 29 | static void _setup(void) |
30 | { | 30 | { |
31 | int i; | ||
32 | evas::canvas canvas(::eo_ref(G_evas)); | 31 | evas::canvas canvas(::eo_ref(G_evas)); |
33 | srnd(); | 32 | srnd(); |
34 | for (i = 0; i < OBNUM; i++) | 33 | for (int i = 0; i < OBNUM; i++) |
35 | { | 34 | { |
36 | evas::image o(efl::eo::parent = canvas); | 35 | evas::image o(efl::eo::parent = canvas); |
37 | images.push_back(o); | 36 | images.push_back(o); |
38 | if (i & 0x1) | 37 | if (i & 0x1) |
39 | { | 38 | { |
40 | eo_do(o, efl_file_set(build_path("logo.png"), NULL)); | 39 | o.file_set(build_path("logo.png"), ""); |
41 | } | 40 | } |
42 | else | 41 | else |
43 | { | 42 | { |
44 | Evas_Coord x, y; | 43 | Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
45 | 44 | Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | |
46 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 45 | o.file_set(build_path("image.png"), ""); |
47 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 46 | o.position_set(x, y); |
48 | eo_do(o, | ||
49 | efl_file_set(build_path("image.png"), NULL), | ||
50 | evas_obj_position_set(x, y)); | ||
51 | } | 47 | } |
52 | eo_do(o, | 48 | o.fill_set(0, 0, 120, 160); |
53 | evas_obj_image_fill_set(0, 0, 120, 160), | 49 | o.evas::object::size_set(120, 160); |
54 | evas_obj_size_set(120, 160), | 50 | o.visibility_set(true); |
55 | evas_obj_visibility_set(EINA_TRUE)); | ||
56 | } | 51 | } |
57 | done = 0; | 52 | done = 0; |
58 | } | 53 | } |
@@ -66,19 +61,18 @@ static void _cleanup() | |||
66 | /* loop - do things */ | 61 | /* loop - do things */ |
67 | static void _loop(double t, int f) | 62 | static void _loop(double t, int f) |
68 | { | 63 | { |
69 | int i; | 64 | auto itr = images.begin(); |
70 | Evas_Coord x, y, w, h; | 65 | for (int i = 0; i < OBNUM; i++, ++itr) |
71 | for (i = 0; i < OBNUM; i++) | ||
72 | { | 66 | { |
73 | if (i & 0x1) | 67 | if (i & 0x1) |
74 | { | 68 | { |
75 | w = 120; | 69 | Evas_Coord w = 120; |
76 | h = 160; | 70 | Evas_Coord h = 160; |
77 | x = (win_w / 2) - (w / 2); | 71 | Evas_Coord x = (win_w / 2) - (w / 2); |
78 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 72 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
79 | y = (win_h / 2) - (h / 2); | 73 | Evas_Coord y = (win_h / 2) - (h / 2); |
80 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 74 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
81 | eo_do(images[i], evas_obj_position_set(x, y)); | 75 | (*itr).position_set(x, y); |
82 | } | 76 | } |
83 | } | 77 | } |
84 | FPS_STD(NAME); | 78 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_occlude3.cc b/src/bin/cxx/image_blend_occlude3.cc index 7f16300..ef488b4 100644 --- a/src/bin/cxx/image_blend_occlude3.cc +++ b/src/bin/cxx/image_blend_occlude3.cc | |||
@@ -25,16 +25,15 @@ static efl::eina::list<evas::image> images; | |||
25 | /* setup */ | 25 | /* setup */ |
26 | static void _setup(void) | 26 | static void _setup(void) |
27 | { | 27 | { |
28 | int i; | ||
29 | evas::canvas canvas(::eo_ref(G_evas)); | 28 | evas::canvas canvas(::eo_ref(G_evas)); |
30 | srnd(); | 29 | srnd(); |
31 | for (i = 0; i < OBNUM; i++) | 30 | for (int i = 0; i < OBNUM; i++) |
32 | { | 31 | { |
33 | evas::image o(efl::eo::parent = canvas); | 32 | evas::image o(efl::eo::parent = canvas); |
34 | images.push_back(o); | 33 | images.push_back(o); |
35 | if (i > (OBNUM / 2)) | 34 | if (i > (OBNUM / 2)) |
36 | { | 35 | { |
37 | eo_do(o, efl_file_set(build_path("logo.png"), NULL)); | 36 | o.file_set(build_path("logo.png"), ""); |
38 | } | 37 | } |
39 | else | 38 | else |
40 | { | 39 | { |
@@ -42,14 +41,12 @@ static void _setup(void) | |||
42 | 41 | ||
43 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 42 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
44 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 43 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); |
45 | eo_do(o, | 44 | o.file_set(build_path("image.png"), ""); |
46 | efl_file_set(build_path("image.png"), NULL), | 45 | o.position_set(x, y); |
47 | evas_obj_position_set(x, y)); | ||
48 | } | 46 | } |
49 | eo_do(o, | 47 | o.fill_set(0, 0, 120, 160); |
50 | evas_obj_image_fill_set(0, 0, 120, 160), | 48 | o.evas::object::size_set(120, 160); |
51 | evas_obj_size_set(120, 160), | 49 | o.visibility_set(true); |
52 | evas_obj_visibility_set(EINA_TRUE)); | ||
53 | } | 50 | } |
54 | done = 0; | 51 | done = 0; |
55 | } | 52 | } |
@@ -63,19 +60,18 @@ static void _cleanup() | |||
63 | /* loop - do things */ | 60 | /* loop - do things */ |
64 | static void _loop(double t, int f) | 61 | static void _loop(double t, int f) |
65 | { | 62 | { |
66 | int i; | 63 | auto itr = images.begin(); |
67 | Evas_Coord x, y, w, h; | 64 | for (int i = 0; i < OBNUM; i++, ++itr) |
68 | for (i = 0; i < OBNUM; i++) | ||
69 | { | 65 | { |
70 | if (i > (OBNUM / 2)) | 66 | if (i > (OBNUM / 2)) |
71 | { | 67 | { |
72 | w = 120; | 68 | Evas_Coord w = 120; |
73 | h = 160; | 69 | Evas_Coord h = 160; |
74 | x = (win_w / 2) - (w / 2); | 70 | Evas_Coord x = (win_w / 2) - (w / 2); |
75 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 71 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
76 | y = (win_h / 2) - (h / 2); | 72 | Evas_Coord y = (win_h / 2) - (h / 2); |
77 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 73 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
78 | eo_do(images[i], evas_obj_position_set(x, y)); | 74 | (*itr).position_set(x, y); |
79 | } | 75 | } |
80 | } | 76 | } |
81 | FPS_STD(NAME); | 77 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_occlude3_few.cc b/src/bin/cxx/image_blend_occlude3_few.cc index 3cb8bdc..040861d 100644 --- a/src/bin/cxx/image_blend_occlude3_few.cc +++ b/src/bin/cxx/image_blend_occlude3_few.cc | |||
@@ -28,16 +28,15 @@ static efl::eina::list<evas::image> images; | |||
28 | /* setup */ | 28 | /* setup */ |
29 | static void _setup(void) | 29 | static void _setup(void) |
30 | { | 30 | { |
31 | int i; | ||
32 | evas::canvas canvas(::eo_ref(G_evas)); | 31 | evas::canvas canvas(::eo_ref(G_evas)); |
33 | srnd(); | 32 | srnd(); |
34 | for (i = 0; i < OBNUM; i++) | 33 | for (int i = 0; i < OBNUM; i++) |
35 | { | 34 | { |
36 | evas::image o(efl::eo::parent = canvas); | 35 | evas::image o(efl::eo::parent = canvas); |
37 | images.push_back(o); | 36 | images.push_back(o); |
38 | if (i > (OBNUM / 2)) | 37 | if (i > (OBNUM / 2)) |
39 | { | 38 | { |
40 | eo_do(o, efl_file_set(build_path("logo.png"), NULL)); | 39 | o.file_set(build_path("logo.png"), ""); |
41 | } | 40 | } |
42 | else | 41 | else |
43 | { | 42 | { |
@@ -45,14 +44,12 @@ static void _setup(void) | |||
45 | 44 | ||
46 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 45 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
47 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 46 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); |
48 | eo_do(o, | 47 | o.file_set(build_path("image.png"), ""); |
49 | efl_file_set(build_path("image.png"), NULL), | 48 | o.position_set(x, y); |
50 | evas_obj_position_set(x, y)); | ||
51 | } | 49 | } |
52 | eo_do(o, | 50 | o.fill_set(0, 0, 120, 160); |
53 | evas_obj_image_fill_set(0, 0, 120, 160), | 51 | o.evas::object::size_set(120, 160); |
54 | evas_obj_size_set(120, 160), | 52 | o.visibility_set(true); |
55 | evas_obj_visibility_set(EINA_TRUE)); | ||
56 | } | 53 | } |
57 | done = 0; | 54 | done = 0; |
58 | } | 55 | } |
@@ -66,19 +63,18 @@ static void _cleanup() | |||
66 | /* loop - do things */ | 63 | /* loop - do things */ |
67 | static void _loop(double t, int f) | 64 | static void _loop(double t, int f) |
68 | { | 65 | { |
69 | int i; | 66 | auto itr = images.begin(); |
70 | Evas_Coord x, y, w, h; | 67 | for (int i = 0; i < OBNUM; i++) |
71 | for (i = 0; i < OBNUM; i++) | ||
72 | { | 68 | { |
73 | if (i > (OBNUM / 2)) | 69 | if (i > (OBNUM / 2)) |
74 | { | 70 | { |
75 | w = 120; | 71 | Evas_Coord w = 120; |
76 | h = 160; | 72 | Evas_Coord h = 160; |
77 | x = (win_w / 2) - (w / 2); | 73 | Evas_Coord x = (win_w / 2) - (w / 2); |
78 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 74 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
79 | y = (win_h / 2) - (h / 2); | 75 | Evas_Coord y = (win_h / 2) - (h / 2); |
80 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 76 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
81 | eo_do(images[i], evas_obj_position_set(x, y)); | 77 | (*itr).position_set(x, y); |
82 | } | 78 | } |
83 | } | 79 | } |
84 | FPS_STD(NAME); | 80 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_occlude3_many.cc b/src/bin/cxx/image_blend_occlude3_many.cc index 576a5d6..7b02f7a 100644 --- a/src/bin/cxx/image_blend_occlude3_many.cc +++ b/src/bin/cxx/image_blend_occlude3_many.cc | |||
@@ -26,31 +26,26 @@ static efl::eina::list<evas::image> images; | |||
26 | /* setup */ | 26 | /* setup */ |
27 | static void _setup(void) | 27 | static void _setup(void) |
28 | { | 28 | { |
29 | int i; | ||
30 | evas::canvas canvas(::eo_ref(G_evas)); | 29 | evas::canvas canvas(::eo_ref(G_evas)); |
31 | srnd(); | 30 | srnd(); |
32 | for (i = 0; i < OBNUM; i++) | 31 | for (int i = 0; i < OBNUM; i++) |
33 | { | 32 | { |
34 | evas::image o(efl::eo::parent = canvas); | 33 | evas::image o(efl::eo::parent = canvas); |
35 | images.push_back(o); | 34 | images.push_back(o); |
36 | if (i > (OBNUM / 2)) | 35 | if (i > (OBNUM / 2)) |
37 | { | 36 | { |
38 | eo_do(o, efl_file_set(build_path("logo.png"), NULL)); | 37 | o.file_set(build_path("logo.png"), ""); |
39 | } | 38 | } |
40 | else | 39 | else |
41 | { | 40 | { |
42 | Evas_Coord x, y; | 41 | Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
43 | 42 | Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | |
44 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 43 | o.file_set(build_path("image.png"), ""); |
45 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 44 | o.position_set(x, y); |
46 | eo_do(o, | ||
47 | efl_file_set(build_path("image.png"), NULL), | ||
48 | evas_obj_position_set(x, y)); | ||
49 | } | 45 | } |
50 | eo_do(o, | 46 | o.fill_set(0, 0, 120, 160); |
51 | evas_obj_image_fill_set(0, 0, 120, 160), | 47 | o.size_set(120, 160); |
52 | evas_obj_size_set(120, 160), | 48 | o.visibility_set(true); |
53 | evas_obj_visibility_set(EINA_TRUE)); | ||
54 | } | 49 | } |
55 | done = 0; | 50 | done = 0; |
56 | } | 51 | } |
@@ -64,19 +59,18 @@ static void _cleanup() | |||
64 | /* loop - do things */ | 59 | /* loop - do things */ |
65 | static void _loop(double t, int f) | 60 | static void _loop(double t, int f) |
66 | { | 61 | { |
67 | int i; | 62 | auto itr = images.begin(); |
68 | Evas_Coord x, y, w, h; | 63 | for (int i = 0; i < OBNUM; i++, ++itr) |
69 | for (i = 0; i < OBNUM; i++) | ||
70 | { | 64 | { |
71 | if (i > (OBNUM / 2)) | 65 | if (i > (OBNUM / 2)) |
72 | { | 66 | { |
73 | w = 120; | 67 | Evas_Coord w = 120; |
74 | h = 160; | 68 | Evas_Coord h = 160; |
75 | x = (win_w / 2) - (w / 2); | 69 | Evas_Coord x = (win_w / 2) - (w / 2); |
76 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 70 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
77 | y = (win_h / 2) - (h / 2); | 71 | Evas_Coord y = (win_h / 2) - (h / 2); |
78 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 72 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
79 | eo_do(images[i], evas_obj_position_set(x, y)); | 73 | (*itr).position_set(x, y); |
80 | } | 74 | } |
81 | } | 75 | } |
82 | FPS_STD(NAME); | 76 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_occlude3_very_many.cc b/src/bin/cxx/image_blend_occlude3_very_many.cc index cbaa909..6b9eb6e 100644 --- a/src/bin/cxx/image_blend_occlude3_very_many.cc +++ b/src/bin/cxx/image_blend_occlude3_very_many.cc | |||
@@ -27,31 +27,26 @@ static efl::eina::list<evas::image> images; | |||
27 | /* setup */ | 27 | /* setup */ |
28 | static void _setup(void) | 28 | static void _setup(void) |
29 | { | 29 | { |
30 | int i; | ||
31 | evas::canvas canvas(::eo_ref(G_evas)); | 30 | evas::canvas canvas(::eo_ref(G_evas)); |
32 | srnd(); | 31 | srnd(); |
33 | for (i = 0; i < OBNUM; i++) | 32 | for (int i = 0; i < OBNUM; i++) |
34 | { | 33 | { |
35 | evas::image o(efl::eo::parent = canvas); | 34 | evas::image o(efl::eo::parent = canvas); |
36 | images.push_back(o); | 35 | images.push_back(o); |
37 | if (i > (OBNUM / 2)) | 36 | if (i > (OBNUM / 2)) |
38 | { | 37 | { |
39 | eo_do(o, efl_file_set(build_path("logo.png"), NULL)); | 38 | o.file_set(build_path("logo.png"), ""); |
40 | } | 39 | } |
41 | else | 40 | else |
42 | { | 41 | { |
43 | Evas_Coord x, y; | 42 | Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); |
44 | 43 | Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | |
45 | x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); | 44 | o.file_set(build_path("image.png"), ""); |
46 | y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); | 45 | o.position_set(x, y); |
47 | eo_do(o, | ||
48 | efl_file_set(build_path("image.png"), NULL), | ||
49 | evas_obj_position_set(x, y)); | ||
50 | } | 46 | } |
51 | eo_do(o, | 47 | o.fill_set(0, 0, 120, 160); |
52 | evas_obj_image_fill_set(0, 0, 120, 160), | 48 | o.size_set(120, 160); |
53 | evas_obj_size_set(120, 160), | 49 | o.visibility_set(true); |
54 | evas_obj_visibility_set(EINA_TRUE)); | ||
55 | } | 50 | } |
56 | done = 0; | 51 | done = 0; |
57 | } | 52 | } |
@@ -65,19 +60,18 @@ static void _cleanup() | |||
65 | /* loop - do things */ | 60 | /* loop - do things */ |
66 | static void _loop(double t, int f) | 61 | static void _loop(double t, int f) |
67 | { | 62 | { |
68 | int i; | 63 | auto itr = images.begin(); |
69 | Evas_Coord x, y, w, h; | 64 | for (int i = 0; i < OBNUM; i++, ++itr) |
70 | for (i = 0; i < OBNUM; i++) | ||
71 | { | 65 | { |
72 | if (i > (OBNUM / 2)) | 66 | if (i > (OBNUM / 2)) |
73 | { | 67 | { |
74 | w = 120; | 68 | Evas_Coord w = 120; |
75 | h = 160; | 69 | Evas_Coord h = 160; |
76 | x = (win_w / 2) - (w / 2); | 70 | Evas_Coord x = (win_w / 2) - (w / 2); |
77 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 71 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
78 | y = (win_h / 2) - (h / 2); | 72 | Evas_Coord y = (win_h / 2) - (h / 2); |
79 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 73 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
80 | eo_do(images[i], evas_obj_position_set(x, y)); | 74 | (*itr).position_set(x, y); |
81 | } | 75 | } |
82 | } | 76 | } |
83 | FPS_STD(NAME); | 77 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_blend_smooth_same_scaled.cc b/src/bin/cxx/image_blend_smooth_same_scaled.cc index b490734..1957cf2 100644 --- a/src/bin/cxx/image_blend_smooth_same_scaled.cc +++ b/src/bin/cxx/image_blend_smooth_same_scaled.cc | |||
@@ -24,16 +24,14 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < OBNUM; i++) | 28 | for (int i = 0; i < OBNUM; i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
33 | eo_do(o, | 32 | o.file_set(build_path("logo.png"), ""); |
34 | efl_file_set(build_path("logo.png"), NULL), | 33 | o.smooth_scale_set(1); |
35 | efl_image_smooth_scale_set(1), | 34 | o.visibility_set(true); |
36 | evas_obj_visibility_set(EINA_TRUE)); | ||
37 | } | 35 | } |
38 | done = 0; | 36 | done = 0; |
39 | } | 37 | } |
@@ -47,22 +45,20 @@ static void _cleanup() | |||
47 | /* loop - do things */ | 45 | /* loop - do things */ |
48 | static void _loop(double t, int f) | 46 | static void _loop(double t, int f) |
49 | { | 47 | { |
50 | int i; | 48 | auto itr = images.begin(); |
51 | Evas_Coord x, y, w, h, w0, h0; | 49 | for (int i = 0; i < OBNUM; i++, ++itr) |
52 | for (i = 0; i < OBNUM; i++) | ||
53 | { | 50 | { |
54 | w0 = 80; | 51 | Evas_Coord w0 = 80; |
55 | h0 = 80; | 52 | Evas_Coord h0 = 80; |
56 | w = 40 + ((i % 3) * (w0 / 2)); | 53 | Evas_Coord w = 40 + ((i % 3) * (w0 / 2)); |
57 | h = 40 + ((i % 3) * (h0 / 2)); | 54 | Evas_Coord h = 40 + ((i % 3) * (h0 / 2)); |
58 | x = (win_w / 2) - (w / 2); | 55 | Evas_Coord x = (win_w / 2) - (w / 2); |
59 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); | 56 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); |
60 | y = (win_h / 2) - (h / 2); | 57 | Evas_Coord y = (win_h / 2) - (h / 2); |
61 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); | 58 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); |
62 | eo_do(images[i], | 59 | (*itr).position_set(x, y); |
63 | evas_obj_position_set(x, y), | 60 | (*itr).evas::object::size_set(w, h); |
64 | evas_obj_size_set(w, h), | 61 | (*itr).fill_set(0, 0, w, h); |
65 | evas_obj_image_fill_set(0, 0, w, h)); | ||
66 | } | 62 | } |
67 | FPS_STD(NAME); | 63 | FPS_STD(NAME); |
68 | } | 64 | } |
diff --git a/src/bin/cxx/image_blend_smooth_scaled.cc b/src/bin/cxx/image_blend_smooth_scaled.cc index 0115896..744e668 100644 --- a/src/bin/cxx/image_blend_smooth_scaled.cc +++ b/src/bin/cxx/image_blend_smooth_scaled.cc | |||
@@ -23,16 +23,14 @@ static efl::eina::list<evas::image> images; | |||
23 | /* setup */ | 23 | /* setup */ |
24 | static void _setup(void) | 24 | static void _setup(void) |
25 | { | 25 | { |
26 | int i; | ||
27 | evas::canvas canvas(::eo_ref(G_evas)); | 26 | evas::canvas canvas(::eo_ref(G_evas)); |
28 | for (i = 0; i < OBNUM; i++) | 27 | for (int i = 0; i < OBNUM; i++) |
29 | { | 28 | { |
30 | evas::image o(efl::eo::parent = canvas); | 29 | evas::image o(efl::eo::parent = canvas); |
31 | images.push_back(o); | 30 | images.push_back(o); |
32 | eo_do(o, | 31 | o.file_set(build_path("logo.png"), ""); |
33 | efl_file_set(build_path("logo.png"), NULL), | 32 | o.smooth_scale_set(1); |
34 | efl_image_smooth_scale_set(1), | 33 | o.visibility_set(true); |
35 | evas_obj_visibility_set(EINA_TRUE)); | ||
36 | } | 34 | } |
37 | done = 0; | 35 | done = 0; |
38 | } | 36 | } |
@@ -46,22 +44,20 @@ static void _cleanup() | |||
46 | /* loop - do things */ | 44 | /* loop - do things */ |
47 | static void _loop(double t, int f) | 45 | static void _loop(double t, int f) |
48 | { | 46 | { |
49 | int i; | 47 | auto itr = images.begin(); |
50 | Evas_Coord x, y, w, h, w0, h0; | 48 | for (int i = 0; i < OBNUM; i++, ++itr) |
51 | for (i = 0; i < OBNUM; i++) | ||
52 | { | 49 | { |
53 | w0 = 80; | 50 | Evas_Coord w0 = 80; |
54 | h0 = 80; | 51 | Evas_Coord h0 = 80; |
55 | w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); | 52 | Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); |
56 | h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); | 53 | Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); |
57 | x = (win_w / 2) - (w / 2); | 54 | Evas_Coord x = (win_w / 2) - (w / 2); |
58 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); | 55 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); |
59 | y = (win_h / 2) - (h / 2); | 56 | Evas_Coord y = (win_h / 2) - (h / 2); |
60 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); | 57 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); |
61 | eo_do(images[i], | 58 | (*itr).position_set(x, y); |
62 | evas_obj_position_set(x, y), | 59 | (*itr).size_set(w, h); |
63 | evas_obj_size_set(w, h), | 60 | (*itr).fill_set(0, 0, w, h); |
64 | evas_obj_image_fill_set(0, 0, w, h)); | ||
65 | } | 61 | } |
66 | FPS_STD(NAME); | 62 | FPS_STD(NAME); |
67 | } | 63 | } |
diff --git a/src/bin/cxx/image_blend_smooth_solid_same_scaled.cc b/src/bin/cxx/image_blend_smooth_solid_same_scaled.cc index 6f3ab6b..c521789 100644 --- a/src/bin/cxx/image_blend_smooth_solid_same_scaled.cc +++ b/src/bin/cxx/image_blend_smooth_solid_same_scaled.cc | |||
@@ -23,16 +23,14 @@ static efl::eina::list<evas::image> images; | |||
23 | /* setup */ | 23 | /* setup */ |
24 | static void _setup(void) | 24 | static void _setup(void) |
25 | { | 25 | { |
26 | int i; | ||
27 | evas::canvas canvas(::eo_ref(G_evas)); | 26 | evas::canvas canvas(::eo_ref(G_evas)); |
28 | for (i = 0; i < OBNUM; i++) | 27 | for (int i = 0; i < OBNUM; i++) |
29 | { | 28 | { |
30 | evas::image o(efl::eo::parent = canvas); | 29 | evas::image o(efl::eo::parent = canvas); |
31 | images.push_back(o); | 30 | images.push_back(o); |
32 | eo_do(o, | 31 | o.file_set(build_path("image.png"), ""); |
33 | efl_file_set(build_path("image.png"), NULL), | 32 | o.smooth_scale_set(1); |
34 | efl_image_smooth_scale_set(1), | 33 | o.visibility_set(true); |
35 | evas_obj_visibility_set(EINA_TRUE)); | ||
36 | } | 34 | } |
37 | done = 0; | 35 | done = 0; |
38 | } | 36 | } |
@@ -46,22 +44,20 @@ static void _cleanup() | |||
46 | /* loop - do things */ | 44 | /* loop - do things */ |
47 | static void _loop(double t, int f) | 45 | static void _loop(double t, int f) |
48 | { | 46 | { |
49 | int i; | 47 | auto itr = images.begin(); |
50 | Evas_Coord x, y, w, h, w0, h0; | 48 | for (int i = 0; i < OBNUM; i++, ++itr) |
51 | for (i = 0; i < OBNUM; i++) | ||
52 | { | 49 | { |
53 | w0 = 80; | 50 | Evas_Coord w0 = 80; |
54 | h0 = 80; | 51 | Evas_Coord h0 = 80; |
55 | w = 40 + ((i % 3) * (w0 / 2)); | 52 | Evas_Coord w = 40 + ((i % 3) * (w0 / 2)); |
56 | h = 40 + ((i % 3) * (h0 / 2)); | 53 | Evas_Coord h = 40 + ((i % 3) * (h0 / 2)); |
57 | x = (win_w / 2) - (w / 2); | 54 | Evas_Coord x = (win_w / 2) - (w / 2); |
58 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); | 55 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); |
59 | y = (win_h / 2) - (h / 2); | 56 | Evas_Coord y = (win_h / 2) - (h / 2); |
60 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); | 57 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); |
61 | eo_do(images[i], | 58 | (*itr).position_set(x, y); |
62 | evas_obj_position_set(x, y), | 59 | (*itr).size_set(w, h); |
63 | evas_obj_size_set(w, h), | 60 | (*itr).fill_set(0, 0, w, h); |
64 | evas_obj_image_fill_set(0, 0, w, h)); | ||
65 | } | 61 | } |
66 | FPS_STD(NAME); | 62 | FPS_STD(NAME); |
67 | } | 63 | } |
diff --git a/src/bin/cxx/image_blend_smooth_solid_scaled.cc b/src/bin/cxx/image_blend_smooth_solid_scaled.cc index 21f0536..5e61a5c 100644 --- a/src/bin/cxx/image_blend_smooth_solid_scaled.cc +++ b/src/bin/cxx/image_blend_smooth_solid_scaled.cc | |||
@@ -23,16 +23,14 @@ static efl::eina::list<evas::image> images; | |||
23 | /* setup */ | 23 | /* setup */ |
24 | static void _setup(void) | 24 | static void _setup(void) |
25 | { | 25 | { |
26 | int i; | ||
27 | evas::canvas canvas(::eo_ref(G_evas)); | 26 | evas::canvas canvas(::eo_ref(G_evas)); |
28 | for (i = 0; i < OBNUM; i++) | 27 | for (int i = 0; i < OBNUM; i++) |
29 | { | 28 | { |
30 | evas::image o(efl::eo::parent = canvas); | 29 | evas::image o(efl::eo::parent = canvas); |
31 | images.push_back(o); | 30 | images.push_back(o); |
32 | eo_do(o, | 31 | efl_file_set(build_path("image.png"), ""); |
33 | efl_file_set(build_path("image.png"), NULL), | 32 | efl_image_smooth_scale_set(1); |
34 | efl_image_smooth_scale_set(1), | 33 | evas_obj_visibility_set(true); |
35 | evas_obj_visibility_set(EINA_TRUE)); | ||
36 | } | 34 | } |
37 | done = 0; | 35 | done = 0; |
38 | } | 36 | } |
@@ -46,22 +44,20 @@ static void _cleanup() | |||
46 | /* loop - do things */ | 44 | /* loop - do things */ |
47 | static void _loop(double t, int f) | 45 | static void _loop(double t, int f) |
48 | { | 46 | { |
49 | int i; | 47 | auto itr = images.begin(); |
50 | Evas_Coord x, y, w, h, w0, h0; | 48 | for (int i = 0; i < OBNUM; i++, ++itr) |
51 | for (i = 0; i < OBNUM; i++) | ||
52 | { | 49 | { |
53 | w0 = 80; | 50 | Evas_Coord w0 = 80; |
54 | h0 = 80; | 51 | Evas_Coord h0 = 80; |
55 | w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); | 52 | Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); |
56 | h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); | 53 | Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); |
57 | x = (win_w / 2) - (w / 2); | 54 | Evas_Coord x = (win_w / 2) - (w / 2); |
58 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); | 55 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); |
59 | y = (win_h / 2) - (h / 2); | 56 | Evas_Coord y = (win_h / 2) - (h / 2); |
60 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); | 57 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); |
61 | eo_do(images[i], | 58 | (*itr).position_set(x, y); |
62 | evas_obj_position_set(x, y), | 59 | (*itr).size_set(w, h); |
63 | evas_obj_size_set(w, h), | 60 | (*itr).fill_set(0, 0, w, h); |
64 | evas_obj_image_fill_set(0, 0, w, h)); | ||
65 | } | 61 | } |
66 | FPS_STD(NAME); | 62 | FPS_STD(NAME); |
67 | } | 63 | } |
diff --git a/src/bin/cxx/image_blend_solid_middle_border.cc b/src/bin/cxx/image_blend_solid_middle_border.cc index 643d35d..df53c36 100644 --- a/src/bin/cxx/image_blend_solid_middle_border.cc +++ b/src/bin/cxx/image_blend_solid_middle_border.cc | |||
@@ -23,17 +23,15 @@ static efl::eina::list<evas::image> images; | |||
23 | /* setup */ | 23 | /* setup */ |
24 | static void _setup(void) | 24 | static void _setup(void) |
25 | { | 25 | { |
26 | int i; | ||
27 | evas::canvas canvas(::eo_ref(G_evas)); | 26 | evas::canvas canvas(::eo_ref(G_evas)); |
28 | for (i = 0; i < OBNUM; i++) | 27 | for (int i = 0; i < OBNUM; i++) |
29 | { | 28 | { |
30 | evas::image o(efl::eo::parent = canvas); | 29 | evas::image o(efl::eo::parent = canvas); |
31 | images.push_back(o); | 30 | images.push_back(o); |
32 | eo_do(o, | 31 | o.file_set(build_path("bar.png"), ""); |
33 | efl_file_set(build_path("bar.png"), NULL), | 32 | o.border_set(6, 6, 6, 6); |
34 | evas_obj_image_border_set(6, 6, 6, 6), | 33 | o.border_center_fill_set(EVAS_BORDER_FILL_SOLID); |
35 | evas_obj_image_border_center_fill_set(EVAS_BORDER_FILL_SOLID), | 34 | o.visibility_set(true); |
36 | evas_obj_visibility_set(EINA_TRUE)); | ||
37 | } | 35 | } |
38 | done = 0; | 36 | done = 0; |
39 | } | 37 | } |
@@ -47,22 +45,20 @@ static void _cleanup() | |||
47 | /* loop - do things */ | 45 | /* loop - do things */ |
48 | static void _loop(double t, int f) | 46 | static void _loop(double t, int f) |
49 | { | 47 | { |
50 | int i; | 48 | auto itr = images.begin(); |
51 | Evas_Coord x, y, w, h, w0, h0; | 49 | for (int i = 0; i < OBNUM; i++, ++itr) |
52 | for (i = 0; i < OBNUM; i++) | ||
53 | { | 50 | { |
54 | w0 = 80; | 51 | Evas_Coord w0 = 80; |
55 | h0 = 80; | 52 | Evas_Coord h0 = 80; |
56 | w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); | 53 | Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); |
57 | h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); | 54 | Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); |
58 | x = (win_w / 2) - (w / 2); | 55 | Evas_Coord x = (win_w / 2) - (w / 2); |
59 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); | 56 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); |
60 | y = (win_h / 2) - (h / 2); | 57 | Evas_Coord y = (win_h / 2) - (h / 2); |
61 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); | 58 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); |
62 | eo_do(images[i], | 59 | (*itr).position_set(x, y); |
63 | evas_obj_position_set(x, y), | 60 | (*itr).evas::object::size_set(w, h); |
64 | evas_obj_size_set(w, h), | 61 | (*itr).fill_set(0, 0, w, h); |
65 | evas_obj_image_fill_set(0, 0, w, h)); | ||
66 | } | 62 | } |
67 | FPS_STD(NAME); | 63 | FPS_STD(NAME); |
68 | } | 64 | } |
diff --git a/src/bin/cxx/image_blend_solid_middle_unscaled.cc b/src/bin/cxx/image_blend_solid_middle_unscaled.cc index d02117b..974bebc 100644 --- a/src/bin/cxx/image_blend_solid_middle_unscaled.cc +++ b/src/bin/cxx/image_blend_solid_middle_unscaled.cc | |||
@@ -23,19 +23,17 @@ static efl::eina::list<evas::image> images; | |||
23 | /* setup */ | 23 | /* setup */ |
24 | static void _setup(void) | 24 | static void _setup(void) |
25 | { | 25 | { |
26 | int i; | ||
27 | evas::canvas canvas(::eo_ref(G_evas)); | 26 | evas::canvas canvas(::eo_ref(G_evas)); |
28 | for (i = 0; i < OBNUM; i++) | 27 | for (int i = 0; i < OBNUM; i++) |
29 | { | 28 | { |
30 | evas::image o(efl::eo::parent = canvas); | 29 | evas::image o(efl::eo::parent = canvas); |
31 | images.push_back(o); | 30 | images.push_back(o); |
32 | eo_do(o, | 31 | o.file_set(build_path("logo.png"), ""); |
33 | efl_file_set(build_path("logo.png"), NULL), | 32 | o.fill_set(0, 0, 120, 160); |
34 | evas_obj_image_fill_set(0, 0, 120, 160), | 33 | o.evas::object::size_set(120, 160); |
35 | evas_obj_size_set(120, 160), | 34 | o.border_set(43, 48, 48, 83); |
36 | evas_obj_image_border_set(43, 48, 48, 83), | 35 | o.border_center_fill_set(EVAS_BORDER_FILL_SOLID); |
37 | evas_obj_image_border_center_fill_set(EVAS_BORDER_FILL_SOLID), | 36 | o.visibility_set(true); |
38 | evas_obj_visibility_set(EINA_TRUE)); | ||
39 | } | 37 | } |
40 | done = 0; | 38 | done = 0; |
41 | } | 39 | } |
@@ -49,17 +47,16 @@ static void _cleanup() | |||
49 | /* loop - do things */ | 47 | /* loop - do things */ |
50 | static void _loop(double t, int f) | 48 | static void _loop(double t, int f) |
51 | { | 49 | { |
52 | int i; | 50 | auto itr = images.begin(); |
53 | Evas_Coord x, y, w, h; | 51 | for (int i = 0; i < OBNUM; i++, ++itr) |
54 | for (i = 0; i < OBNUM; i++) | ||
55 | { | 52 | { |
56 | w = 120; | 53 | Evas_Coord w = 120; |
57 | h = 160; | 54 | Evas_Coord h = 160; |
58 | x = (win_w / 2) - (w / 2); | 55 | Evas_Coord x = (win_w / 2) - (w / 2); |
59 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 56 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
60 | y = (win_h / 2) - (h / 2); | 57 | Evas_Coord y = (win_h / 2) - (h / 2); |
61 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 58 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
62 | eo_do(images[i], evas_obj_position_set(x, y)); | 59 | (*itr).position_set(x, y); |
63 | } | 60 | } |
64 | FPS_STD(NAME); | 61 | FPS_STD(NAME); |
65 | } | 62 | } |
diff --git a/src/bin/cxx/image_blend_unscaled.cc b/src/bin/cxx/image_blend_unscaled.cc index ced7ffd..f5f57b3 100644 --- a/src/bin/cxx/image_blend_unscaled.cc +++ b/src/bin/cxx/image_blend_unscaled.cc | |||
@@ -23,17 +23,15 @@ static efl::eina::list<evas::image> images; | |||
23 | /* setup */ | 23 | /* setup */ |
24 | static void _setup(void) | 24 | static void _setup(void) |
25 | { | 25 | { |
26 | int i; | ||
27 | evas::canvas canvas(::eo_ref(G_evas)); | 26 | evas::canvas canvas(::eo_ref(G_evas)); |
28 | for (i = 0; i < OBNUM; i++) | 27 | for (int i = 0; i < OBNUM; i++) |
29 | { | 28 | { |
30 | evas::image o(efl::eo::parent = canvas); | 29 | evas::image o(efl::eo::parent = canvas); |
31 | images.push_back(o); | 30 | images.push_back(o); |
32 | eo_do(o, | 31 | efl_file_set(build_path("logo.png"), ""); |
33 | efl_file_set(build_path("logo.png"), NULL), | 32 | o.fill_set(0, 0, 120, 160); |
34 | evas_obj_image_fill_set(0, 0, 120, 160), | 33 | o.evas::object::size_set(120, 160); |
35 | evas_obj_size_set(120, 160), | 34 | o.visibility_set(true); |
36 | evas_obj_visibility_set(EINA_TRUE)); | ||
37 | } | 35 | } |
38 | done = 0; | 36 | done = 0; |
39 | } | 37 | } |
@@ -47,17 +45,16 @@ static void _cleanup() | |||
47 | /* loop - do things */ | 45 | /* loop - do things */ |
48 | static void _loop(double t, int f) | 46 | static void _loop(double t, int f) |
49 | { | 47 | { |
50 | int i; | 48 | auto itr = images.begin(); |
51 | Evas_Coord x, y, w, h; | 49 | for (int i = 0; i < OBNUM; i++, ++itr) |
52 | for (i = 0; i < OBNUM; i++) | ||
53 | { | 50 | { |
54 | w = 120; | 51 | Evas_Coord w = 120; |
55 | h = 160; | 52 | Evas_Coord h = 160; |
56 | x = (win_w / 2) - (w / 2); | 53 | Evas_Coord x = (win_w / 2) - (w / 2); |
57 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 54 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
58 | y = (win_h / 2) - (h / 2); | 55 | Evas_Coord y = (win_h / 2) - (h / 2); |
59 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 56 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
60 | eo_do(images[i], evas_obj_position_set(x, y)); | 57 | (*itr).position_set(x, y); |
61 | } | 58 | } |
62 | FPS_STD(NAME); | 59 | FPS_STD(NAME); |
63 | } | 60 | } |
diff --git a/src/bin/cxx/image_crossfade.cc b/src/bin/cxx/image_crossfade.cc index aa51135..2334e32 100644 --- a/src/bin/cxx/image_crossfade.cc +++ b/src/bin/cxx/image_crossfade.cc | |||
@@ -24,23 +24,21 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | Evas_Object *o; | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
28 | 28 | ||
29 | o = eo_add(EVAS_IMAGE_CLASS, G_evas); | 29 | evas::image o1(efl::eo::parent = canvas); |
30 | images[0] = o; | 30 | images.push_back(o1); |
31 | eo_do(o, | 31 | o1.file_set(build_path("im1.png"), ""); |
32 | efl_file_set(build_path("im1.png"), NULL), | 32 | o1.fill_set(0, 0, 720, 420); |
33 | evas_obj_image_fill_set(0, 0, 720, 420), | 33 | o1.evas::object::size_set(720, 420); |
34 | evas_obj_size_set(720, 420), | 34 | o1.visibility_set(true); |
35 | evas_obj_visibility_set(EINA_TRUE)); | 35 | |
36 | 36 | evas::image o2(efl::eo::parent = canvas); | |
37 | o = eo_add(EVAS_IMAGE_CLASS, G_evas); | 37 | images.push_back(o2); |
38 | images[1] = o; | 38 | o2.file_set(build_path("im2.png"), ""); |
39 | eo_do(o, | 39 | o2.fill_set(0, 0, 720, 420); |
40 | efl_file_set(build_path("im2.png"), NULL), | 40 | o2.evas::object::size_set(720, 420); |
41 | evas_obj_image_fill_set(0, 0, 720, 420), | 41 | o2.visibility_set(true); |
42 | evas_obj_size_set(720, 420), | ||
43 | evas_obj_visibility_set(EINA_TRUE)); | ||
44 | 42 | ||
45 | done = 0; | 43 | done = 0; |
46 | } | 44 | } |
@@ -48,18 +46,15 @@ static void _setup(void) | |||
48 | /* cleanup */ | 46 | /* cleanup */ |
49 | static void _cleanup(void) | 47 | static void _cleanup(void) |
50 | { | 48 | { |
51 | int i; | 49 | images.clear(); |
52 | for (i = 0; i < 2; i++) eo_del(images[i]); | ||
53 | } | 50 | } |
54 | 51 | ||
55 | /* loop - do things */ | 52 | /* loop - do things */ |
56 | static void _loop(double t, int f) | 53 | static void _loop(double t, int f) |
57 | { | 54 | { |
58 | int a; | 55 | int a = f & 0x1f; |
59 | |||
60 | a = f & 0x1f; | ||
61 | a = ((a << 3) | (a >> 2)) & 0xff; | 56 | a = ((a << 3) | (a >> 2)) & 0xff; |
62 | eo_do(images[1], evas_obj_color_set(a, a, a, a)); | 57 | images.back().color_set(a, a, a, a); |
63 | FPS_STD(NAME); | 58 | FPS_STD(NAME); |
64 | } | 59 | } |
65 | 60 | ||
diff --git a/src/bin/cxx/image_data_argb.cc b/src/bin/cxx/image_data_argb.cc index 8d3451a..3041200 100644 --- a/src/bin/cxx/image_data_argb.cc +++ b/src/bin/cxx/image_data_argb.cc | |||
@@ -24,20 +24,18 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < 1; i++) | 28 | for (int i = 0; i < 1; i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
33 | eo_do(o, | 32 | o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC); |
34 | evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), | 33 | o.colorspace_set(EVAS_COLORSPACE_ARGB8888); |
35 | evas_obj_image_colorspace_set(EVAS_COLORSPACE_ARGB8888), | 34 | o.size_set(640, 480); |
36 | evas_obj_image_size_set(640, 480), | 35 | o.alpha_set(0); |
37 | evas_obj_image_alpha_set(0), | 36 | o.fill_set(0, 0, 640, 480); |
38 | evas_obj_image_fill_set(0, 0, 640, 480), | 37 | o.evas::object::size_set(640, 480); |
39 | evas_obj_size_set(640, 480), | 38 | o.visibility_set(true); |
40 | evas_obj_visibility_set(EINA_TRUE)); | ||
41 | } | 39 | } |
42 | done = 0; | 40 | done = 0; |
43 | } | 41 | } |
@@ -45,29 +43,26 @@ static void _setup(void) | |||
45 | /* cleanup */ | 43 | /* cleanup */ |
46 | static void _cleanup(void) | 44 | static void _cleanup(void) |
47 | { | 45 | { |
48 | int i; | 46 | images.clear(); |
49 | for (i = 0; i < 1; i++) eo_del(images[i]); | ||
50 | } | 47 | } |
51 | 48 | ||
52 | /* loop - do things */ | 49 | /* loop - do things */ |
53 | static void _loop(double t, int f) | 50 | static void _loop(double t, int f) |
54 | { | 51 | { |
55 | int i, st; | 52 | int st; |
56 | Evas_Coord x, y, w, h; | 53 | auto itr = images.begin(); |
57 | for (i = 0; i < 1; i++) | 54 | for (int i = 0; i < 1; i++, ++itr) |
58 | { | 55 | { |
59 | unsigned int *data, *p; | 56 | unsigned int *data, *p; |
60 | 57 | Evas_Coord w = 640; | |
61 | w = 640; | 58 | Evas_Coord h = 480; |
62 | h = 480; | 59 | Evas_Coord x = (win_w / 2) - (w / 2); |
63 | x = (win_w / 2) - (w / 2); | 60 | Evas_Coord y = (win_h / 2) - (h / 2); |
64 | y = (win_h / 2) - (h / 2); | 61 | (*itr).position_set(x, y); |
65 | eo_do(images[i], | 62 | (*itr).evas::object::size_set(w, h); |
66 | evas_obj_position_set(x, y), | 63 | (*itr).fill_set(0, 0, w, h); |
67 | evas_obj_size_set(w, h), | 64 | data = (*itr).data_get(1); |
68 | evas_obj_image_fill_set(0, 0, w, h), | 65 | st = (*itr).stride_get(); // XXX |
69 | data = evas_obj_image_data_get(1), | ||
70 | st = evas_obj_image_stride_get()); | ||
71 | st = st >> 2; | 66 | st = st >> 2; |
72 | p = data; | 67 | p = data; |
73 | for (y = 0; y < h; y++) | 68 | for (y = 0; y < h; y++) |
@@ -79,9 +74,8 @@ static void _loop(double t, int f) | |||
79 | } | 74 | } |
80 | p += (st - w); | 75 | p += (st - w); |
81 | } | 76 | } |
82 | eo_do(images[i], | 77 | (*itr).data_set(data); |
83 | evas_obj_image_data_set(data), | 78 | (*itr).data_update_add( 0, 0, w, h); |
84 | evas_obj_image_data_update_add( 0, 0, w, h)); | ||
85 | } | 79 | } |
86 | FPS_STD(NAME); | 80 | FPS_STD(NAME); |
87 | } | 81 | } |
diff --git a/src/bin/cxx/image_data_argb_alpha.cc b/src/bin/cxx/image_data_argb_alpha.cc index bb27ac5..1f230d5 100644 --- a/src/bin/cxx/image_data_argb_alpha.cc +++ b/src/bin/cxx/image_data_argb_alpha.cc | |||
@@ -24,20 +24,18 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < 1; i++) | 28 | for (int i = 0; i < 1; i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
33 | eo_do(o, | 32 | o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC); |
34 | evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), | 33 | o.colorspace_set(EVAS_COLORSPACE_ARGB8888); |
35 | evas_obj_image_colorspace_set(EVAS_COLORSPACE_ARGB8888), | 34 | o.size_set(640, 480); |
36 | evas_obj_image_size_set(640, 480), | 35 | o.alpha_set(1); |
37 | evas_obj_image_alpha_set(1), | 36 | o.fill_set(0, 0, 640, 480); |
38 | evas_obj_image_fill_set(0, 0, 640, 480), | 37 | o.evas::object::size_set(640, 480); |
39 | evas_obj_size_set(640, 480), | 38 | o.visibility_set(true); |
40 | evas_obj_visibility_set(EINA_TRUE)); | ||
41 | } | 39 | } |
42 | done = 0; | 40 | done = 0; |
43 | } | 41 | } |
@@ -45,29 +43,27 @@ static void _setup(void) | |||
45 | /* cleanup */ | 43 | /* cleanup */ |
46 | static void _cleanup(void) | 44 | static void _cleanup(void) |
47 | { | 45 | { |
48 | int i; | 46 | images.clear(); |
49 | for (i = 0; i < 1; i++) eo_del(images[i]); | ||
50 | } | 47 | } |
51 | 48 | ||
52 | /* loop - do things */ | 49 | /* loop - do things */ |
53 | static void _loop(double t, int f) | 50 | static void _loop(double t, int f) |
54 | { | 51 | { |
55 | int i, st; | 52 | int st; |
56 | Evas_Coord x, y, w, h; | 53 | auto itr = images.begin(); |
57 | for (i = 0; i < 1; i++) | 54 | for (i = 0; i < 1; i++, ++itr) |
58 | { | 55 | { |
59 | unsigned int *data, *p; | 56 | unsigned int *data, *p; |
60 | int a, r, g, b; | 57 | int a, r, g, b; |
61 | w = 640; | 58 | Evas_Coord w = 640; |
62 | h = 480; | 59 | Evas_Coord h = 480; |
63 | x = (win_w / 2) - (w / 2); | 60 | Evas_Coord x = (win_w / 2) - (w / 2); |
64 | y = (win_h / 2) - (h / 2); | 61 | Evas_Coord y = (win_h / 2) - (h / 2); |
65 | eo_do(images[i], | 62 | (*itr).evas::object::position_set(x, y); |
66 | evas_obj_position_set(x, y), | 63 | (*itr).evas::object::size_set(w, h); |
67 | evas_obj_size_set(w, h), | 64 | (*itr).fill_set(0, 0, w, h); |
68 | evas_obj_image_fill_set(0, 0, w, h), | 65 | data = (*itr).data_get(1); |
69 | data = evas_obj_image_data_get(1), | 66 | st = evas_obj_image_stride_get(); |
70 | st = evas_obj_image_stride_get()); | ||
71 | st = st >> 2; | 67 | st = st >> 2; |
72 | p = data; | 68 | p = data; |
73 | for (y = 0; y < h; y++) | 69 | for (y = 0; y < h; y++) |
@@ -90,9 +86,8 @@ static void _loop(double t, int f) | |||
90 | } | 86 | } |
91 | p += (st - w); | 87 | p += (st - w); |
92 | } | 88 | } |
93 | eo_do(images[i], | 89 | (*itr).data_set(data); |
94 | evas_obj_image_data_set(data), | 90 | (*itr).data_update_add( 0, 0, w, h); |
95 | evas_obj_image_data_update_add( 0, 0, w, h)); | ||
96 | } | 91 | } |
97 | FPS_STD(NAME); | 92 | FPS_STD(NAME); |
98 | } | 93 | } |
diff --git a/src/bin/cxx/image_data_ycbcr601pl.cc b/src/bin/cxx/image_data_ycbcr601pl.cc index 05fe9f5..1c38578 100644 --- a/src/bin/cxx/image_data_ycbcr601pl.cc +++ b/src/bin/cxx/image_data_ycbcr601pl.cc | |||
@@ -25,26 +25,22 @@ static unsigned char *yp = NULL, *up = NULL, *vp = NULL; | |||
25 | /* setup */ | 25 | /* setup */ |
26 | static void _setup(void) | 26 | static void _setup(void) |
27 | { | 27 | { |
28 | int i, y; | ||
29 | FILE *f; | ||
30 | unsigned char **data, **lp; | ||
31 | evas::canvas canvas(::eo_ref(G_evas)); | 28 | evas::canvas canvas(::eo_ref(G_evas)); |
32 | for (i = 0; i < 1; i++) | 29 | for (int i = 0; i < 1; i++) |
33 | { | 30 | { |
34 | evas::image o(efl::eo::parent = canvas); | 31 | evas::image o(efl::eo::parent = canvas); |
35 | images.push_back(o); | 32 | images.push_back(o); |
36 | eo_do(o, | 33 | o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC); |
37 | evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), | 34 | o.colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL); |
38 | evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL), | 35 | o.size_set(640, 480); |
39 | evas_obj_image_size_set(640, 480), | 36 | o.alpha_set(0); |
40 | evas_obj_image_alpha_set(0), | 37 | o.fill_set(0, 0, 640, 480); |
41 | evas_obj_image_fill_set(0, 0, 640, 480), | 38 | o.evas::object::size_set(640, 480); |
42 | evas_obj_size_set(640, 480), | 39 | o.visibility_set(true); |
43 | evas_obj_visibility_set(EINA_TRUE)); | ||
44 | yp = malloc(640 * 480); | 40 | yp = malloc(640 * 480); |
45 | up = malloc(320 * 240); | 41 | up = malloc(320 * 240); |
46 | vp = malloc(320 * 240); | 42 | vp = malloc(320 * 240); |
47 | f = fopen(build_path("tp.yuv"), "rb"); | 43 | FILE *f = fopen(build_path("tp.yuv"), "rb"); |
48 | if (f) | 44 | if (f) |
49 | { | 45 | { |
50 | fread(yp, 640 * 480, 1, f); | 46 | fread(yp, 640 * 480, 1, f); |
@@ -52,24 +48,24 @@ static void _setup(void) | |||
52 | fread(vp, 320 * 240, 1, f); | 48 | fread(vp, 320 * 240, 1, f); |
53 | fclose(f); | 49 | fclose(f); |
54 | } | 50 | } |
55 | data = evas_object_image_data_get(images[i], 1); | 51 | unsigned char **data = evas_object_image_data_get(images[i], 1); |
56 | lp = data; | 52 | unsigned char **lp = data; |
57 | for (y = 0; y < 480; y++) | 53 | for (int y = 0; y < 480; y++) |
58 | { | 54 | { |
59 | *lp = yp + (y * 640); | 55 | *lp = yp + (y * 640); |
60 | lp++; | 56 | lp++; |
61 | } | 57 | } |
62 | for (y = 0; y < 240; y++) | 58 | for (int y = 0; y < 240; y++) |
63 | { | 59 | { |
64 | *lp = up + (y * 320); | 60 | *lp = up + (y * 320); |
65 | lp++; | 61 | lp++; |
66 | } | 62 | } |
67 | for (y = 0; y < 240; y++) | 63 | for (int y = 0; y < 240; y++) |
68 | { | 64 | { |
69 | *lp = vp + (y * 320); | 65 | *lp = vp + (y * 320); |
70 | lp++; | 66 | lp++; |
71 | } | 67 | } |
72 | eo_do(images[i], evas_obj_image_data_set(data)); | 68 | o.data_set(data); |
73 | } | 69 | } |
74 | done = 0; | 70 | done = 0; |
75 | } | 71 | } |
@@ -77,8 +73,7 @@ static void _setup(void) | |||
77 | /* cleanup */ | 73 | /* cleanup */ |
78 | static void _cleanup(void) | 74 | static void _cleanup(void) |
79 | { | 75 | { |
80 | int i; | 76 | images.clear(); |
81 | for (i = 0; i < 1; i++) eo_del(images[i]); | ||
82 | free(yp); | 77 | free(yp); |
83 | free(up); | 78 | free(up); |
84 | free(vp); | 79 | free(vp); |
@@ -87,19 +82,17 @@ static void _cleanup(void) | |||
87 | /* loop - do things */ | 82 | /* loop - do things */ |
88 | static void _loop(double t, int f) | 83 | static void _loop(double t, int f) |
89 | { | 84 | { |
90 | int i; | 85 | auto itr = images.begin(); |
91 | Evas_Coord x, y, w, h; | 86 | for (int i = 0; i < 1; i++, ++itr) |
92 | for (i = 0; i < 1; i++) | ||
93 | { | 87 | { |
94 | w = 640; | 88 | Evas_Coord w = 640; |
95 | h = 480; | 89 | Evas_Coord h = 480; |
96 | x = (win_w / 2) - (w / 2); | 90 | Evas_Coord x = (win_w / 2) - (w / 2); |
97 | y = (win_h / 2) - (h / 2); | 91 | Evas_Coord y = (win_h / 2) - (h / 2); |
98 | eo_do(images[i], | 92 | (*itr).position_set(x, y); |
99 | evas_obj_position_set(x, y), | 93 | (*itr).evas::object::size_set(w, h); |
100 | evas_obj_size_set(w, h), | 94 | (*itr).fill_set(0, 0, w, h); |
101 | evas_obj_image_fill_set(0, 0, w, h), | 95 | (*itr).data_update_add( 0, 0, 640, 480); |
102 | evas_obj_image_data_update_add( 0, 0, 640, 480)); | ||
103 | } | 96 | } |
104 | FPS_STD(NAME); | 97 | FPS_STD(NAME); |
105 | } | 98 | } |
diff --git a/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc b/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc index c466b90..1da65f6 100644 --- a/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc +++ b/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc | |||
@@ -25,27 +25,23 @@ static unsigned char *yp = NULL, *up = NULL, *vp = NULL; | |||
25 | /* setup */ | 25 | /* setup */ |
26 | static void _setup(void) | 26 | static void _setup(void) |
27 | { | 27 | { |
28 | int i, y; | ||
29 | FILE *f; | ||
30 | unsigned char **data, **lp; | ||
31 | evas::canvas canvas(::eo_ref(G_evas)); | 28 | evas::canvas canvas(::eo_ref(G_evas)); |
32 | for (i = 0; i < 1; i++) | 29 | for (int i = 0; i < 1; i++) |
33 | { | 30 | { |
34 | evas::image o(efl::eo::parent = canvas); | 31 | evas::image o(efl::eo::parent = canvas); |
35 | images.push_back(o); | 32 | images.push_back(o); |
36 | eo_do(o, | 33 | o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC); |
37 | evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), | 34 | o.colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL); |
38 | evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL), | 35 | o.size_set(640, 480); |
39 | evas_obj_image_size_set(640, 480), | 36 | o.alpha_set(0); |
40 | evas_obj_image_alpha_set(0), | 37 | o.fill_set(0, 0, 640, 480); |
41 | evas_obj_image_fill_set(0, 0, 640, 480), | 38 | o.evas::object::size_set(640, 480); |
42 | evas_obj_size_set(640, 480), | 39 | o.smooth_scale_set(0); |
43 | efl_image_smooth_scale_set(0), | 40 | o.visibility_set(true); |
44 | evas_obj_visibility_set(EINA_TRUE)); | ||
45 | yp = malloc(640 * 480); | 41 | yp = malloc(640 * 480); |
46 | up = malloc(320 * 240); | 42 | up = malloc(320 * 240); |
47 | vp = malloc(320 * 240); | 43 | vp = malloc(320 * 240); |
48 | f = fopen(build_path("tp.yuv"), "rb"); | 44 | FILE *f = fopen(build_path("tp.yuv"), "rb"); |
49 | if (f) | 45 | if (f) |
50 | { | 46 | { |
51 | fread(yp, 640 * 480, 1, f); | 47 | fread(yp, 640 * 480, 1, f); |
@@ -53,24 +49,24 @@ static void _setup(void) | |||
53 | fread(vp, 320 * 240, 1, f); | 49 | fread(vp, 320 * 240, 1, f); |
54 | fclose(f); | 50 | fclose(f); |
55 | } | 51 | } |
56 | data = evas_object_image_data_get(images[i], 1); | 52 | unsigned char **data = o.data_get(1); // XXX |
57 | lp = data; | 53 | unsigned char **lp = data; |
58 | for (y = 0; y < 480; y++) | 54 | for (int y = 0; y < 480; y++) |
59 | { | 55 | { |
60 | *lp = yp + (y * 640); | 56 | *lp = yp + (y * 640); |
61 | lp++; | 57 | lp++; |
62 | } | 58 | } |
63 | for (y = 0; y < 240; y++) | 59 | for (int y = 0; y < 240; y++) |
64 | { | 60 | { |
65 | *lp = up + (y * 320); | 61 | *lp = up + (y * 320); |
66 | lp++; | 62 | lp++; |
67 | } | 63 | } |
68 | for (y = 0; y < 240; y++) | 64 | for (int y = 0; y < 240; y++) |
69 | { | 65 | { |
70 | *lp = vp + (y * 320); | 66 | *lp = vp + (y * 320); |
71 | lp++; | 67 | lp++; |
72 | } | 68 | } |
73 | eo_do(images[i], evas_obj_image_data_set(data)); | 69 | o.data_set(data); |
74 | } | 70 | } |
75 | done = 0; | 71 | done = 0; |
76 | } | 72 | } |
@@ -78,8 +74,7 @@ static void _setup(void) | |||
78 | /* cleanup */ | 74 | /* cleanup */ |
79 | static void _cleanup(void) | 75 | static void _cleanup(void) |
80 | { | 76 | { |
81 | int i; | 77 | images.clear(); |
82 | for (i = 0; i < 1; i++) eo_del(images[i]); | ||
83 | free(yp); | 78 | free(yp); |
84 | free(up); | 79 | free(up); |
85 | free(vp); | 80 | free(vp); |
@@ -88,25 +83,20 @@ static void _cleanup(void) | |||
88 | /* loop - do things */ | 83 | /* loop - do things */ |
89 | static void _loop(double t, int f) | 84 | static void _loop(double t, int f) |
90 | { | 85 | { |
91 | int i; | ||
92 | static Evas_Map *m = NULL; | 86 | static Evas_Map *m = NULL; |
93 | Evas_Coord x, y, w, h; | ||
94 | if (!m) m = evas_map_new(4); | 87 | if (!m) m = evas_map_new(4); |
95 | evas_map_smooth_set(m, 0); | 88 | evas_map_smooth_set(m, 0); |
96 | for (i = 0; i < 1; i++) | 89 | auto itr = images.begin(); |
90 | for (int i = 0; i < 1; i++, ++itr) | ||
97 | { | 91 | { |
98 | w = 640; | 92 | Evas_Coord w = 640; |
99 | h = 480; | 93 | Evas_Coord h = 480; |
100 | x = (win_w / 2) - (w / 2); | 94 | Evas_Coord x = (win_w / 2) - (w / 2); |
101 | y = (win_h / 2) - (h / 2); | 95 | Evas_Coord y = (win_h / 2) - (h / 2); |
102 | |||
103 | evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); | 96 | evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); |
104 | |||
105 | evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); | 97 | evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); |
106 | 98 | (*itr).map_enable_set(1); | |
107 | eo_do(images[i], | 99 | (*itr).map_set(m); |
108 | evas_obj_map_enable_set(1), | ||
109 | evas_obj_map_set(m)); | ||
110 | } | 100 | } |
111 | FPS_STD(NAME); | 101 | FPS_STD(NAME); |
112 | } | 102 | } |
diff --git a/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc b/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc index 220067e..ecc482b 100644 --- a/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc +++ b/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc | |||
@@ -77,8 +77,7 @@ static void _setup(void) | |||
77 | /* cleanup */ | 77 | /* cleanup */ |
78 | static void _cleanup(void) | 78 | static void _cleanup(void) |
79 | { | 79 | { |
80 | int i; | 80 | for (int i = 0; i < 1; i++) eo_del(images[i]); |
81 | for (i = 0; i < 1; i++) eo_del(images[i]); | ||
82 | free(yp); | 81 | free(yp); |
83 | free(up); | 82 | free(up); |
84 | free(vp); | 83 | free(vp); |
@@ -87,11 +86,10 @@ static void _cleanup(void) | |||
87 | /* loop - do things */ | 86 | /* loop - do things */ |
88 | static void _loop(double t, int f) | 87 | static void _loop(double t, int f) |
89 | { | 88 | { |
90 | int i; | ||
91 | static Evas_Map *m = NULL; | 89 | static Evas_Map *m = NULL; |
92 | Evas_Coord x, y, w, h; | 90 | Evas_Coord x, y, w, h; |
93 | if (!m) m = evas_map_new(4); | 91 | if (!m) m = evas_map_new(4); |
94 | for (i = 0; i < 1; i++) | 92 | for (int i = 0; i < 1; i++) |
95 | { | 93 | { |
96 | w = 640; | 94 | w = 640; |
97 | h = 480; | 95 | h = 480; |
diff --git a/src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc b/src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc index 03b133b..540ee97 100644 --- a/src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc +++ b/src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc | |||
@@ -25,26 +25,23 @@ static unsigned char *yp = NULL, *up = NULL, *vp = NULL; | |||
25 | /* setup */ | 25 | /* setup */ |
26 | static void _setup(void) | 26 | static void _setup(void) |
27 | { | 27 | { |
28 | int i, y; | ||
29 | FILE *f; | ||
30 | unsigned char **data, **lp; | 28 | unsigned char **data, **lp; |
31 | evas::canvas canvas(::eo_ref(G_evas)); | 29 | evas::canvas canvas(::eo_ref(G_evas)); |
32 | for (i = 0; i < 1; i++) | 30 | for (int i = 0; i < 1; i++) |
33 | { | 31 | { |
34 | evas::image o(efl::eo::parent = canvas); | 32 | evas::image o(efl::eo::parent = canvas); |
35 | images.push_back(o); | 33 | images.push_back(o); |
36 | eo_do(o, | 34 | o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC); |
37 | evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), | 35 | o.colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL); |
38 | evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL), | 36 | o.size_set(320, 480); |
39 | evas_obj_image_size_set(320, 480), | 37 | o.alpha_set(0); |
40 | evas_obj_image_alpha_set(0), | 38 | o.fill_set(0, 0, 640, 480); |
41 | evas_obj_image_fill_set(0, 0, 640, 480), | 39 | o.evas::object::size_set(640, 480); |
42 | evas_obj_size_set(640, 480), | 40 | o.evas::object::visibility_set(true); |
43 | evas_obj_visibility_set(EINA_TRUE)); | ||
44 | yp = malloc(640 * 480); | 41 | yp = malloc(640 * 480); |
45 | up = malloc(320 * 240); | 42 | up = malloc(320 * 240); |
46 | vp = malloc(320 * 240); | 43 | vp = malloc(320 * 240); |
47 | f = fopen(build_path("tp.yuv"), "rb"); | 44 | FILE *f = fopen(build_path("tp.yuv"), "rb"); |
48 | if (f) | 45 | if (f) |
49 | { | 46 | { |
50 | fread(yp, 640 * 480, 1, f); | 47 | fread(yp, 640 * 480, 1, f); |
@@ -52,28 +49,27 @@ static void _setup(void) | |||
52 | fread(vp, 320 * 240, 1, f); | 49 | fread(vp, 320 * 240, 1, f); |
53 | fclose(f); | 50 | fclose(f); |
54 | } | 51 | } |
55 | data = evas_object_image_data_get(images[i], 1); | 52 | data = o.data_get(1); |
56 | if (data) | 53 | if (data) |
57 | { | 54 | { |
58 | lp = data; | 55 | lp = data; |
59 | for (y = 0; y < 480; y++) | 56 | for (int y = 0; y < 480; y++) |
60 | { | 57 | { |
61 | *lp = yp + (y * 640); | 58 | *lp = yp + (y * 640); |
62 | lp++; | 59 | lp++; |
63 | } | 60 | } |
64 | for (y = 0; y < 240; y++) | 61 | for (int y = 0; y < 240; y++) |
65 | { | 62 | { |
66 | *lp = up + (y * 320); | 63 | *lp = up + (y * 320); |
67 | lp++; | 64 | lp++; |
68 | } | 65 | } |
69 | for (y = 0; y < 240; y++) | 66 | for (int y = 0; y < 240; y++) |
70 | { | 67 | { |
71 | *lp = vp + (y * 320); | 68 | *lp = vp + (y * 320); |
72 | lp++; | 69 | lp++; |
73 | } | 70 | } |
74 | eo_do(images[i], | 71 | o.data_set(data); |
75 | evas_obj_image_data_set(data), | 72 | o.data_update_add( 0, 0, 320, 480); |
76 | evas_obj_image_data_update_add( 0, 0, 320, 480)); | ||
77 | } | 73 | } |
78 | } | 74 | } |
79 | done = 0; | 75 | done = 0; |
@@ -82,8 +78,7 @@ static void _setup(void) | |||
82 | /* cleanup */ | 78 | /* cleanup */ |
83 | static void _cleanup(void) | 79 | static void _cleanup(void) |
84 | { | 80 | { |
85 | int i; | 81 | images.clear(); |
86 | for (i = 0; i < 1; i++) eo_del(images[i]); | ||
87 | free(yp); | 82 | free(yp); |
88 | free(up); | 83 | free(up); |
89 | free(vp); | 84 | free(vp); |
@@ -92,20 +87,16 @@ static void _cleanup(void) | |||
92 | /* loop - do things */ | 87 | /* loop - do things */ |
93 | static void _loop(double t, int f) | 88 | static void _loop(double t, int f) |
94 | { | 89 | { |
95 | int i; | 90 | auto itr = images.begin(); |
96 | Evas_Coord x, y, w, h; | 91 | for (int i = 0; i < 1; i++, ++itr) |
97 | for (i = 0; i < 1; i++) | ||
98 | { | 92 | { |
99 | unsigned char **data, **lp; | 93 | Evas_Coord w = 640; |
100 | 94 | Evas_Coord h = 480; | |
101 | w = 640; | 95 | Evas_Coord x = (win_w / 2) - (w / 2); |
102 | h = 480; | 96 | Evas_Coord y = (win_h / 2) - (h / 2); |
103 | x = (win_w / 2) - (w / 2); | 97 | (*itr).evas::object::position_set(x, y); |
104 | y = (win_h / 2) - (h / 2); | 98 | (*itr).evas::object::size_set(w, h); |
105 | eo_do(images[i], | 99 | (*itr).fill_set(0, 0, w, h); |
106 | evas_obj_position_set(x, y), | ||
107 | evas_obj_size_set(w, h), | ||
108 | evas_obj_image_fill_set(0, 0, w, h)); | ||
109 | 100 | ||
110 | w = 320 - 16 + f; | 101 | w = 320 - 16 + f; |
111 | if (w < 1) w = 1; | 102 | if (w < 1) w = 1; |
@@ -113,29 +104,28 @@ static void _loop(double t, int f) | |||
113 | 104 | ||
114 | w &= ~0x1; | 105 | w &= ~0x1; |
115 | 106 | ||
116 | eo_do(images[i], evas_obj_image_size_set(w, 480)); | 107 | (*itr).size_set(w, 480); |
117 | data = evas_object_image_data_get(images[i], 1); | 108 | unsigned char **data = (*itr).data_get(1); |
118 | if (data) | 109 | if (data) |
119 | { | 110 | { |
120 | lp = data; | 111 | unsigned char **lp = data; |
121 | for (y = 0; y < 480; y++) | 112 | for (int y = 0; y < 480; y++) |
122 | { | 113 | { |
123 | *lp = yp + (y * 640); | 114 | *lp = yp + (y * 640); |
124 | lp++; | 115 | lp++; |
125 | } | 116 | } |
126 | for (y = 0; y < 240; y++) | 117 | for (int y = 0; y < 240; y++) |
127 | { | 118 | { |
128 | *lp = up + (y * 320); | 119 | *lp = up + (y * 320); |
129 | lp++; | 120 | lp++; |
130 | } | 121 | } |
131 | for (y = 0; y < 240; y++) | 122 | for (int y = 0; y < 240; y++) |
132 | { | 123 | { |
133 | *lp = vp + (y * 320); | 124 | *lp = vp + (y * 320); |
134 | lp++; | 125 | lp++; |
135 | } | 126 | } |
136 | eo_do(images[i], | 127 | o.data_set(data); |
137 | evas_obj_image_data_set(data), | 128 | o.data_update_add(0, 0, w, 480); |
138 | evas_obj_image_data_update_add( 0, 0, w, 480)); | ||
139 | } | 129 | } |
140 | } | 130 | } |
141 | FPS_STD(NAME); | 131 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_map_3d_1.cc b/src/bin/cxx/image_map_3d_1.cc index bfd8004..39e6204 100644 --- a/src/bin/cxx/image_map_3d_1.cc +++ b/src/bin/cxx/image_map_3d_1.cc | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "main.h" | 13 | #include "main.h" |
14 | 14 | ||
15 | #define EXPEDITE_CXX_TEST_IMPL | 15 | #define EXPEDITE_CXX_TEST_IMPL |
16 | #include "image_map_3d_1_capi.h"" | 16 | #include "image_map_3d_1_capi.h" |
17 | 17 | ||
18 | typedef struct _Point | 18 | typedef struct _Point |
19 | { | 19 | { |
@@ -48,13 +48,12 @@ static Cube * | |||
48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) | 48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) |
49 | { | 49 | { |
50 | Cube *c; | 50 | Cube *c; |
51 | int i; | ||
52 | 51 | ||
53 | w -= (w / 2); | 52 | w -= (w / 2); |
54 | h -= (h / 2); | 53 | h -= (h / 2); |
55 | d -= (d / 2); | 54 | d -= (d / 2); |
56 | c = calloc(1, sizeof(Cube)); | 55 | c = static_cast<Cube*>(calloc(1, sizeof(Cube))); |
57 | for (i = 0; i < 6; i++) | 56 | for (int i = 0; i < 6; i++) |
58 | { | 57 | { |
59 | Evas_Object *o; | 58 | Evas_Object *o; |
60 | char buf[256]; | 59 | char buf[256]; |
@@ -175,9 +174,8 @@ _cube_pos(Cube *c, | |||
175 | static void | 174 | static void |
176 | _cube_free(Cube *c) | 175 | _cube_free(Cube *c) |
177 | { | 176 | { |
178 | int i; | ||
179 | 177 | ||
180 | for (i = 0; i < 6; i++) eo_del(c->side[i].o); | 178 | for (int i = 0; i < 6; i++) eo_del(c->side[i].o); |
181 | free(c); | 179 | free(c); |
182 | } | 180 | } |
183 | 181 | ||
diff --git a/src/bin/cxx/image_map_3d_2.cc b/src/bin/cxx/image_map_3d_2.cc index 7c0518c..50b6030 100644 --- a/src/bin/cxx/image_map_3d_2.cc +++ b/src/bin/cxx/image_map_3d_2.cc | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "main.h" | 13 | #include "main.h" |
14 | 14 | ||
15 | #define EXPEDITE_CXX_TEST_IMPL | 15 | #define EXPEDITE_CXX_TEST_IMPL |
16 | #include "image_map_3d_2_capi.h"" | 16 | #include "image_map_3d_2_capi.h" |
17 | 17 | ||
18 | typedef struct _Point | 18 | typedef struct _Point |
19 | { | 19 | { |
@@ -48,13 +48,12 @@ static Cube * | |||
48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) | 48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) |
49 | { | 49 | { |
50 | Cube *c; | 50 | Cube *c; |
51 | int i; | ||
52 | 51 | ||
53 | w -= (w / 2); | 52 | w -= (w / 2); |
54 | h -= (h / 2); | 53 | h -= (h / 2); |
55 | d -= (d / 2); | 54 | d -= (d / 2); |
56 | c = calloc(1, sizeof(Cube)); | 55 | c = static_cast<Cube*>(calloc(1, sizeof(Cube))); |
57 | for (i = 0; i < 6; i++) | 56 | for (int i = 0; i < 6; i++) |
58 | { | 57 | { |
59 | Evas_Object *o; | 58 | Evas_Object *o; |
60 | char buf[256]; | 59 | char buf[256]; |
@@ -173,9 +172,8 @@ _cube_pos(Cube *c, | |||
173 | static void | 172 | static void |
174 | _cube_free(Cube *c) | 173 | _cube_free(Cube *c) |
175 | { | 174 | { |
176 | int i; | ||
177 | 175 | ||
178 | for (i = 0; i < 6; i++) eo_del(c->side[i].o); | 176 | for (int i = 0; i < 6; i++) eo_del(c->side[i].o); |
179 | free(c); | 177 | free(c); |
180 | } | 178 | } |
181 | 179 | ||
diff --git a/src/bin/cxx/image_map_3d_3.cc b/src/bin/cxx/image_map_3d_3.cc index cf593f6..9e1b899 100644 --- a/src/bin/cxx/image_map_3d_3.cc +++ b/src/bin/cxx/image_map_3d_3.cc | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "main.h" | 13 | #include "main.h" |
14 | 14 | ||
15 | #define EXPEDITE_CXX_TEST_IMPL | 15 | #define EXPEDITE_CXX_TEST_IMPL |
16 | #include "image_map_3d_3_capi.h"" | 16 | #include "image_map_3d_3_capi.h" |
17 | 17 | ||
18 | typedef struct _Point | 18 | typedef struct _Point |
19 | { | 19 | { |
@@ -48,13 +48,12 @@ static Cube * | |||
48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) | 48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) |
49 | { | 49 | { |
50 | Cube *c; | 50 | Cube *c; |
51 | int i; | ||
52 | 51 | ||
53 | w -= (w / 2); | 52 | w -= (w / 2); |
54 | h -= (h / 2); | 53 | h -= (h / 2); |
55 | d -= (d / 2); | 54 | d -= (d / 2); |
56 | c = calloc(1, sizeof(Cube)); | 55 | c = calloc(1, sizeof(Cube)); |
57 | for (i = 0; i < 6; i++) | 56 | for (int i = 0; i < 6; i++) |
58 | { | 57 | { |
59 | Evas_Object *o; | 58 | Evas_Object *o; |
60 | char buf[256]; | 59 | char buf[256]; |
@@ -167,9 +166,8 @@ _cube_pos(Cube *c, | |||
167 | static void | 166 | static void |
168 | _cube_free(Cube *c) | 167 | _cube_free(Cube *c) |
169 | { | 168 | { |
170 | int i; | ||
171 | 169 | ||
172 | for (i = 0; i < 6; i++) eo_del(c->side[i].o); | 170 | for (int i = 0; i < 6; i++) eo_del(c->side[i].o); |
173 | free(c); | 171 | free(c); |
174 | } | 172 | } |
175 | 173 | ||
diff --git a/src/bin/cxx/image_map_3d_4.cc b/src/bin/cxx/image_map_3d_4.cc index 37036d1..2786510 100644 --- a/src/bin/cxx/image_map_3d_4.cc +++ b/src/bin/cxx/image_map_3d_4.cc | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "main.h" | 13 | #include "main.h" |
14 | 14 | ||
15 | #define EXPEDITE_CXX_TEST_IMPL | 15 | #define EXPEDITE_CXX_TEST_IMPL |
16 | #include "image_map_3d_4_capi.h"" | 16 | #include "image_map_3d_4_capi.h" |
17 | 17 | ||
18 | typedef struct _Point | 18 | typedef struct _Point |
19 | { | 19 | { |
@@ -48,13 +48,12 @@ static Cube * | |||
48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) | 48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) |
49 | { | 49 | { |
50 | Cube *c; | 50 | Cube *c; |
51 | int i; | ||
52 | 51 | ||
53 | w -= (w / 2); | 52 | w -= (w / 2); |
54 | h -= (h / 2); | 53 | h -= (h / 2); |
55 | d -= (d / 2); | 54 | d -= (d / 2); |
56 | c = calloc(1, sizeof(Cube)); | 55 | c = calloc(1, sizeof(Cube)); |
57 | for (i = 0; i < 6; i++) | 56 | for (int i = 0; i < 6; i++) |
58 | { | 57 | { |
59 | Evas_Object *o; | 58 | Evas_Object *o; |
60 | char buf[256]; | 59 | char buf[256]; |
@@ -165,9 +164,8 @@ _cube_pos(Cube *c, | |||
165 | static void | 164 | static void |
166 | _cube_free(Cube *c) | 165 | _cube_free(Cube *c) |
167 | { | 166 | { |
168 | int i; | ||
169 | 167 | ||
170 | for (i = 0; i < 6; i++) eo_del(c->side[i].o); | 168 | for (int i = 0; i < 6; i++) eo_del(c->side[i].o); |
171 | free(c); | 169 | free(c); |
172 | } | 170 | } |
173 | 171 | ||
diff --git a/src/bin/cxx/image_map_3d_5.cc b/src/bin/cxx/image_map_3d_5.cc index bd6c8b6..bd5752f 100644 --- a/src/bin/cxx/image_map_3d_5.cc +++ b/src/bin/cxx/image_map_3d_5.cc | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "main.h" | 13 | #include "main.h" |
14 | 14 | ||
15 | #define EXPEDITE_CXX_TEST_IMPL | 15 | #define EXPEDITE_CXX_TEST_IMPL |
16 | #include "image_map_3d_5_capi.h"" | 16 | #include "image_map_3d_5_capi.h" |
17 | 17 | ||
18 | typedef struct _Point | 18 | typedef struct _Point |
19 | { | 19 | { |
@@ -48,13 +48,12 @@ static Cube * | |||
48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) | 48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) |
49 | { | 49 | { |
50 | Cube *c; | 50 | Cube *c; |
51 | int i; | ||
52 | 51 | ||
53 | w -= (w / 2); | 52 | w -= (w / 2); |
54 | h -= (h / 2); | 53 | h -= (h / 2); |
55 | d -= (d / 2); | 54 | d -= (d / 2); |
56 | c = calloc(1, sizeof(Cube)); | 55 | c = calloc(1, sizeof(Cube)); |
57 | for (i = 0; i < 6; i++) | 56 | for (int i = 0; i < 6; i++) |
58 | { | 57 | { |
59 | Evas_Object *o; | 58 | Evas_Object *o; |
60 | char buf[256]; | 59 | char buf[256]; |
@@ -175,9 +174,8 @@ _cube_pos(Cube *c, | |||
175 | static void | 174 | static void |
176 | _cube_free(Cube *c) | 175 | _cube_free(Cube *c) |
177 | { | 176 | { |
178 | int i; | ||
179 | 177 | ||
180 | for (i = 0; i < 6; i++) eo_del(c->side[i].o); | 178 | for (int i = 0; i < 6; i++) eo_del(c->side[i].o); |
181 | free(c); | 179 | free(c); |
182 | } | 180 | } |
183 | 181 | ||
diff --git a/src/bin/cxx/image_map_3d_6.cc b/src/bin/cxx/image_map_3d_6.cc index 71de8f2..e399993 100644 --- a/src/bin/cxx/image_map_3d_6.cc +++ b/src/bin/cxx/image_map_3d_6.cc | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "main.h" | 13 | #include "main.h" |
14 | 14 | ||
15 | #define EXPEDITE_CXX_TEST_IMPL | 15 | #define EXPEDITE_CXX_TEST_IMPL |
16 | #include "image_map_3d_6_capi.h"" | 16 | #include "image_map_3d_6_capi.h" |
17 | 17 | ||
18 | typedef struct _Point | 18 | typedef struct _Point |
19 | { | 19 | { |
@@ -48,13 +48,12 @@ static Cube * | |||
48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) | 48 | _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) |
49 | { | 49 | { |
50 | Cube *c; | 50 | Cube *c; |
51 | int i; | ||
52 | 51 | ||
53 | w -= (w / 2); | 52 | w -= (w / 2); |
54 | h -= (h / 2); | 53 | h -= (h / 2); |
55 | d -= (d / 2); | 54 | d -= (d / 2); |
56 | c = calloc(1, sizeof(Cube)); | 55 | c = calloc(1, sizeof(Cube)); |
57 | for (i = 0; i < 6; i++) | 56 | for (int i = 0; i < 6; i++) |
58 | { | 57 | { |
59 | Evas_Object *o; | 58 | Evas_Object *o; |
60 | char buf[256]; | 59 | char buf[256]; |
@@ -172,9 +171,8 @@ _cube_pos(Cube *c, | |||
172 | static void | 171 | static void |
173 | _cube_free(Cube *c) | 172 | _cube_free(Cube *c) |
174 | { | 173 | { |
175 | int i; | ||
176 | 174 | ||
177 | for (i = 0; i < 6; i++) eo_del(c->side[i].o); | 175 | for (int i = 0; i < 6; i++) eo_del(c->side[i].o); |
178 | free(c); | 176 | free(c); |
179 | } | 177 | } |
180 | 178 | ||
diff --git a/src/bin/cxx/image_map_3d_flow.cc b/src/bin/cxx/image_map_3d_flow.cc index 6b8bb8b..10b49ab 100644 --- a/src/bin/cxx/image_map_3d_flow.cc +++ b/src/bin/cxx/image_map_3d_flow.cc | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "main.h" | 13 | #include "main.h" |
14 | 14 | ||
15 | #define EXPEDITE_CXX_TEST_IMPL | 15 | #define EXPEDITE_CXX_TEST_IMPL |
16 | #include "image_map_3d_flow_capi.h"" | 16 | #include "image_map_3d_flow_capi.h" |
17 | 17 | ||
18 | /* standard var */ | 18 | /* standard var */ |
19 | static int done = 0; | 19 | static int done = 0; |
@@ -22,36 +22,33 @@ static int done = 0; | |||
22 | 22 | ||
23 | /* private data */ | 23 | /* private data */ |
24 | static efl::eina::list<evas::image> images; | 24 | static efl::eina::list<evas::image> images; |
25 | static Evas_Object *o_reflec[CNUM]; | 25 | static efl::eina::list<evas::image> reflec; |
26 | 26 | ||
27 | /* setup */ | 27 | /* setup */ |
28 | static void _setup(void) | 28 | static void _setup(void) |
29 | { | 29 | { |
30 | int i; | ||
31 | evas::canvas canvas(::eo_ref(G_evas)); | 30 | evas::canvas canvas(::eo_ref(G_evas)); |
32 | for (i = 0; i < CNUM; i++) | 31 | for (int i = 0; i < CNUM; i++) |
33 | { | 32 | { |
34 | char buf[256]; | 33 | char buf[256]; |
35 | 34 | ||
36 | evas::image o(efl::eo::parent = canvas); | 35 | evas::image o1(efl::eo::parent = canvas); |
37 | images.push_back(o); | 36 | images.push_back(o1); |
37 | snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1); // XXX | ||
38 | o1.file_set(build_path(buf), ""); | ||
39 | o1.fill_set(0, 0, 256, 256); | ||
40 | o1.evas::object::size_set(256, 256); | ||
41 | o1.smooth_scale_set(0); | ||
42 | o1.visibility_set(true); | ||
43 | |||
44 | evas::image o2(efl::eo::parent = canvas); | ||
45 | reflec.push_back(o1); | ||
38 | snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1); | 46 | snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1); |
39 | eo_do(o, | 47 | o2.file_set(build_path(buf), ""); |
40 | efl_file_set(build_path(buf), NULL), | 48 | o2.fill_set(0, 0, 256, 256); |
41 | evas_obj_image_fill_set(0, 0, 256, 256), | 49 | o2.size_set(256, 256); |
42 | evas_obj_size_set(256, 256), | 50 | o2.smooth_scale_set(0); |
43 | efl_image_smooth_scale_set(0), | 51 | o2.visibility_set(true); |
44 | evas_obj_visibility_set(EINA_TRUE)); | ||
45 | |||
46 | o = eo_add(EVAS_IMAGE_CLASS, G_evas); | ||
47 | o_reflec[i] = o; | ||
48 | snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1); | ||
49 | eo_do(o, | ||
50 | efl_file_set(build_path(buf), NULL), | ||
51 | evas_obj_image_fill_set(0, 0, 256, 256), | ||
52 | evas_obj_size_set(256, 256), | ||
53 | efl_image_smooth_scale_set(0), | ||
54 | evas_obj_visibility_set(EINA_TRUE)); | ||
55 | } | 52 | } |
56 | done = 0; | 53 | done = 0; |
57 | } | 54 | } |
@@ -59,37 +56,34 @@ static void _setup(void) | |||
59 | /* cleanup */ | 56 | /* cleanup */ |
60 | static void _cleanup(void) | 57 | static void _cleanup(void) |
61 | { | 58 | { |
62 | int i; | 59 | images.clear(); |
63 | for (i = 0; i < CNUM; i++) | 60 | reflec.clear(); |
64 | { | ||
65 | eo_del(images[i]); | ||
66 | eo_del(o_reflec[i]); | ||
67 | } | ||
68 | } | 61 | } |
69 | 62 | ||
70 | /* loop - do things */ | 63 | /* loop - do things */ |
71 | static void _loop(double t, int f) | 64 | static void _loop(double t, int f) |
72 | { | 65 | { |
73 | int i; | ||
74 | static Evas_Map *m = NULL; | 66 | static Evas_Map *m = NULL; |
75 | Evas_Coord x, y, xx, yy, w, h, c, z; | ||
76 | int center = 150; | 67 | int center = 150; |
77 | double ang, n; | 68 | |
78 | |||
79 | if (!m) m = evas_map_new(4); | 69 | if (!m) m = evas_map_new(4); |
80 | evas_map_smooth_set(m, 0); | 70 | evas_map_smooth_set(m, 0); |
81 | 71 | ||
82 | for (i = 0; i < CNUM; i++) | 72 | auto it_i = images.begin(); |
73 | auto it_r = reflec.begin(); | ||
74 | for (int i = 0; i < CNUM; i++) | ||
83 | { | 75 | { |
84 | x = (win_w / 2); | 76 | ++it_i; |
85 | y = (win_h / 2); | 77 | ++it_r; |
86 | w = 256; | 78 | |
87 | h = 256; | 79 | Evas_Coord x = (win_w / 2); |
88 | 80 | Evas_Coord y = (win_h / 2); | |
89 | c = (i - (CNUM / 2)) * (w / 4); | 81 | Evas_Coord w = 256; |
82 | Evas_Coord h = 256; | ||
83 | Evas_Coord c = (i - (CNUM / 2)) * (w / 4); | ||
90 | c += (f % (6 * (w / 4))); | 84 | c += (f % (6 * (w / 4))); |
91 | 85 | ||
92 | ang = (double)c / (double)center; | 86 | double ang = (double)c / (double)center; |
93 | if (ang > 0.0) ang = ang * ang; | 87 | if (ang > 0.0) ang = ang * ang; |
94 | else ang = -ang * ang; | 88 | else ang = -ang * ang; |
95 | ang *= -90.0; | 89 | ang *= -90.0; |
@@ -98,7 +92,7 @@ static void _loop(double t, int f) | |||
98 | 92 | ||
99 | if ((c > (-center)) && (c <= (center))) | 93 | if ((c > (-center)) && (c <= (center))) |
100 | { | 94 | { |
101 | n = (double)c / (double)center; | 95 | double n = (double)c / (double)center; |
102 | if (c > 0) | 96 | if (c > 0) |
103 | { | 97 | { |
104 | n = 1.0 - n; | 98 | n = 1.0 - n; |
@@ -116,7 +110,7 @@ static void _loop(double t, int f) | |||
116 | else if (c > (center)) | 110 | else if (c > (center)) |
117 | c = (c - center) + (center * 2); | 111 | c = (c - center) + (center * 2); |
118 | 112 | ||
119 | z = 0; | 113 | Evas_Coord z = 0; |
120 | if ((c > (-center)) && (c <= (center))) | 114 | if ((c > (-center)) && (c <= (center))) |
121 | { | 115 | { |
122 | z = (c * (w / 2)) / center; | 116 | z = (c * (w / 2)) / center; |
@@ -127,20 +121,20 @@ static void _loop(double t, int f) | |||
127 | x += c; | 121 | x += c; |
128 | 122 | ||
129 | x -= (w / 2); | 123 | x -= (w / 2); |
130 | xx = x + w; | 124 | Evas_Coord xx = x + w; |
131 | 125 | ||
132 | y -= (h / 2); | 126 | y -= (h / 2); |
133 | yy = y + h; | 127 | Evas_Coord yy = y + h; |
134 | 128 | ||
135 | if (c <= 0) | 129 | if (c <= 0) |
136 | { | 130 | { |
137 | eo_do(images[i], evas_obj_raise()); | 131 | (*it_i).raise(); |
138 | eo_do(o_reflec[i], evas_obj_raise()); | 132 | (*it_r).raise(); |
139 | } | 133 | } |
140 | else | 134 | else |
141 | { | 135 | { |
142 | eo_do(images[i], evas_obj_lower()); | 136 | (*it_i).lower(); |
143 | eo_do(o_reflec[i], evas_obj_lower()); | 137 | (*it_r).lower(); |
144 | } | 138 | } |
145 | 139 | ||
146 | evas_map_point_coord_set (m, 0, x, y, -z); | 140 | evas_map_point_coord_set (m, 0, x, y, -z); |
@@ -163,9 +157,8 @@ static void _loop(double t, int f) | |||
163 | x + (w / 2), y + (h / 2), 0); | 157 | x + (w / 2), y + (h / 2), 0); |
164 | evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512); | 158 | evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512); |
165 | 159 | ||
166 | eo_do(images[i], | 160 | (*it_i).map_enable_set(1); |
167 | evas_obj_map_enable_set(1), | 161 | (*it_i).map_set(m); |
168 | evas_obj_map_set(m)); | ||
169 | 162 | ||
170 | evas_map_point_coord_set (m, 0, x, yy, -z); | 163 | evas_map_point_coord_set (m, 0, x, yy, -z); |
171 | evas_map_point_image_uv_set(m, 0, 0, 256); | 164 | evas_map_point_image_uv_set(m, 0, 0, 256); |
@@ -187,9 +180,8 @@ static void _loop(double t, int f) | |||
187 | x + (w / 2), y + (h / 2), 0); | 180 | x + (w / 2), y + (h / 2), 0); |
188 | evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512); | 181 | evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512); |
189 | 182 | ||
190 | eo_do(o_reflec[i], | 183 | (*it_r).map_enable_set(1); |
191 | evas_obj_map_enable_set(1), | 184 | (*it_r).map_set(m); |
192 | evas_obj_map_set(m)); | ||
193 | } | 185 | } |
194 | 186 | ||
195 | FPS_STD(NAME); | 187 | FPS_STD(NAME); |
diff --git a/src/bin/cxx/image_map_color_alpha_nearest_rotate.cc b/src/bin/cxx/image_map_color_alpha_nearest_rotate.cc index 070dcc0..23ab039 100644 --- a/src/bin/cxx/image_map_color_alpha_nearest_rotate.cc +++ b/src/bin/cxx/image_map_color_alpha_nearest_rotate.cc | |||
@@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
@@ -43,19 +42,17 @@ static void _setup(void) | |||
43 | /* cleanup */ | 42 | /* cleanup */ |
44 | static void _cleanup(void) | 43 | static void _cleanup(void) |
45 | { | 44 | { |
46 | int i; | 45 | for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); |
47 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
48 | } | 46 | } |
49 | 47 | ||
50 | /* loop - do things */ | 48 | /* loop - do things */ |
51 | static void _loop(double t, int f) | 49 | static void _loop(double t, int f) |
52 | { | 50 | { |
53 | int i; | ||
54 | static Evas_Map *m = NULL; | 51 | static Evas_Map *m = NULL; |
55 | Evas_Coord x, y, w, h; | 52 | Evas_Coord x, y, w, h; |
56 | if (!m) m = evas_map_new(4); | 53 | if (!m) m = evas_map_new(4); |
57 | evas_map_smooth_set(m, 0); | 54 | evas_map_smooth_set(m, 0); |
58 | for (i = 0; i < (OBNUM / 2); i++) | 55 | for (int i = 0; i < (OBNUM / 2); i++) |
59 | { | 56 | { |
60 | w = 120; | 57 | w = 120; |
61 | h = 160; | 58 | h = 160; |
diff --git a/src/bin/cxx/image_map_color_alpha_nearest_solid_rotate.cc b/src/bin/cxx/image_map_color_alpha_nearest_solid_rotate.cc index 5df2770..3e0d93f 100644 --- a/src/bin/cxx/image_map_color_alpha_nearest_solid_rotate.cc +++ b/src/bin/cxx/image_map_color_alpha_nearest_solid_rotate.cc | |||
@@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
@@ -43,19 +42,17 @@ static void _setup(void) | |||
43 | /* cleanup */ | 42 | /* cleanup */ |
44 | static void _cleanup(void) | 43 | static void _cleanup(void) |
45 | { | 44 | { |
46 | int i; | 45 | for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); |
47 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
48 | } | 46 | } |
49 | 47 | ||
50 | /* loop - do things */ | 48 | /* loop - do things */ |
51 | static void _loop(double t, int f) | 49 | static void _loop(double t, int f) |
52 | { | 50 | { |
53 | int i; | ||
54 | static Evas_Map *m = NULL; | 51 | static Evas_Map *m = NULL; |
55 | Evas_Coord x, y, w, h; | 52 | Evas_Coord x, y, w, h; |
56 | if (!m) m = evas_map_new(4); | 53 | if (!m) m = evas_map_new(4); |
57 | evas_map_smooth_set(m, 0); | 54 | evas_map_smooth_set(m, 0); |
58 | for (i = 0; i < (OBNUM / 2); i++) | 55 | for (int i = 0; i < (OBNUM / 2); i++) |
59 | { | 56 | { |
60 | w = 120; | 57 | w = 120; |
61 | h = 160; | 58 | h = 160; |
diff --git a/src/bin/cxx/image_map_color_alpha_rotate.cc b/src/bin/cxx/image_map_color_alpha_rotate.cc index 7b22dd2..47893a8 100644 --- a/src/bin/cxx/image_map_color_alpha_rotate.cc +++ b/src/bin/cxx/image_map_color_alpha_rotate.cc | |||
@@ -24,17 +24,15 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
33 | eo_do(o, | 32 | efl_file_set(build_path("logo.png"), ""); |
34 | efl_file_set(build_path("logo.png"), NULL), | 33 | o.image_fill_set(0, 0, 120, 160); |
35 | evas_obj_image_fill_set(0, 0, 120, 160), | 34 | o.evas::object::size_set(120, 160); |
36 | evas_obj_size_set(120, 160), | 35 | o.visibility_set(true); |
37 | evas_obj_visibility_set(EINA_TRUE)); | ||
38 | } | 36 | } |
39 | done = 0; | 37 | done = 0; |
40 | } | 38 | } |
@@ -42,24 +40,22 @@ static void _setup(void) | |||
42 | /* cleanup */ | 40 | /* cleanup */ |
43 | static void _cleanup(void) | 41 | static void _cleanup(void) |
44 | { | 42 | { |
45 | int i; | 43 | images.clear(); |
46 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
47 | } | 44 | } |
48 | 45 | ||
49 | /* loop - do things */ | 46 | /* loop - do things */ |
50 | static void _loop(double t, int f) | 47 | static void _loop(double t, int f) |
51 | { | 48 | { |
52 | int i; | ||
53 | static Evas_Map *m = NULL; | 49 | static Evas_Map *m = NULL; |
54 | Evas_Coord x, y, w, h; | ||
55 | if (!m) m = evas_map_new(4); | 50 | if (!m) m = evas_map_new(4); |
56 | for (i = 0; i < (OBNUM / 2); i++) | 51 | auto itr = images.begin(); |
52 | for (int i = 0; i < (OBNUM / 2); i++, ++itr) | ||
57 | { | 53 | { |
58 | w = 120; | 54 | Evas_Coord w = 120; |
59 | h = 160; | 55 | Evas_Coord h = 160; |
60 | x = (win_w / 2) - (w / 2); | 56 | Evas_Coord x = (win_w / 2) - (w / 2); |
61 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 57 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
62 | y = (win_h / 2) - (h / 2); | 58 | Evas_Coord y = (win_h / 2) - (h / 2); |
63 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 59 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
64 | 60 | ||
65 | evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); | 61 | evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); |
@@ -71,9 +67,8 @@ static void _loop(double t, int f) | |||
71 | 67 | ||
72 | evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); | 68 | evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); |
73 | 69 | ||
74 | eo_do(images[i], | 70 | (*itr).map_enable_set(1); |
75 | evas_obj_map_enable_set(1), | 71 | (*itr).map_set(m); |
76 | evas_obj_map_set(m)); | ||
77 | } | 72 | } |
78 | FPS_STD(NAME); | 73 | FPS_STD(NAME); |
79 | } | 74 | } |
diff --git a/src/bin/cxx/image_map_color_alpha_solid_rotate.cc b/src/bin/cxx/image_map_color_alpha_solid_rotate.cc index 847a73f..3fd18d0 100644 --- a/src/bin/cxx/image_map_color_alpha_solid_rotate.cc +++ b/src/bin/cxx/image_map_color_alpha_solid_rotate.cc | |||
@@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
@@ -42,18 +41,16 @@ static void _setup(void) | |||
42 | /* cleanup */ | 41 | /* cleanup */ |
43 | static void _cleanup(void) | 42 | static void _cleanup(void) |
44 | { | 43 | { |
45 | int i; | 44 | for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); |
46 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
47 | } | 45 | } |
48 | 46 | ||
49 | /* loop - do things */ | 47 | /* loop - do things */ |
50 | static void _loop(double t, int f) | 48 | static void _loop(double t, int f) |
51 | { | 49 | { |
52 | int i; | ||
53 | static Evas_Map *m = NULL; | 50 | static Evas_Map *m = NULL; |
54 | Evas_Coord x, y, w, h; | 51 | Evas_Coord x, y, w, h; |
55 | if (!m) m = evas_map_new(4); | 52 | if (!m) m = evas_map_new(4); |
56 | for (i = 0; i < (OBNUM / 2); i++) | 53 | for (int i = 0; i < (OBNUM / 2); i++) |
57 | { | 54 | { |
58 | w = 120; | 55 | w = 120; |
59 | h = 160; | 56 | h = 160; |
diff --git a/src/bin/cxx/image_map_color_nearest_rotate.cc b/src/bin/cxx/image_map_color_nearest_rotate.cc index 784f759..52248d8 100644 --- a/src/bin/cxx/image_map_color_nearest_rotate.cc +++ b/src/bin/cxx/image_map_color_nearest_rotate.cc | |||
@@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
@@ -43,19 +42,17 @@ static void _setup(void) | |||
43 | /* cleanup */ | 42 | /* cleanup */ |
44 | static void _cleanup(void) | 43 | static void _cleanup(void) |
45 | { | 44 | { |
46 | int i; | 45 | images.clear(); |
47 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
48 | } | 46 | } |
49 | 47 | ||
50 | /* loop - do things */ | 48 | /* loop - do things */ |
51 | static void _loop(double t, int f) | 49 | static void _loop(double t, int f) |
52 | { | 50 | { |
53 | int i; | ||
54 | static Evas_Map *m = NULL; | 51 | static Evas_Map *m = NULL; |
55 | Evas_Coord x, y, w, h; | 52 | Evas_Coord x, y, w, h; |
56 | if (!m) m = evas_map_new(4); | 53 | if (!m) m = evas_map_new(4); |
57 | evas_map_smooth_set(m, 0); | 54 | evas_map_smooth_set(m, 0); |
58 | for (i = 0; i < (OBNUM / 2); i++) | 55 | for (int i = 0; i < (OBNUM / 2); i++) |
59 | { | 56 | { |
60 | w = 120; | 57 | w = 120; |
61 | h = 160; | 58 | h = 160; |
diff --git a/src/bin/cxx/image_map_color_nearest_solid_rotate.cc b/src/bin/cxx/image_map_color_nearest_solid_rotate.cc index b1db671..eb13110 100644 --- a/src/bin/cxx/image_map_color_nearest_solid_rotate.cc +++ b/src/bin/cxx/image_map_color_nearest_solid_rotate.cc | |||
@@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
@@ -43,19 +42,17 @@ static void _setup(void) | |||
43 | /* cleanup */ | 42 | /* cleanup */ |
44 | static void _cleanup(void) | 43 | static void _cleanup(void) |
45 | { | 44 | { |
46 | int i; | 45 | for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); |
47 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
48 | } | 46 | } |
49 | 47 | ||
50 | /* loop - do things */ | 48 | /* loop - do things */ |
51 | static void _loop(double t, int f) | 49 | static void _loop(double t, int f) |
52 | { | 50 | { |
53 | int i; | ||
54 | static Evas_Map *m = NULL; | 51 | static Evas_Map *m = NULL; |
55 | Evas_Coord x, y, w, h; | 52 | Evas_Coord x, y, w, h; |
56 | if (!m) m = evas_map_new(4); | 53 | if (!m) m = evas_map_new(4); |
57 | evas_map_smooth_set(m, 0); | 54 | evas_map_smooth_set(m, 0); |
58 | for (i = 0; i < (OBNUM / 2); i++) | 55 | for (int i = 0; i < (OBNUM / 2); i++) |
59 | { | 56 | { |
60 | w = 120; | 57 | w = 120; |
61 | h = 160; | 58 | h = 160; |
diff --git a/src/bin/cxx/image_map_color_rotate.cc b/src/bin/cxx/image_map_color_rotate.cc index 2792dd9..b62bd41 100644 --- a/src/bin/cxx/image_map_color_rotate.cc +++ b/src/bin/cxx/image_map_color_rotate.cc | |||
@@ -24,17 +24,15 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
33 | eo_do(o, | 32 | o.file_set(build_path("logo.png"), ""); |
34 | efl_file_set(build_path("logo.png"), NULL), | 33 | o.image_fill_set(0, 0, 120, 160); |
35 | evas_obj_image_fill_set(0, 0, 120, 160), | 34 | o.evas::object::size_set(120, 160); |
36 | evas_obj_size_set(120, 160), | 35 | o.visibility_set(true); |
37 | evas_obj_visibility_set(EINA_TRUE)); | ||
38 | } | 36 | } |
39 | done = 0; | 37 | done = 0; |
40 | } | 38 | } |
@@ -42,24 +40,22 @@ static void _setup(void) | |||
42 | /* cleanup */ | 40 | /* cleanup */ |
43 | static void _cleanup(void) | 41 | static void _cleanup(void) |
44 | { | 42 | { |
45 | int i; | 43 | images.clear(); |
46 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
47 | } | 44 | } |
48 | 45 | ||
49 | /* loop - do things */ | 46 | /* loop - do things */ |
50 | static void _loop(double t, int f) | 47 | static void _loop(double t, int f) |
51 | { | 48 | { |
52 | int i; | ||
53 | static Evas_Map *m = NULL; | 49 | static Evas_Map *m = NULL; |
54 | Evas_Coord x, y, w, h; | ||
55 | if (!m) m = evas_map_new(4); | 50 | if (!m) m = evas_map_new(4); |
56 | for (i = 0; i < (OBNUM / 2); i++) | 51 | auto itr = images.begin(); |
52 | for (int i = 0; i < (OBNUM / 2); i++, ++itr) | ||
57 | { | 53 | { |
58 | w = 120; | 54 | Eavs_Coord w = 120; |
59 | h = 160; | 55 | Eavs_Coord h = 160; |
60 | x = (win_w / 2) - (w / 2); | 56 | Eavs_Coord x = (win_w / 2) - (w / 2); |
61 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 57 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
62 | y = (win_h / 2) - (h / 2); | 58 | Eavs_Coord y = (win_h / 2) - (h / 2); |
63 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 59 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
64 | 60 | ||
65 | evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); | 61 | evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); |
@@ -71,9 +67,8 @@ static void _loop(double t, int f) | |||
71 | 67 | ||
72 | evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); | 68 | evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); |
73 | 69 | ||
74 | eo_do(images[i], | 70 | (*itr).map_enable_set(1); |
75 | evas_obj_map_enable_set(1), | 71 | (*itr).map_set(m); |
76 | evas_obj_map_set(m)); | ||
77 | } | 72 | } |
78 | FPS_STD(NAME); | 73 | FPS_STD(NAME); |
79 | } | 74 | } |
diff --git a/src/bin/cxx/image_map_color_solid_rotate.cc b/src/bin/cxx/image_map_color_solid_rotate.cc index 2284e2d..04a21f9 100644 --- a/src/bin/cxx/image_map_color_solid_rotate.cc +++ b/src/bin/cxx/image_map_color_solid_rotate.cc | |||
@@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
@@ -42,18 +41,16 @@ static void _setup(void) | |||
42 | /* cleanup */ | 41 | /* cleanup */ |
43 | static void _cleanup(void) | 42 | static void _cleanup(void) |
44 | { | 43 | { |
45 | int i; | 44 | for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); |
46 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
47 | } | 45 | } |
48 | 46 | ||
49 | /* loop - do things */ | 47 | /* loop - do things */ |
50 | static void _loop(double t, int f) | 48 | static void _loop(double t, int f) |
51 | { | 49 | { |
52 | int i; | ||
53 | static Evas_Map *m = NULL; | 50 | static Evas_Map *m = NULL; |
54 | Evas_Coord x, y, w, h; | 51 | Evas_Coord x, y, w, h; |
55 | if (!m) m = evas_map_new(4); | 52 | if (!m) m = evas_map_new(4); |
56 | for (i = 0; i < (OBNUM / 2); i++) | 53 | for (int i = 0; i < (OBNUM / 2); i++) |
57 | { | 54 | { |
58 | w = 120; | 55 | w = 120; |
59 | h = 160; | 56 | h = 160; |
diff --git a/src/bin/cxx/image_map_nearest_rotate.cc b/src/bin/cxx/image_map_nearest_rotate.cc index a206f10..b6f1d95 100644 --- a/src/bin/cxx/image_map_nearest_rotate.cc +++ b/src/bin/cxx/image_map_nearest_rotate.cc | |||
@@ -24,18 +24,16 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
33 | eo_do(o, | 32 | o.file_set(build_path("logo.png"), ""); |
34 | efl_file_set(build_path("logo.png"), NULL), | 33 | o.fill_set(0, 0, 120, 160); |
35 | evas_obj_image_fill_set(0, 0, 120, 160), | 34 | o.evas::object::size_set(120, 160); |
36 | evas_obj_size_set(120, 160), | 35 | o.smooth_scale_set(0); |
37 | efl_image_smooth_scale_set(0), | 36 | o.visibility_set(true); |
38 | evas_obj_visibility_set(EINA_TRUE)); | ||
39 | } | 37 | } |
40 | done = 0; | 38 | done = 0; |
41 | } | 39 | } |
@@ -43,34 +41,31 @@ static void _setup(void) | |||
43 | /* cleanup */ | 41 | /* cleanup */ |
44 | static void _cleanup(void) | 42 | static void _cleanup(void) |
45 | { | 43 | { |
46 | int i; | 44 | images.clear(); |
47 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
48 | } | 45 | } |
49 | 46 | ||
50 | /* loop - do things */ | 47 | /* loop - do things */ |
51 | static void _loop(double t, int f) | 48 | static void _loop(double t, int f) |
52 | { | 49 | { |
53 | int i; | ||
54 | static Evas_Map *m = NULL; | 50 | static Evas_Map *m = NULL; |
55 | Evas_Coord x, y, w, h; | ||
56 | if (!m) m = evas_map_new(4); | 51 | if (!m) m = evas_map_new(4); |
57 | evas_map_smooth_set(m, 0); | 52 | evas_map_smooth_set(m, 0); |
58 | for (i = 0; i < (OBNUM / 2); i++) | 53 | auto itr = images.begin(); |
54 | for (int i = 0; i < (OBNUM / 2); i++, ++itr) | ||
59 | { | 55 | { |
60 | w = 120; | 56 | Evas_Coord w = 120; |
61 | h = 160; | 57 | Evas_Coord h = 160; |
62 | x = (win_w / 2) - (w / 2); | 58 | Evas_Coord x = (win_w / 2) - (w / 2); |
63 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 59 | Evas_Coord x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
64 | y = (win_h / 2) - (h / 2); | 60 | Evas_Coord y = (win_h / 2) - (h / 2); |
65 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 61 | Evas_Coord y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
66 | 62 | ||
67 | evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); | 63 | evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); |
68 | 64 | ||
69 | evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); | 65 | evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); |
70 | 66 | ||
71 | eo_do(images[i], | 67 | (*itr).evas_obj_map_enable_set(1); |
72 | evas_obj_map_enable_set(1), | 68 | (*itr).evas_obj_map_set(m); |
73 | evas_obj_map_set(m)); | ||
74 | } | 69 | } |
75 | FPS_STD(NAME); | 70 | FPS_STD(NAME); |
76 | } | 71 | } |
diff --git a/src/bin/cxx/image_map_nearest_solid_rotate.cc b/src/bin/cxx/image_map_nearest_solid_rotate.cc index 3db5e84..0404691 100644 --- a/src/bin/cxx/image_map_nearest_solid_rotate.cc +++ b/src/bin/cxx/image_map_nearest_solid_rotate.cc | |||
@@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
@@ -43,19 +42,17 @@ static void _setup(void) | |||
43 | /* cleanup */ | 42 | /* cleanup */ |
44 | static void _cleanup(void) | 43 | static void _cleanup(void) |
45 | { | 44 | { |
46 | int i; | 45 | for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); |
47 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
48 | } | 46 | } |
49 | 47 | ||
50 | /* loop - do things */ | 48 | /* loop - do things */ |
51 | static void _loop(double t, int f) | 49 | static void _loop(double t, int f) |
52 | { | 50 | { |
53 | int i; | ||
54 | static Evas_Map *m = NULL; | 51 | static Evas_Map *m = NULL; |
55 | Evas_Coord x, y, w, h; | 52 | Evas_Coord x, y, w, h; |
56 | if (!m) m = evas_map_new(4); | 53 | if (!m) m = evas_map_new(4); |
57 | evas_map_smooth_set(m, 0); | 54 | evas_map_smooth_set(m, 0); |
58 | for (i = 0; i < (OBNUM / 2); i++) | 55 | for (int i = 0; i < (OBNUM / 2); i++) |
59 | { | 56 | { |
60 | w = 120; | 57 | w = 120; |
61 | h = 160; | 58 | h = 160; |
diff --git a/src/bin/cxx/image_map_rotate.cc b/src/bin/cxx/image_map_rotate.cc index 4de82e2..a31612a 100644 --- a/src/bin/cxx/image_map_rotate.cc +++ b/src/bin/cxx/image_map_rotate.cc | |||
@@ -24,16 +24,15 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
33 | eo_do(o, efl_file_set(build_path("logo.png"), NULL), | 32 | o.file_set(build_path("logo.png"), ""); |
34 | evas_obj_image_fill_set(0, 0, 120, 160), | 33 | o.fill_set(0, 0, 120, 160); |
35 | evas_obj_size_set(120, 160), | 34 | o.evas::object::size_set(120, 160); |
36 | evas_obj_visibility_set(EINA_TRUE)); | 35 | o.visibility_set(true); |
37 | } | 36 | } |
38 | done = 0; | 37 | done = 0; |
39 | } | 38 | } |
@@ -41,32 +40,30 @@ static void _setup(void) | |||
41 | /* cleanup */ | 40 | /* cleanup */ |
42 | static void _cleanup(void) | 41 | static void _cleanup(void) |
43 | { | 42 | { |
44 | int i; | 43 | images.clear(); |
45 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
46 | } | 44 | } |
47 | 45 | ||
48 | /* loop - do things */ | 46 | /* loop - do things */ |
49 | static void _loop(double t, int f) | 47 | static void _loop(double t, int f) |
50 | { | 48 | { |
51 | int i; | ||
52 | static Evas_Map *m = NULL; | 49 | static Evas_Map *m = NULL; |
53 | Evas_Coord x, y, w, h; | ||
54 | if (!m) m = evas_map_new(4); | 50 | if (!m) m = evas_map_new(4); |
55 | for (i = 0; i < (OBNUM / 2); i++) | 51 | auto itr = images.begin(); |
52 | for (int i = 0; i < (OBNUM / 2); i++, ++itr) | ||
56 | { | 53 | { |
57 | w = 120; | 54 | Evas_Coord w = 120; |
58 | h = 160; | 55 | Evas_Coord h = 160; |
59 | x = (win_w / 2) - (w / 2); | 56 | Evas_Coord x = (win_w / 2) - (w / 2); |
60 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); | 57 | x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); |
61 | y = (win_h / 2) - (h / 2); | 58 | Evas_Coord y = (win_h / 2) - (h / 2); |
62 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); | 59 | y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); |
63 | 60 | ||
64 | evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); | 61 | evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); |
65 | 62 | ||
66 | evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); | 63 | evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); |
67 | 64 | ||
68 | eo_do(images[i], evas_obj_map_enable_set(1), | 65 | (*itr).map_enable_set(1); |
69 | evas_obj_map_set(m)); | 66 | (*itr).map_set(m); |
70 | } | 67 | } |
71 | FPS_STD(NAME); | 68 | FPS_STD(NAME); |
72 | } | 69 | } |
diff --git a/src/bin/cxx/image_map_solid_rotate.cc b/src/bin/cxx/image_map_solid_rotate.cc index 4f30977..3516c71 100644 --- a/src/bin/cxx/image_map_solid_rotate.cc +++ b/src/bin/cxx/image_map_solid_rotate.cc | |||
@@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < (OBNUM / 2); i++) | 28 | for (int i = 0; i < (OBNUM / 2); i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
@@ -42,18 +41,16 @@ static void _setup(void) | |||
42 | /* cleanup */ | 41 | /* cleanup */ |
43 | static void _cleanup(void) | 42 | static void _cleanup(void) |
44 | { | 43 | { |
45 | int i; | 44 | for (int i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); |
46 | for (i = 0; i < (OBNUM / 2); i++) eo_del(images[i]); | ||
47 | } | 45 | } |
48 | 46 | ||
49 | /* loop - do things */ | 47 | /* loop - do things */ |
50 | static void _loop(double t, int f) | 48 | static void _loop(double t, int f) |
51 | { | 49 | { |
52 | int i; | ||
53 | static Evas_Map *m = NULL; | 50 | static Evas_Map *m = NULL; |
54 | Evas_Coord x, y, w, h; | 51 | Evas_Coord x, y, w, h; |
55 | if (!m) m = evas_map_new(4); | 52 | if (!m) m = evas_map_new(4); |
56 | for (i = 0; i < (OBNUM / 2); i++) | 53 | for (int i = 0; i < (OBNUM / 2); i++) |
57 | { | 54 | { |
58 | w = 120; | 55 | w = 120; |
59 | h = 160; | 56 | h = 160; |
diff --git a/src/bin/cxx/image_quality_scale.cc b/src/bin/cxx/image_quality_scale.cc index 3945d60..0772ddb 100644 --- a/src/bin/cxx/image_quality_scale.cc +++ b/src/bin/cxx/image_quality_scale.cc | |||
@@ -24,9 +24,8 @@ static efl::eina::list<evas::image> images; | |||
24 | /* setup */ | 24 | /* setup */ |
25 | static void _setup(void) | 25 | static void _setup(void) |
26 | { | 26 | { |
27 | int i; | ||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 27 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | for (i = 0; i < 1; i++) | 28 | for (int i = 0; i < 1; i++) |
30 | { | 29 | { |
31 | evas::image o(efl::eo::parent = canvas); | 30 | evas::image o(efl::eo::parent = canvas); |
32 | images.push_back(o); | 31 | images.push_back(o); |
@@ -41,16 +40,14 @@ static void _setup(void) | |||
41 | /* cleanup */ | 40 | /* cleanup */ |
42 | static void _cleanup(void) | 41 | static void _cleanup(void) |
43 | { | 42 | { |
44 | int i; | 43 | for (int i = 0; i < 1; i++) eo_del(images[i]); |
45 | for (i = 0; i < 1; i++) eo_del(images[i]); | ||
46 | } | 44 | } |
47 | 45 | ||
48 | /* loop - do things */ | 46 | /* loop - do things */ |
49 | static void _loop(double t, int f) | 47 | static void _loop(double t, int f) |
50 | { | 48 | { |
51 | int i; | ||
52 | Evas_Coord x, y, w, h; | 49 | Evas_Coord x, y, w, h; |
53 | for (i = 0; i < 1; i++) | 50 | for (int i = 0; i < 1; i++) |
54 | { | 51 | { |
55 | w = 640; | 52 | w = 640; |
56 | h = 480; | 53 | h = 480; |