From c58e2e4047cf840659274bf0cfdc4893124098f8 Mon Sep 17 00:00:00 2001 From: Savio Sena Date: Mon, 20 Oct 2014 19:43:22 -0200 Subject: [PATCH] expedite-cxx: Rephrase a test to better perform. --- src/bin/cxx/image_map_nearest_rotate.cc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/bin/cxx/image_map_nearest_rotate.cc b/src/bin/cxx/image_map_nearest_rotate.cc index 8c6bb1f..1c4e62f 100644 --- a/src/bin/cxx/image_map_nearest_rotate.cc +++ b/src/bin/cxx/image_map_nearest_rotate.cc @@ -49,27 +49,30 @@ static void _cleanup(void) /* loop - do things */ static void _loop(double t, int f) { + Evas_Coord x, y, w, h; static Evas_Map *m = NULL; if (!m) m = evas_map_new(4); evas_map_smooth_set(m, 0); int i = 0; for (evas::image& img : images) { - Evas_Coord w = 120; - Evas_Coord h = 160; - Evas_Coord x = (win_w / 2) - (w / 2); - x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); - Evas_Coord y = (win_h / 2) - (h / 2); - y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += ::sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += ::cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); - evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + ::evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); - evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + ::evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); img.map_enable_set(1); img.map_set(m); ++i; } + std::cout << "XXX << " << __FILE__ << ":"<< __LINE__ << " >> " << __FUNCTION__ << "() :: i = " << i << std::flush << std::endl; + FPS_STD(NAME); }