evas: fix logic of 180 degree image rotation in software_generic backend.
authorkabeer khan <kabeer.khan@samsung.com>
Wed, 25 Mar 2015 18:25:38 +0000 (19:25 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Wed, 25 Mar 2015 18:40:41 +0000 (19:40 +0100)
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2238

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/modules/evas/engines/software_generic/evas_engine.c

index dc4d7b3..a679d5c 100644 (file)
@@ -1360,17 +1360,16 @@ _image_rotate_180(void *data, Image_Entry *im)
 {
    unsigned int *p1, *p2, tmp;
    DATA32 *image_data;
-   int x, hw, iw, ih;
+   int hw, iw, ih;
    Image_Entry *im2;
 
    eng_image_size_get(data, im, &iw, &ih);
    im = eng_image_data_get(data, im , 1, &image_data, NULL);
    if(!image_data) return im;
    hw = iw * ih;
-   x = (hw / 2);
    p1 = image_data;
    p2 = image_data + hw - 1;
-   for (; --x > 0; )
+   for (; p1 < p2; )
      {
         tmp = *p1;
         *p1 = *p2;