summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2010-10-04 15:59:08 +0000
committerCedric BAIL <cedric.bail@free.fr>2010-10-04 15:59:08 +0000
commit2881402e2c580330a990032fd46920b9e540f5d4 (patch)
tree7f8bfbcd1d82b658ccc69a8504c342d26a1c6646
parent755d81b728f1c0835433e14a81ed2a1b4084391c (diff)
* expedite: fix stride usage (stride are indexing bytes not pixels).
SVN revision: 53030
-rw-r--r--src/bin/image_data_argb.c8
-rw-r--r--src/bin/image_data_argb_alpha.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/bin/image_data_argb.c b/src/bin/image_data_argb.c
index 191ba24..c063766 100644
--- a/src/bin/image_data_argb.c
+++ b/src/bin/image_data_argb.c
@@ -61,12 +61,12 @@ static void _loop(double t, int f)
61 evas_object_resize(o_images[i], w, h); 61 evas_object_resize(o_images[i], w, h);
62 evas_object_image_fill_set(o_images[i], 0, 0, w, h); 62 evas_object_image_fill_set(o_images[i], 0, 0, w, h);
63 data = evas_object_image_data_get(o_images[i], 1); 63 data = evas_object_image_data_get(o_images[i], 1);
64 st = evas_object_image_stride_get(o_images[i]); 64 st = evas_object_image_stride_get(o_images[i]) >> 2;
65 p = data; 65 p = data;
66 ff = (f ^ (f << 8) ^ (f << 16) ^ (f << 24)); 66 ff = (f ^ (f << 8) ^ (f << 16) ^ (f << 24));
67 for (y = 0; y < 480; y++) 67 for (y = 0; y < h; y++)
68 { 68 {
69 for (x = 0; x < 640; x++) 69 for (x = 0; x < w; x++)
70 { 70 {
71 *p = ((((x * y) + f) << 8) ^ (x - y - f)) | 0xff000000; 71 *p = ((((x * y) + f) << 8) ^ (x - y - f)) | 0xff000000;
72 p++; 72 p++;
@@ -74,7 +74,7 @@ static void _loop(double t, int f)
74 p += (st - w); 74 p += (st - w);
75 } 75 }
76 evas_object_image_data_set(o_images[i], data); 76 evas_object_image_data_set(o_images[i], data);
77 evas_object_image_data_update_add(o_images[i], 0, 0, 640, 480); 77 evas_object_image_data_update_add(o_images[i], 0, 0, w, h);
78 } 78 }
79 FPS_STD(NAME); 79 FPS_STD(NAME);
80} 80}
diff --git a/src/bin/image_data_argb_alpha.c b/src/bin/image_data_argb_alpha.c
index 0cdba76..6c7fc33 100644
--- a/src/bin/image_data_argb_alpha.c
+++ b/src/bin/image_data_argb_alpha.c
@@ -61,12 +61,12 @@ static void _loop(double t, int f)
61 evas_object_resize(o_images[i], w, h); 61 evas_object_resize(o_images[i], w, h);
62 evas_object_image_fill_set(o_images[i], 0, 0, w, h); 62 evas_object_image_fill_set(o_images[i], 0, 0, w, h);
63 data = evas_object_image_data_get(o_images[i], 1); 63 data = evas_object_image_data_get(o_images[i], 1);
64 st = evas_object_image_stride_get(o_images[i]); 64 st = evas_object_image_stride_get(o_images[i]) >> 2;
65 p = data; 65 p = data;
66 ff = (f ^ (f << 8) ^ (f << 16) ^ (f << 24)); 66 ff = (f ^ (f << 8) ^ (f << 16) ^ (f << 24));
67 for (y = 0; y < 480; y++) 67 for (y = 0; y < h; y++)
68 { 68 {
69 for (x = 0; x < 640; x++) 69 for (x = 0; x < w; x++)
70 { 70 {
71 r = (x * y / 7) + f; 71 r = (x * y / 7) + f;
72 g = (x / 2); 72 g = (x / 2);
@@ -85,7 +85,7 @@ static void _loop(double t, int f)
85 p += (st - w); 85 p += (st - w);
86 } 86 }
87 evas_object_image_data_set(o_images[i], data); 87 evas_object_image_data_set(o_images[i], data);
88 evas_object_image_data_update_add(o_images[i], 0, 0, 640, 480); 88 evas_object_image_data_update_add(o_images[i], 0, 0, w, h);
89 } 89 }
90 FPS_STD(NAME); 90 FPS_STD(NAME);
91} 91}