summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_blend_main.c1
-rw-r--r--legacy/evas/src/lib/engines/common/evas_blit_main.c8
-rw-r--r--legacy/evas/src/lib/engines/common/evas_convert_color.c14
-rw-r--r--legacy/evas/src/lib/engines/common/evas_convert_main.c18
-rw-r--r--legacy/evas/src/lib/engines/common/evas_cpu.c8
-rw-r--r--legacy/evas/src/lib/engines/common/evas_image_load.c16
-rw-r--r--legacy/evas/src/lib/engines/common/evas_image_main.c28
-rw-r--r--legacy/evas/src/lib/engines/common/evas_image_save.c6
-rw-r--r--legacy/evas/src/lib/engines/common/evas_line_main.c14
-rw-r--r--legacy/evas/src/lib/engines/common/evas_op_add_main_.c24
-rw-r--r--legacy/evas/src/lib/engines/common/evas_op_blend_main_.c22
-rw-r--r--legacy/evas/src/lib/engines/common/evas_op_copy_main_.c30
-rw-r--r--legacy/evas/src/lib/engines/common/evas_op_mask_main_.c10
-rw-r--r--legacy/evas/src/lib/engines/common/evas_op_mul_main_.c10
-rw-r--r--legacy/evas/src/lib/engines/common/evas_op_sub_main_.c24
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_sample.c6
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler.c2
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c8
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c20
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c20
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c4
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c14
-rw-r--r--legacy/evas/src/lib/engines/common/evas_tiler.c166
23 files changed, 236 insertions, 237 deletions
diff --git a/legacy/evas/src/lib/engines/common/evas_blend_main.c b/legacy/evas/src/lib/engines/common/evas_blend_main.c
index ee232806dd..76f170afc8 100644
--- a/legacy/evas/src/lib/engines/common/evas_blend_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_blend_main.c
@@ -322,4 +322,3 @@ evas_common_gfx_func_composite_pixel_mask_pt_get(Image_Entry_Flags src_flags, RG
322 return func; 322 return func;
323 return _composite_pt_nothing; 323 return _composite_pt_nothing;
324} 324}
325
diff --git a/legacy/evas/src/lib/engines/common/evas_blit_main.c b/legacy/evas/src/lib/engines/common/evas_blit_main.c
index 208f4351ef..7b47399817 100644
--- a/legacy/evas/src/lib/engines/common/evas_blit_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_blit_main.c
@@ -122,7 +122,7 @@ evas_common_copy_rev_pixels_c(DATA32 *src, DATA32 *dst, int len)
122 122
123 src += len - 1; 123 src += len - 1;
124 while (dst < dst_end) 124 while (dst < dst_end)
125 *dst++ = *src--; 125 *dst++ = *src--;
126} 126}
127 127
128#ifdef BUILD_C 128#ifdef BUILD_C
@@ -132,7 +132,7 @@ evas_common_copy_pixels_c(DATA32 *src, DATA32 *dst, int len)
132 DATA32 *dst_end = dst + len; 132 DATA32 *dst_end = dst + len;
133 133
134 while (dst < dst_end) 134 while (dst < dst_end)
135 *dst++ = *src++; 135 *dst++ = *src++;
136} 136}
137#endif 137#endif
138 138
@@ -245,7 +245,7 @@ evas_common_copy_pixels_sse(DATA32 *src, DATA32 *dst, int len)
245 src_ptr++; 245 src_ptr++;
246 dst_ptr++; 246 dst_ptr++;
247 } 247 }
248#if 0 248#if 0
249#ifdef ALIGN_FIX 249#ifdef ALIGN_FIX
250 int src_align; 250 int src_align;
251 int dst_align; 251 int dst_align;
@@ -290,7 +290,7 @@ evas_common_copy_pixels_sse(DATA32 *src, DATA32 *dst, int len)
290 src_ptr++; 290 src_ptr++;
291 dst_ptr++; 291 dst_ptr++;
292 } 292 }
293#endif 293#endif
294} 294}
295#endif 295#endif
296 296
diff --git a/legacy/evas/src/lib/engines/common/evas_convert_color.c b/legacy/evas/src/lib/engines/common/evas_convert_color.c
index 6a63533fb4..3d75685d1a 100644
--- a/legacy/evas/src/lib/engines/common/evas_convert_color.c
+++ b/legacy/evas/src/lib/engines/common/evas_convert_color.c
@@ -15,8 +15,8 @@ evas_common_convert_argb_premul(DATA32 *data, unsigned int len)
15 { 15 {
16 DATA32 a = 1 + (*data >> 24); 16 DATA32 a = 1 + (*data >> 24);
17 17
18 *data = (*data & 0xff000000) + 18 *data = (*data & 0xff000000) +
19 (((((*data) >> 8) & 0xff) * a) & 0xff00) + 19 (((((*data) >> 8) & 0xff) * a) & 0xff00) +
20 (((((*data) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff); 20 (((((*data) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff);
21 data++; 21 data++;
22 } 22 }
@@ -32,9 +32,9 @@ evas_common_convert_argb_unpremul(DATA32 *data, unsigned int len)
32 DATA32 a = (*data >> 24); 32 DATA32 a = (*data >> 24);
33 33
34 if ((a > 0) && (a < 255)) 34 if ((a > 0) && (a < 255))
35 *data = ARGB_JOIN(a, 35 *data = ARGB_JOIN(a,
36 (R_VAL(data) * 255) / a, 36 (R_VAL(data) * 255) / a,
37 (G_VAL(data) * 255) / a, 37 (G_VAL(data) * 255) / a,
38 (B_VAL(data) * 255) / a); 38 (B_VAL(data) * 255) / a);
39 data++; 39 data++;
40 } 40 }
@@ -131,7 +131,7 @@ evas_common_convert_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, fl
131 { 131 {
132 if (s) *s = 0; 132 if (s) *s = 0;
133 if (h) *h = 0; 133 if (h) *h = 0;
134 return; 134 return;
135 } 135 }
136 136
137 if (s) *s = (d / (float)max); 137 if (s) *s = (d / (float)max);
@@ -221,7 +221,7 @@ evas_common_convert_color_rgb_to_hsv_int(int r, int g, int b, int *h, int *s, in
221 if (!max) 221 if (!max)
222 { 222 {
223 *s = *h = 0; 223 *s = *h = 0;
224 return; 224 return;
225 } 225 }
226 226
227 *s = ((d * 255) / max); 227 *s = ((d * 255) / max);
diff --git a/legacy/evas/src/lib/engines/common/evas_convert_main.c b/legacy/evas/src/lib/engines/common/evas_convert_main.c
index f6bb467cf0..2a98b4cd61 100644
--- a/legacy/evas/src/lib/engines/common/evas_convert_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_convert_main.c
@@ -163,7 +163,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
163{ 163{
164 if ((rmask == 0) && (gmask == 0) && (bmask == 0)) 164 if ((rmask == 0) && (gmask == 0) && (bmask == 0))
165 { 165 {
166 if (depth == 8) 166 if (depth == 8)
167 { 167 {
168#ifdef BUILD_CONVERT_8_RGB_332 168#ifdef BUILD_CONVERT_8_RGB_332
169 if (pal_mode == PAL_MODE_RGB332) 169 if (pal_mode == PAL_MODE_RGB332)
@@ -194,10 +194,10 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
194 return evas_common_convert_rgba_to_8bpp_rgb_111_dith; 194 return evas_common_convert_rgba_to_8bpp_rgb_111_dith;
195#endif 195#endif
196 } 196 }
197 if (depth == 1) 197 if (depth == 1)
198 { 198 {
199 } 199 }
200 if (depth == 4) 200 if (depth == 4)
201 { 201 {
202 } 202 }
203 } 203 }
@@ -296,7 +296,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
296 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) 296 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
297 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith; 297 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith;
298 else 298 else
299 return evas_common_convert_rgba_to_16bpp_rgb_555_dith; 299 return evas_common_convert_rgba_to_16bpp_rgb_555_dith;
300 } 300 }
301#endif 301#endif
302#ifdef BUILD_CONVERT_16_RGB_ROT180 302#ifdef BUILD_CONVERT_16_RGB_ROT180
@@ -454,7 +454,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
454 } 454 }
455#endif 455#endif
456 } 456 }
457 if (depth == 32) 457 if (depth == 32)
458 { 458 {
459#ifdef BUILD_CONVERT_32_RGB_8888 459#ifdef BUILD_CONVERT_32_RGB_8888
460 if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff)) 460 if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff))
@@ -541,7 +541,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
541 } 541 }
542#endif 542#endif
543 } 543 }
544 if (depth == 24) 544 if (depth == 24)
545 { 545 {
546#ifdef BUILD_CONVERT_24_RGB_888 546#ifdef BUILD_CONVERT_24_RGB_888
547 if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff)) 547 if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff))
@@ -559,7 +559,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
559#endif 559#endif
560 } 560 }
561 printf("depth = %i mode = %i\n", depth, pal_mode); 561 printf("depth = %i mode = %i\n", depth, pal_mode);
562 if (depth == 8) 562 if (depth == 8)
563 { 563 {
564#ifdef BUILD_CONVERT_8_RGB_332 564#ifdef BUILD_CONVERT_8_RGB_332
565 if (pal_mode == PAL_MODE_RGB332) 565 if (pal_mode == PAL_MODE_RGB332)
@@ -590,10 +590,10 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
590 return evas_common_convert_rgba_to_8bpp_rgb_111_dith; 590 return evas_common_convert_rgba_to_8bpp_rgb_111_dith;
591#endif 591#endif
592 } 592 }
593 if (depth == 1) 593 if (depth == 1)
594 { 594 {
595 } 595 }
596 if (depth == 4) 596 if (depth == 4)
597 { 597 {
598 } 598 }
599 } 599 }
diff --git a/legacy/evas/src/lib/engines/common/evas_cpu.c b/legacy/evas/src/lib/engines/common/evas_cpu.c
index acaca4a17f..7f2096df8f 100644
--- a/legacy/evas/src/lib/engines/common/evas_cpu.c
+++ b/legacy/evas/src/lib/engines/common/evas_cpu.c
@@ -156,7 +156,7 @@ int
156evas_common_cpu_have_cpuid(void) 156evas_common_cpu_have_cpuid(void)
157{ 157{
158 return 0; 158 return 0;
159/* 159/*
160#ifdef BUILD_MMX 160#ifdef BUILD_MMX
161 unsigned int have_cpu_id; 161 unsigned int have_cpu_id;
162 162
@@ -218,9 +218,9 @@ evas_common_cpu_count(void)
218 cpu_set_t cpu; 218 cpu_set_t cpu;
219 int i; 219 int i;
220 static int cpus = 0; 220 static int cpus = 0;
221 221
222 if (cpus != 0) return cpus; 222 if (cpus != 0) return cpus;
223 223
224 sched_getaffinity(getpid(), sizeof(cpu), &cpu); 224 sched_getaffinity(getpid(), sizeof(cpu), &cpu);
225 for (i = 0; i < TH_MAX; i++) 225 for (i = 0; i < TH_MAX; i++)
226 { 226 {
@@ -230,5 +230,5 @@ evas_common_cpu_count(void)
230 return cpus; 230 return cpus;
231#else 231#else
232 return 1; 232 return 1;
233#endif 233#endif
234} 234}
diff --git a/legacy/evas/src/lib/engines/common/evas_image_load.c b/legacy/evas/src/lib/engines/common/evas_image_load.c
index 4706b03db0..4e3c2b6cf9 100644
--- a/legacy/evas/src/lib/engines/common/evas_image_load.c
+++ b/legacy/evas/src/lib/engines/common/evas_image_load.c
@@ -42,14 +42,14 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
42 dot = strrchr (ie->file, '.'); 42 dot = strrchr (ie->file, '.');
43 if (dot) 43 if (dot)
44 { 44 {
45 for (i = 0, ++dot; i < (sizeof (loaders) / sizeof (struct ext_loader_s)); ++i) 45 for (i = 0, ++dot; i < (sizeof (loaders) / sizeof (struct ext_loader_s)); ++i)
46 { 46 {
47 if (!strcasecmp (dot, loaders[i].extention)) 47 if (!strcasecmp (dot, loaders[i].extention))
48 { 48 {
49 loader = loaders[i].loader; 49 loader = loaders[i].loader;
50 break; 50 break;
51 } 51 }
52 } 52 }
53 } 53 }
54 54
55 if (loader) 55 if (loader)
diff --git a/legacy/evas/src/lib/engines/common/evas_image_main.c b/legacy/evas/src/lib/engines/common/evas_image_main.c
index d9898b3fba..fd2dee1e2d 100644
--- a/legacy/evas/src/lib/engines/common/evas_image_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_image_main.c
@@ -93,14 +93,14 @@ evas_common_image_shutdown(void)
93//// printf("REF--=%i\n", reference); 93//// printf("REF--=%i\n", reference);
94// DISABLE for now - something wrong with cache shutdown freeing things 94// DISABLE for now - something wrong with cache shutdown freeing things
95// still in use - rage_thumb segv's now. 95// still in use - rage_thumb segv's now.
96// 96//
97// actually - i think i see it. cache ref goes to 0 (and thus gets freed) 97// actually - i think i see it. cache ref goes to 0 (and thus gets freed)
98// because in eng_setup() when a buffer changes size it is FIRST freed 98// because in eng_setup() when a buffer changes size it is FIRST freed
99// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately 99// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately
100// where it should stay at 1. - see evas_engine.c in the buffer enigne for 100// where it should stay at 1. - see evas_engine.c in the buffer enigne for
101// example. eng_output_free() is called BEFORE _output_setup(). although this 101// example. eng_output_free() is called BEFORE _output_setup(). although this
102// is only a SIGNE of the problem. we can patch this up with either freeing 102// is only a SIGNE of the problem. we can patch this up with either freeing
103// after the setup (so we just pt a ref of 2 then back to 1), or just 103// after the setup (so we just pt a ref of 2 then back to 1), or just
104// evas_common_image_init() at the start and evas_common_image_shutdown() 104// evas_common_image_init() at the start and evas_common_image_shutdown()
105// after it all. really ref 0 should only be reached when no more canvases 105// after it all. really ref 0 should only be reached when no more canvases
106// with no more objects exist anywhere. 106// with no more objects exist anywhere.
@@ -160,12 +160,12 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, int w, int h)
160 if (im->image.data == NULL) return -1; 160 if (im->image.data == NULL) return -1;
161 161
162#ifdef HAVE_VALGRIND 162#ifdef HAVE_VALGRIND
163# ifdef VALGRIND_MAKE_READABLE 163# ifdef VALGRIND_MAKE_READABLE
164 VALGRIND_MAKE_READABLE(im->image.data, siz); 164 VALGRIND_MAKE_READABLE(im->image.data, siz);
165# else 165# else
166# ifdef VALGRIND_MAKE_MEM_DEFINED 166# ifdef VALGRIND_MAKE_MEM_DEFINED
167 VALGRIND_MAKE_MEM_DEFINED(im->image.data, siz); 167 VALGRIND_MAKE_MEM_DEFINED(im->image.data, siz);
168# endif 168# endif
169# endif 169# endif
170#endif 170#endif
171 171
@@ -320,8 +320,8 @@ evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize)
320/* { */ 320/* { */
321/* if ((is->data) && (!is->no_free)) */ 321/* if ((is->data) && (!is->no_free)) */
322/* { */ 322/* { */
323/* free(is->data); */ 323/* free(is->data); */
324/* is->data = NULL; */ 324/* is->data = NULL; */
325/* } */ 325/* } */
326/* } */ 326/* } */
327 327
@@ -437,7 +437,7 @@ evas_common_image_line_buffer_obtain(int len)
437 if (len < EVAS_RGBA_LINE_BUFFER_MIN_LEN) 437 if (len < EVAS_RGBA_LINE_BUFFER_MIN_LEN)
438 len = EVAS_RGBA_LINE_BUFFER_MIN_LEN; 438 len = EVAS_RGBA_LINE_BUFFER_MIN_LEN;
439 return evas_common_image_create(len, 1); 439 return evas_common_image_create(len, 1);
440/* 440/*
441 if (evas_rgba_line_buffer) 441 if (evas_rgba_line_buffer)
442 { 442 {
443 if (evas_rgba_line_buffer->image->w >= len) 443 if (evas_rgba_line_buffer->image->w >= len)
@@ -462,7 +462,7 @@ EAPI void
462evas_common_image_line_buffer_release(RGBA_Image *im) 462evas_common_image_line_buffer_release(RGBA_Image *im)
463{ 463{
464 _evas_common_rgba_image_delete(&im->cache_entry); 464 _evas_common_rgba_image_delete(&im->cache_entry);
465/* 465/*
466 if (!evas_rgba_line_buffer) return; 466 if (!evas_rgba_line_buffer) return;
467 if (EVAS_RGBA_LINE_BUFFER_MAX_LEN < evas_rgba_line_buffer->image->w) 467 if (EVAS_RGBA_LINE_BUFFER_MAX_LEN < evas_rgba_line_buffer->image->w)
468 { 468 {
@@ -482,7 +482,7 @@ EAPI void
482evas_common_image_line_buffer_free(RGBA_Image *im) 482evas_common_image_line_buffer_free(RGBA_Image *im)
483{ 483{
484 _evas_common_rgba_image_delete(&im->cache_entry); 484 _evas_common_rgba_image_delete(&im->cache_entry);
485/* 485/*
486 if (!evas_rgba_line_buffer) return; 486 if (!evas_rgba_line_buffer) return;
487 evas_common_image_free(evas_rgba_line_buffer); 487 evas_common_image_free(evas_rgba_line_buffer);
488 evas_rgba_line_buffer = NULL; 488 evas_rgba_line_buffer = NULL;
@@ -496,7 +496,7 @@ evas_common_image_alpha_line_buffer_obtain(int len)
496 if (len < EVAS_ALPHA_LINE_BUFFER_MIN_LEN) 496 if (len < EVAS_ALPHA_LINE_BUFFER_MIN_LEN)
497 len = EVAS_ALPHA_LINE_BUFFER_MIN_LEN; 497 len = EVAS_ALPHA_LINE_BUFFER_MIN_LEN;
498 return evas_common_image_alpha_create(len, 1); 498 return evas_common_image_alpha_create(len, 1);
499/* 499/*
500 if (evas_alpha_line_buffer) 500 if (evas_alpha_line_buffer)
501 { 501 {
502 if (evas_alpha_line_buffer->image->w >= len) 502 if (evas_alpha_line_buffer->image->w >= len)
@@ -520,7 +520,7 @@ EAPI void
520evas_common_image_alpha_line_buffer_release(RGBA_Image *im) 520evas_common_image_alpha_line_buffer_release(RGBA_Image *im)
521{ 521{
522 _evas_common_rgba_image_delete(&im->cache_entry); 522 _evas_common_rgba_image_delete(&im->cache_entry);
523/* 523/*
524 if (!evas_alpha_line_buffer) return; 524 if (!evas_alpha_line_buffer) return;
525 if (EVAS_ALPHA_LINE_BUFFER_MAX_LEN < evas_alpha_line_buffer->image->w) 525 if (EVAS_ALPHA_LINE_BUFFER_MAX_LEN < evas_alpha_line_buffer->image->w)
526 { 526 {
@@ -552,7 +552,7 @@ evas_common_image_premul(Image_Entry *ie)
552 { 552 {
553 DATA32 a = 1 + (*s >> 24); 553 DATA32 a = 1 + (*s >> 24);
554 554
555 *s = (*s & 0xff000000) + (((((*s) >> 8) & 0xff) * a) & 0xff00) + 555 *s = (*s & 0xff000000) + (((((*s) >> 8) & 0xff) * a) & 0xff00) +
556 (((((*s) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff); 556 (((((*s) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff);
557 s++; 557 s++;
558 if ((a == 1) || (a == 256)) 558 if ((a == 1) || (a == 256))
diff --git a/legacy/evas/src/lib/engines/common/evas_image_save.c b/legacy/evas/src/lib/engines/common/evas_image_save.c
index 34c4a802f0..1bd0938086 100644
--- a/legacy/evas/src/lib/engines/common/evas_image_save.c
+++ b/legacy/evas/src/lib/engines/common/evas_image_save.c
@@ -13,12 +13,12 @@ evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key
13 Evas_Image_Save_Func *evas_image_save_func = NULL; 13 Evas_Image_Save_Func *evas_image_save_func = NULL;
14 char *p; 14 char *p;
15 char *saver = NULL; 15 char *saver = NULL;
16 16
17 p = strrchr(file, '.'); 17 p = strrchr(file, '.');
18 if (p) 18 if (p)
19 { 19 {
20 p++; 20 p++;
21 21
22 if (!strcasecmp(p, "png")) 22 if (!strcasecmp(p, "png"))
23 saver = "png"; 23 saver = "png";
24 if ((!strcasecmp(p, "jpg")) || (!strcasecmp(p, "jpeg")) || 24 if ((!strcasecmp(p, "jpg")) || (!strcasecmp(p, "jpeg")) ||
@@ -34,7 +34,7 @@ evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key
34 if (saver) 34 if (saver)
35 { 35 {
36 Evas_Module *em; 36 Evas_Module *em;
37 37
38 em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_SAVER, saver); 38 em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_SAVER, saver);
39 if (em) 39 if (em)
40 { 40 {
diff --git a/legacy/evas/src/lib/engines/common/evas_line_main.c b/legacy/evas/src/lib/engines/common/evas_line_main.c
index 86d0e9403c..0ae77c1f75 100644
--- a/legacy/evas/src/lib/engines/common/evas_line_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_line_main.c
@@ -160,14 +160,14 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
160 if (dx < 0) 160 if (dx < 0)
161 { 161 {
162 int tmp = x1; 162 int tmp = x1;
163 163
164 x1 = x0; 164 x1 = x0;
165 x0 = tmp; 165 x0 = tmp;
166 } 166 }
167 167
168 if (x0 < lx) x0 = lx; 168 if (x0 < lx) x0 = lx;
169 if (x1 > rx) x1 = rx; 169 if (x1 > rx) x1 = rx;
170 170
171 len = x1 - x0 + 1; 171 len = x1 - x0 + 1;
172 p = dst->image.data + (dstw * y0) + x0; 172 p = dst->image.data + (dstw * y0) + x0;
173 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); 173 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op);
@@ -187,7 +187,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
187 { 187 {
188 if (y0 < ty) y0 = ty; 188 if (y0 < ty) y0 = ty;
189 if (y1 > by) y1 = by; 189 if (y1 > by) y1 = by;
190 190
191 len = y1 - y0 + 1; 191 len = y1 - y0 + 1;
192 p = dst->image.data + (dstw * y0) + x0; 192 p = dst->image.data + (dstw * y0) + x0;
193 while (len--) 193 while (len--)
@@ -208,7 +208,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
208 { 208 {
209 int p0_in, p1_in; 209 int p0_in, p1_in;
210 210
211 p0_in = (IN_RECT(x0, y0, clx, cly, clw, clh) ? 1 : 0); 211 p0_in = (IN_RECT(x0, y0, clx, cly, clw, clh) ? 1 : 0);
212 p1_in = (IN_RECT(x1, y1, clx, cly, clw, clh) ? 1 : 0); 212 p1_in = (IN_RECT(x1, y1, clx, cly, clw, clh) ? 1 : 0);
213 213
214 if (dx > 0) 214 if (dx > 0)
@@ -611,9 +611,9 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
611 if ((unsigned)(px) < clw) 611 if ((unsigned)(px) < clw)
612 { 612 {
613 aa = ((yy - (y << 16)) >> 8); 613 aa = ((yy - (y << 16)) >> 8);
614 if ((unsigned)(py) < clh) 614 if ((unsigned)(py) < clh)
615 pfunc(0, 255 - aa, color, p); 615 pfunc(0, 255 - aa, color, p);
616 if ((unsigned)(py + 1) < clh) 616 if ((unsigned)(py + 1) < clh)
617 pfunc(0, aa, color, p + dstw); 617 pfunc(0, aa, color, p + dstw);
618 } 618 }
619 yy += dyy; 619 yy += dyy;
diff --git a/legacy/evas/src/lib/engines/common/evas_op_add_main_.c b/legacy/evas/src/lib/engines/common/evas_op_add_main_.c
index d31ad03d59..d5dd312f5b 100644
--- a/legacy/evas/src/lib/engines/common/evas_op_add_main_.c
+++ b/legacy/evas/src/lib/engines/common/evas_op_add_main_.c
@@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, D
18static RGBA_Gfx_Pt_Func op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 18static RGBA_Gfx_Pt_Func op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); 19static RGBA_Gfx_Pt_Func op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20 20
21static RGBA_Gfx_Compositor _composite_add = { "add", 21static RGBA_Gfx_Compositor _composite_add = { "add",
22 op_add_init, op_add_shutdown, 22 op_add_init, op_add_shutdown,
23 op_add_pixel_span_get, op_add_color_span_get, 23 op_add_pixel_span_get, op_add_color_span_get,
24 op_add_pixel_color_span_get, op_add_mask_color_span_get, 24 op_add_pixel_color_span_get, op_add_mask_color_span_get,
25 op_add_pixel_mask_span_get, 25 op_add_pixel_mask_span_get,
26 op_add_pixel_pt_get, op_add_color_pt_get, 26 op_add_pixel_pt_get, op_add_color_pt_get,
27 op_add_pixel_color_pt_get, op_add_mask_color_pt_get, 27 op_add_pixel_color_pt_get, op_add_mask_color_pt_get,
28 op_add_pixel_mask_pt_get 28 op_add_pixel_mask_pt_get
29 }; 29 };
30 30
@@ -52,13 +52,13 @@ static RGBA_Gfx_Pt_Func op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flag
52static RGBA_Gfx_Pt_Func op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 52static RGBA_Gfx_Pt_Func op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
53static RGBA_Gfx_Pt_Func op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); 53static RGBA_Gfx_Pt_Func op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
54 54
55static RGBA_Gfx_Compositor _composite_add_rel = { "add_rel", 55static RGBA_Gfx_Compositor _composite_add_rel = { "add_rel",
56 op_add_rel_init, op_add_rel_shutdown, 56 op_add_rel_init, op_add_rel_shutdown,
57 op_add_rel_pixel_span_get, op_add_rel_color_span_get, 57 op_add_rel_pixel_span_get, op_add_rel_color_span_get,
58 op_add_rel_pixel_color_span_get, op_add_rel_mask_color_span_get, 58 op_add_rel_pixel_color_span_get, op_add_rel_mask_color_span_get,
59 op_add_rel_pixel_mask_span_get, 59 op_add_rel_pixel_mask_span_get,
60 op_add_rel_pixel_pt_get, op_add_rel_color_pt_get, 60 op_add_rel_pixel_pt_get, op_add_rel_color_pt_get,
61 op_add_rel_pixel_color_pt_get, op_add_rel_mask_color_pt_get, 61 op_add_rel_pixel_color_pt_get, op_add_rel_mask_color_pt_get,
62 op_add_rel_pixel_mask_pt_get 62 op_add_rel_pixel_mask_pt_get
63 }; 63 };
64 64
@@ -216,7 +216,7 @@ op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
216 return add_gfx_span_func_cpu(s, m, c, d); 216 return add_gfx_span_func_cpu(s, m, c, d);
217} 217}
218 218
219static RGBA_Gfx_Pt_Func 219static RGBA_Gfx_Pt_Func
220add_gfx_pt_func_cpu(int s, int m, int c, int d) 220add_gfx_pt_func_cpu(int s, int m, int c, int d)
221{ 221{
222 RGBA_Gfx_Pt_Func func = NULL; 222 RGBA_Gfx_Pt_Func func = NULL;
@@ -446,7 +446,7 @@ op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
446 return add_rel_gfx_span_func_cpu(s, m, c, d); 446 return add_rel_gfx_span_func_cpu(s, m, c, d);
447} 447}
448 448
449static RGBA_Gfx_Pt_Func 449static RGBA_Gfx_Pt_Func
450add_rel_gfx_pt_func_cpu(int s, int m, int c, int d) 450add_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
451{ 451{
452 RGBA_Gfx_Pt_Func func = NULL; 452 RGBA_Gfx_Pt_Func func = NULL;
diff --git a/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c b/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
index beabf1d24b..08cfe6604f 100644
--- a/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
+++ b/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
@@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags,
18static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 18static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); 19static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20 20
21static RGBA_Gfx_Compositor _composite_blend = { "blend", 21static RGBA_Gfx_Compositor _composite_blend = { "blend",
22 op_blend_init, op_blend_shutdown, 22 op_blend_init, op_blend_shutdown,
23 op_blend_pixel_span_get, op_blend_color_span_get, 23 op_blend_pixel_span_get, op_blend_color_span_get,
24 op_blend_pixel_color_span_get, op_blend_mask_color_span_get, 24 op_blend_pixel_color_span_get, op_blend_mask_color_span_get,
25 op_blend_pixel_mask_span_get, 25 op_blend_pixel_mask_span_get,
26 op_blend_pixel_pt_get, op_blend_color_pt_get, 26 op_blend_pixel_pt_get, op_blend_color_pt_get,
27 op_blend_pixel_color_pt_get, op_blend_mask_color_pt_get, 27 op_blend_pixel_color_pt_get, op_blend_mask_color_pt_get,
28 op_blend_pixel_mask_pt_get 28 op_blend_pixel_mask_pt_get
29 }; 29 };
30 30
@@ -53,13 +53,13 @@ static RGBA_Gfx_Pt_Func op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_fl
53static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 53static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
54static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); 54static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
55 55
56static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel", 56static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel",
57 op_blend_rel_init, op_blend_rel_shutdown, 57 op_blend_rel_init, op_blend_rel_shutdown,
58 op_blend_rel_pixel_span_get, op_blend_rel_color_span_get, 58 op_blend_rel_pixel_span_get, op_blend_rel_color_span_get,
59 op_blend_rel_pixel_color_span_get, op_blend_rel_mask_color_span_get, 59 op_blend_rel_pixel_color_span_get, op_blend_rel_mask_color_span_get,
60 op_blend_rel_pixel_mask_span_get, 60 op_blend_rel_pixel_mask_span_get,
61 op_blend_rel_pixel_pt_get, op_blend_rel_color_pt_get, 61 op_blend_rel_pixel_pt_get, op_blend_rel_color_pt_get,
62 op_blend_rel_pixel_color_pt_get, op_blend_rel_mask_color_pt_get, 62 op_blend_rel_pixel_color_pt_get, op_blend_rel_mask_color_pt_get,
63 op_blend_rel_pixel_mask_pt_get 63 op_blend_rel_pixel_mask_pt_get
64 }; 64 };
65 65
diff --git a/legacy/evas/src/lib/engines/common/evas_op_copy_main_.c b/legacy/evas/src/lib/engines/common/evas_op_copy_main_.c
index eb25c24d92..a6c1c16374 100644
--- a/legacy/evas/src/lib/engines/common/evas_op_copy_main_.c
+++ b/legacy/evas/src/lib/engines/common/evas_op_copy_main_.c
@@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags,
18static RGBA_Gfx_Pt_Func op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 18static RGBA_Gfx_Pt_Func op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); 19static RGBA_Gfx_Pt_Func op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20 20
21static RGBA_Gfx_Compositor _composite_copy = { "copy", 21static RGBA_Gfx_Compositor _composite_copy = { "copy",
22 op_copy_init, op_copy_shutdown, 22 op_copy_init, op_copy_shutdown,
23 op_copy_pixel_span_get, op_copy_color_span_get, 23 op_copy_pixel_span_get, op_copy_color_span_get,
24 op_copy_pixel_color_span_get, op_copy_mask_color_span_get, 24 op_copy_pixel_color_span_get, op_copy_mask_color_span_get,
25 op_copy_pixel_mask_span_get, 25 op_copy_pixel_mask_span_get,
26 op_copy_pixel_pt_get, op_copy_color_pt_get, 26 op_copy_pixel_pt_get, op_copy_color_pt_get,
27 op_copy_pixel_color_pt_get, op_copy_mask_color_pt_get, 27 op_copy_pixel_color_pt_get, op_copy_mask_color_pt_get,
28 op_copy_pixel_mask_pt_get 28 op_copy_pixel_mask_pt_get
29 }; 29 };
30 30
@@ -53,13 +53,13 @@ static RGBA_Gfx_Pt_Func op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_fla
53static RGBA_Gfx_Pt_Func op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 53static RGBA_Gfx_Pt_Func op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
54static RGBA_Gfx_Pt_Func op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); 54static RGBA_Gfx_Pt_Func op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
55 55
56static RGBA_Gfx_Compositor _composite_copy_rel = { "copy_rel", 56static RGBA_Gfx_Compositor _composite_copy_rel = { "copy_rel",
57 op_copy_rel_init, op_copy_rel_shutdown, 57 op_copy_rel_init, op_copy_rel_shutdown,
58 op_copy_rel_pixel_span_get, op_copy_rel_color_span_get, 58 op_copy_rel_pixel_span_get, op_copy_rel_color_span_get,
59 op_copy_rel_pixel_color_span_get, op_copy_rel_mask_color_span_get, 59 op_copy_rel_pixel_color_span_get, op_copy_rel_mask_color_span_get,
60 op_copy_rel_pixel_mask_span_get, 60 op_copy_rel_pixel_mask_span_get,
61 op_copy_rel_pixel_pt_get, op_copy_color_pt_get, 61 op_copy_rel_pixel_pt_get, op_copy_color_pt_get,
62 op_copy_rel_pixel_color_pt_get, op_copy_rel_mask_color_pt_get, 62 op_copy_rel_pixel_color_pt_get, op_copy_rel_mask_color_pt_get,
63 op_copy_rel_pixel_mask_pt_get 63 op_copy_rel_pixel_mask_pt_get
64 }; 64 };
65 65
@@ -233,7 +233,7 @@ op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
233 return copy_gfx_span_func_cpu(s, m, c, d); 233 return copy_gfx_span_func_cpu(s, m, c, d);
234} 234}
235 235
236static RGBA_Gfx_Pt_Func 236static RGBA_Gfx_Pt_Func
237copy_gfx_pt_func_cpu(int s, int m, int c, int d) 237copy_gfx_pt_func_cpu(int s, int m, int c, int d)
238{ 238{
239 RGBA_Gfx_Pt_Func func = NULL; 239 RGBA_Gfx_Pt_Func func = NULL;
diff --git a/legacy/evas/src/lib/engines/common/evas_op_mask_main_.c b/legacy/evas/src/lib/engines/common/evas_op_mask_main_.c
index 381f15df35..1d0b529fdf 100644
--- a/legacy/evas/src/lib/engines/common/evas_op_mask_main_.c
+++ b/legacy/evas/src/lib/engines/common/evas_op_mask_main_.c
@@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags,
18static RGBA_Gfx_Pt_Func op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 18static RGBA_Gfx_Pt_Func op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); 19static RGBA_Gfx_Pt_Func op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20 20
21static RGBA_Gfx_Compositor _composite_mask = { "mask", 21static RGBA_Gfx_Compositor _composite_mask = { "mask",
22 op_mask_init, op_mask_shutdown, 22 op_mask_init, op_mask_shutdown,
23 op_mask_pixel_span_get, op_mask_color_span_get, 23 op_mask_pixel_span_get, op_mask_color_span_get,
24 op_mask_pixel_color_span_get, op_mask_mask_color_span_get, 24 op_mask_pixel_color_span_get, op_mask_mask_color_span_get,
25 op_mask_pixel_mask_span_get, 25 op_mask_pixel_mask_span_get,
26 op_mask_pixel_pt_get, op_mask_color_pt_get, 26 op_mask_pixel_pt_get, op_mask_color_pt_get,
27 op_mask_pixel_color_pt_get, op_mask_mask_color_pt_get, 27 op_mask_pixel_color_pt_get, op_mask_mask_color_pt_get,
28 op_mask_pixel_mask_pt_get 28 op_mask_pixel_mask_pt_get
29 }; 29 };
30 30
diff --git a/legacy/evas/src/lib/engines/common/evas_op_mul_main_.c b/legacy/evas/src/lib/engines/common/evas_op_mul_main_.c
index 91500d64db..181352b99e 100644
--- a/legacy/evas/src/lib/engines/common/evas_op_mul_main_.c
+++ b/legacy/evas/src/lib/engines/common/evas_op_mul_main_.c
@@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, D
18static RGBA_Gfx_Pt_Func op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 18static RGBA_Gfx_Pt_Func op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); 19static RGBA_Gfx_Pt_Func op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20 20
21static RGBA_Gfx_Compositor _composite_mul = { "mul", 21static RGBA_Gfx_Compositor _composite_mul = { "mul",
22 op_mul_init, op_mul_shutdown, 22 op_mul_init, op_mul_shutdown,
23 op_mul_pixel_span_get, op_mul_color_span_get, 23 op_mul_pixel_span_get, op_mul_color_span_get,
24 op_mul_pixel_color_span_get, op_mul_mask_color_span_get, 24 op_mul_pixel_color_span_get, op_mul_mask_color_span_get,
25 op_mul_pixel_mask_span_get, 25 op_mul_pixel_mask_span_get,
26 op_mul_pixel_pt_get, op_mul_color_pt_get, 26 op_mul_pixel_pt_get, op_mul_color_pt_get,
27 op_mul_pixel_color_pt_get, op_mul_mask_color_pt_get, 27 op_mul_pixel_color_pt_get, op_mul_mask_color_pt_get,
28 op_mul_pixel_mask_pt_get 28 op_mul_pixel_mask_pt_get
29 }; 29 };
30 30
diff --git a/legacy/evas/src/lib/engines/common/evas_op_sub_main_.c b/legacy/evas/src/lib/engines/common/evas_op_sub_main_.c
index 83a96f0ae6..f056cfcf9c 100644
--- a/legacy/evas/src/lib/engines/common/evas_op_sub_main_.c
+++ b/legacy/evas/src/lib/engines/common/evas_op_sub_main_.c
@@ -18,13 +18,13 @@ static RGBA_Gfx_Pt_Func op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, D
18static RGBA_Gfx_Pt_Func op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 18static RGBA_Gfx_Pt_Func op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); 19static RGBA_Gfx_Pt_Func op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20 20
21static RGBA_Gfx_Compositor _composite_sub = { "sub", 21static RGBA_Gfx_Compositor _composite_sub = { "sub",
22 op_sub_init, op_sub_shutdown, 22 op_sub_init, op_sub_shutdown,
23 op_sub_pixel_span_get, op_sub_color_span_get, 23 op_sub_pixel_span_get, op_sub_color_span_get,
24 op_sub_pixel_color_span_get, op_sub_mask_color_span_get, 24 op_sub_pixel_color_span_get, op_sub_mask_color_span_get,
25 op_sub_pixel_mask_span_get, 25 op_sub_pixel_mask_span_get,
26 op_sub_pixel_pt_get, op_sub_color_pt_get, 26 op_sub_pixel_pt_get, op_sub_color_pt_get,
27 op_sub_pixel_color_pt_get, op_sub_mask_color_pt_get, 27 op_sub_pixel_color_pt_get, op_sub_mask_color_pt_get,
28 op_sub_pixel_mask_pt_get 28 op_sub_pixel_mask_pt_get
29 }; 29 };
30 30
@@ -52,13 +52,13 @@ static RGBA_Gfx_Pt_Func op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flag
52static RGBA_Gfx_Pt_Func op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 52static RGBA_Gfx_Pt_Func op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
53static RGBA_Gfx_Pt_Func op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); 53static RGBA_Gfx_Pt_Func op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
54 54
55static RGBA_Gfx_Compositor _composite_sub_rel = { "sub_rel", 55static RGBA_Gfx_Compositor _composite_sub_rel = { "sub_rel",
56 op_sub_rel_init, op_sub_rel_shutdown, 56 op_sub_rel_init, op_sub_rel_shutdown,
57 op_sub_rel_pixel_span_get, op_sub_rel_color_span_get, 57 op_sub_rel_pixel_span_get, op_sub_rel_color_span_get,
58 op_sub_rel_pixel_color_span_get, op_sub_rel_mask_color_span_get, 58 op_sub_rel_pixel_color_span_get, op_sub_rel_mask_color_span_get,
59 op_sub_rel_pixel_mask_span_get, 59 op_sub_rel_pixel_mask_span_get,
60 op_sub_rel_pixel_pt_get, op_sub_rel_color_pt_get, 60 op_sub_rel_pixel_pt_get, op_sub_rel_color_pt_get,
61 op_sub_rel_pixel_color_pt_get, op_sub_rel_mask_color_pt_get, 61 op_sub_rel_pixel_color_pt_get, op_sub_rel_mask_color_pt_get,
62 op_sub_rel_pixel_mask_pt_get 62 op_sub_rel_pixel_mask_pt_get
63 }; 63 };
64 64
@@ -216,7 +216,7 @@ op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
216 return sub_gfx_span_func_cpu(s, m, c, d); 216 return sub_gfx_span_func_cpu(s, m, c, d);
217} 217}
218 218
219static RGBA_Gfx_Pt_Func 219static RGBA_Gfx_Pt_Func
220sub_gfx_pt_func_cpu(int s, int m, int c, int d) 220sub_gfx_pt_func_cpu(int s, int m, int c, int d)
221{ 221{
222 RGBA_Gfx_Pt_Func func = NULL; 222 RGBA_Gfx_Pt_Func func = NULL;
@@ -446,7 +446,7 @@ op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
446 return sub_rel_gfx_span_func_cpu(s, m, c, d); 446 return sub_rel_gfx_span_func_cpu(s, m, c, d);
447} 447}
448 448
449static RGBA_Gfx_Pt_Func 449static RGBA_Gfx_Pt_Func
450sub_rel_gfx_pt_func_cpu(int s, int m, int c, int d) 450sub_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
451{ 451{
452 RGBA_Gfx_Pt_Func func = NULL; 452 RGBA_Gfx_Pt_Func func = NULL;
diff --git a/legacy/evas/src/lib/engines/common/evas_scale_sample.c b/legacy/evas/src/lib/engines/common/evas_scale_sample.c
index 5e29b1121e..a345aaec74 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_sample.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_sample.c
@@ -237,7 +237,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
237 237
238 /* figure out dest start ptr */ 238 /* figure out dest start ptr */
239 dst_ptr = dst_data + dst_clip_x + (dst_clip_y * dst_w); 239 dst_ptr = dst_data + dst_clip_x + (dst_clip_y * dst_w);
240 240
241 if (dc->mul.use) 241 if (dc->mul.use)
242 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); 242 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
243 else 243 else
@@ -269,7 +269,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
269 + src_region_y) * src_w); 269 + src_region_y) * src_w);
270 /* scale to dst */ 270 /* scale to dst */
271 dptr = dst_ptr; 271 dptr = dst_ptr;
272#ifdef DIRECT_SCALE 272#ifdef DIRECT_SCALE
273 if ((!src->cache_entry.flags.alpha) && 273 if ((!src->cache_entry.flags.alpha) &&
274 (!dst->cache_entry.flags.alpha) && 274 (!dst->cache_entry.flags.alpha) &&
275 (!dc->mul.use)) 275 (!dc->mul.use))
@@ -292,7 +292,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
292 } 292 }
293 } 293 }
294 else 294 else
295#endif 295#endif
296 { 296 {
297 /* a scanline buffer */ 297 /* a scanline buffer */
298 buf = alloca(dst_clip_w * sizeof(DATA32)); 298 buf = alloca(dst_clip_w * sizeof(DATA32));
diff --git a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler.c b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler.c
index e07aaee108..6cf7cc6df2 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler.c
@@ -9,7 +9,7 @@ SCALE_FUNC(RGBA_Image *src, RGBA_Image *dst,
9 DATA32 *dst_ptr; 9 DATA32 *dst_ptr;
10 int dst_jump; 10 int dst_jump;
11 int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h; 11 int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h;
12 int src_w, src_h, dst_w, dst_h; 12 int src_w, src_h, dst_w, dst_h;
13 13
14 if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) 14 if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
15 return; 15 return;
diff --git a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c
index 050ee07967..97498b0d23 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c
@@ -4,7 +4,7 @@
4 int *xapoints, *xapp; 4 int *xapoints, *xapp;
5 int *yapoints, *yapp; 5 int *yapoints, *yapp;
6 DATA32 *buf, *src_data; 6 DATA32 *buf, *src_data;
7 7
8 RGBA_Gfx_Func func; 8 RGBA_Gfx_Func func;
9 9
10 src_data = src->image.data; 10 src_data = src->image.data;
@@ -15,10 +15,10 @@
15 yapoints = scale_calc_a_points(src_region_h, dst_region_h); 15 yapoints = scale_calc_a_points(src_region_h, dst_region_h);
16 if ( (!xpoints) || (!ypoints) || (!xapoints) || (!yapoints) ) 16 if ( (!xpoints) || (!ypoints) || (!xapoints) || (!yapoints) )
17 goto done_scale_down; 17 goto done_scale_down;
18 18
19 /* a scanline buffer */ 19 /* a scanline buffer */
20 buf = alloca(dst_clip_w * sizeof(DATA32)); 20 buf = alloca(dst_clip_w * sizeof(DATA32));
21 21
22 if (dc->mul.use) 22 if (dc->mul.use)
23 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); 23 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
24 else 24 else
@@ -41,7 +41,7 @@
41 { 41 {
42#include "evas_scale_smooth_scaler_downx_downy.c" 42#include "evas_scale_smooth_scaler_downx_downy.c"
43 } 43 }
44 44
45 done_scale_down: 45 done_scale_down:
46 if (xpoints) free(xpoints); 46 if (xpoints) free(xpoints);
47 if (ypoints) free(ypoints); 47 if (ypoints) free(ypoints);
diff --git a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c
index 2a93435e56..f413b227ab 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c
@@ -8,12 +8,12 @@
8#ifdef EVAS_SLI 8#ifdef EVAS_SLI
9 int ysli = dst_clip_y; 9 int ysli = dst_clip_y;
10#endif 10#endif
11 11
12 dptr = dst_ptr; 12 dptr = dst_ptr;
13 pos = (src_region_y * src_w) + src_region_x; 13 pos = (src_region_y * src_w) + src_region_x;
14 dyy = dst_clip_y - dst_region_y; 14 dyy = dst_clip_y - dst_region_y;
15 dxx = dst_clip_x - dst_region_x; 15 dxx = dst_clip_x - dst_region_x;
16 16
17 xp = xpoints + dxx; 17 xp = xpoints + dxx;
18 yp = ypoints + dyy; 18 yp = ypoints + dyy;
19 xapp = xapoints + dxx; 19 xapp = xapoints + dxx;
@@ -33,7 +33,7 @@
33 Cx = *xapp >> 16; 33 Cx = *xapp >> 16;
34 xap = *xapp & 0xffff; 34 xap = *xapp & 0xffff;
35 pix = *yp + *xp + pos; 35 pix = *yp + *xp + pos;
36 36
37 a = (A_VAL(pix) * xap) >> 10; 37 a = (A_VAL(pix) * xap) >> 10;
38 r = (R_VAL(pix) * xap) >> 10; 38 r = (R_VAL(pix) * xap) >> 10;
39 g = (G_VAL(pix) * xap) >> 10; 39 g = (G_VAL(pix) * xap) >> 10;
@@ -85,7 +85,7 @@
85 *pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4); 85 *pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4);
86 xp++; xapp++; 86 xp++; xapp++;
87 } 87 }
88 88
89 func(buf, NULL, dc->mul.col, dptr, w); 89 func(buf, NULL, dc->mul.col, dptr, w);
90 } 90 }
91#ifdef EVAS_SLI 91#ifdef EVAS_SLI
@@ -117,7 +117,7 @@
117 Cx = *xapp >> 16; 117 Cx = *xapp >> 16;
118 xap = *xapp & 0xffff; 118 xap = *xapp & 0xffff;
119 pix = *yp + *xp + pos; 119 pix = *yp + *xp + pos;
120 120
121 r = (R_VAL(pix) * xap) >> 10; 121 r = (R_VAL(pix) * xap) >> 10;
122 g = (G_VAL(pix) * xap) >> 10; 122 g = (G_VAL(pix) * xap) >> 10;
123 b = (B_VAL(pix) * xap) >> 10; 123 b = (B_VAL(pix) * xap) >> 10;
@@ -166,7 +166,7 @@
166#ifdef EVAS_SLI 166#ifdef EVAS_SLI
167 ysli++; 167 ysli++;
168#endif 168#endif
169 169
170 dptr += dst_w; dst_clip_w = w; 170 dptr += dst_w; dst_clip_w = w;
171 yp++; yapp++; 171 yp++; yapp++;
172 xp = xpoints + dxx; 172 xp = xpoints + dxx;
@@ -174,7 +174,7 @@
174 } 174 }
175 } 175 }
176 else 176 else
177#endif 177#endif
178 { 178 {
179 while (dst_clip_h--) 179 while (dst_clip_h--)
180 { 180 {
@@ -187,7 +187,7 @@
187 Cx = *xapp >> 16; 187 Cx = *xapp >> 16;
188 xap = *xapp & 0xffff; 188 xap = *xapp & 0xffff;
189 pix = *yp + *xp + pos; 189 pix = *yp + *xp + pos;
190 190
191 r = (R_VAL(pix) * xap) >> 10; 191 r = (R_VAL(pix) * xap) >> 10;
192 g = (G_VAL(pix) * xap) >> 10; 192 g = (G_VAL(pix) * xap) >> 10;
193 b = (B_VAL(pix) * xap) >> 10; 193 b = (B_VAL(pix) * xap) >> 10;
@@ -232,13 +232,13 @@
232 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4); 232 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
233 xp++; xapp++; 233 xp++; xapp++;
234 } 234 }
235 235
236 func(buf, NULL, dc->mul.col, dptr, w); 236 func(buf, NULL, dc->mul.col, dptr, w);
237 } 237 }
238#ifdef EVAS_SLI 238#ifdef EVAS_SLI
239 ysli++; 239 ysli++;
240#endif 240#endif
241 241
242 pbuf = buf; 242 pbuf = buf;
243 dptr += dst_w; dst_clip_w = w; 243 dptr += dst_w; dst_clip_w = w;
244 yp++; yapp++; 244 yp++; yapp++;
diff --git a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c
index 26adbbf770..89cc883f2f 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c
@@ -8,7 +8,7 @@
8#ifdef EVAS_SLI 8#ifdef EVAS_SLI
9 int ysli = dst_clip_y; 9 int ysli = dst_clip_y;
10#endif 10#endif
11 11
12 dptr = dst_ptr; 12 dptr = dst_ptr;
13 pos = (src_region_y * src_w) + src_region_x; 13 pos = (src_region_y * src_w) + src_region_x;
14 dyy = dst_clip_y - dst_region_y; 14 dyy = dst_clip_y - dst_region_y;
@@ -30,11 +30,11 @@
30 { 30 {
31 Cy = *yapp >> 16; 31 Cy = *yapp >> 16;
32 yap = *yapp & 0xffff; 32 yap = *yapp & 0xffff;
33 33
34 while (dst_clip_w--) 34 while (dst_clip_w--)
35 { 35 {
36 pix = *yp + *xp + pos; 36 pix = *yp + *xp + pos;
37 37
38 a = (A_VAL(pix) * yap) >> 10; 38 a = (A_VAL(pix) * yap) >> 10;
39 r = (R_VAL(pix) * yap) >> 10; 39 r = (R_VAL(pix) * yap) >> 10;
40 g = (G_VAL(pix) * yap) >> 10; 40 g = (G_VAL(pix) * yap) >> 10;
@@ -86,7 +86,7 @@
86 *pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4); 86 *pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4);
87 xp++; xapp++; 87 xp++; xapp++;
88 } 88 }
89 89
90 func(buf, NULL, dc->mul.col, dptr, w); 90 func(buf, NULL, dc->mul.col, dptr, w);
91 } 91 }
92#ifdef EVAS_SLI 92#ifdef EVAS_SLI
@@ -114,12 +114,12 @@
114 { 114 {
115 Cy = *yapp >> 16; 115 Cy = *yapp >> 16;
116 yap = *yapp & 0xffff; 116 yap = *yapp & 0xffff;
117 117
118 pbuf = dptr; 118 pbuf = dptr;
119 while (dst_clip_w--) 119 while (dst_clip_w--)
120 { 120 {
121 pix = *yp + *xp + pos; 121 pix = *yp + *xp + pos;
122 122
123 r = (R_VAL(pix) * yap) >> 10; 123 r = (R_VAL(pix) * yap) >> 10;
124 g = (G_VAL(pix) * yap) >> 10; 124 g = (G_VAL(pix) * yap) >> 10;
125 b = (B_VAL(pix) * yap) >> 10; 125 b = (B_VAL(pix) * yap) >> 10;
@@ -175,7 +175,7 @@
175 } 175 }
176 } 176 }
177 else 177 else
178#endif 178#endif
179 { 179 {
180 while (dst_clip_h--) 180 while (dst_clip_h--)
181 { 181 {
@@ -185,11 +185,11 @@
185 { 185 {
186 Cy = *yapp >> 16; 186 Cy = *yapp >> 16;
187 yap = *yapp & 0xffff; 187 yap = *yapp & 0xffff;
188 188
189 while (dst_clip_w--) 189 while (dst_clip_w--)
190 { 190 {
191 pix = *yp + *xp + pos; 191 pix = *yp + *xp + pos;
192 192
193 r = (R_VAL(pix) * yap) >> 10; 193 r = (R_VAL(pix) * yap) >> 10;
194 g = (G_VAL(pix) * yap) >> 10; 194 g = (G_VAL(pix) * yap) >> 10;
195 b = (B_VAL(pix) * yap) >> 10; 195 b = (B_VAL(pix) * yap) >> 10;
@@ -234,7 +234,7 @@
234 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4); 234 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
235 xp++; xapp++; 235 xp++; xapp++;
236 } 236 }
237 237
238 func(buf, NULL, dc->mul.col, dptr, w); 238 func(buf, NULL, dc->mul.col, dptr, w);
239 } 239 }
240#ifdef EVAS_SLI 240#ifdef EVAS_SLI
diff --git a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c
index c9581553df..957b6a3331 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c
@@ -4,7 +4,7 @@
4#ifdef EVAS_SLI 4#ifdef EVAS_SLI
5 int ysli = dst_clip_y; 5 int ysli = dst_clip_y;
6#endif 6#endif
7 7
8 ptr = src->image.data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; 8 ptr = src->image.data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
9 if (dc->mul.use) 9 if (dc->mul.use)
10 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); 10 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
@@ -20,7 +20,7 @@
20 } 20 }
21#ifdef EVAS_SLI 21#ifdef EVAS_SLI
22 ysli++; 22 ysli++;
23#endif 23#endif
24 ptr += src_w; 24 ptr += src_w;
25 dst_ptr += dst_w; 25 dst_ptr += dst_w;
26 } 26 }
diff --git a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c
index 9b0e30deba..15f6a07cb5 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c
@@ -78,7 +78,7 @@
78 { 78 {
79 DATA32 p0, p1; 79 DATA32 p0, p1;
80 int ax; 80 int ax;
81 81
82 sx = (sxx >> 16); 82 sx = (sxx >> 16);
83 ax = 1 + ((sxx - (sx << 16)) >> 8); 83 ax = 1 + ((sxx - (sx << 16)) >> 8);
84 p0 = p1 = *(psrc + sx); 84 p0 = p1 = *(psrc + sx);
@@ -107,7 +107,7 @@
107 } 107 }
108#ifdef EVAS_SLI 108#ifdef EVAS_SLI
109 ysli++; 109 ysli++;
110#endif 110#endif
111 pdst += dst_w; 111 pdst += dst_w;
112 psrc += src_w; 112 psrc += src_w;
113 buf += buf_step; 113 buf += buf_step;
@@ -129,7 +129,7 @@
129#endif 129#endif
130 { 130 {
131 int ay; 131 int ay;
132 132
133 sy = syy >> 16; 133 sy = syy >> 16;
134 psrc = ps + (sy * src_w); 134 psrc = ps + (sy * src_w);
135 ay = 1 + ((syy - (sy << 16)) >> 8); 135 ay = 1 + ((syy - (sy << 16)) >> 8);
@@ -142,7 +142,7 @@
142 while (pbuf < pbuf_end) 142 while (pbuf < pbuf_end)
143 { 143 {
144 DATA32 p0 = *psrc, p2 = p0; 144 DATA32 p0 = *psrc, p2 = p0;
145 145
146 if ((sy + 1) < srh) 146 if ((sy + 1) < srh)
147 p2 = *(psrc + src_w); 147 p2 = *(psrc + src_w);
148#ifdef SCALE_USING_MMX 148#ifdef SCALE_USING_MMX
@@ -167,7 +167,7 @@
167 } 167 }
168#ifdef EVAS_SLI 168#ifdef EVAS_SLI
169 ysli++; 169 ysli++;
170#endif 170#endif
171 pdst += dst_w; 171 pdst += dst_w;
172 syy += dsyy; 172 syy += dsyy;
173 buf += buf_step; 173 buf += buf_step;
@@ -189,7 +189,7 @@
189#endif 189#endif
190 { 190 {
191 int ay; 191 int ay;
192 192
193 sy = syy >> 16; 193 sy = syy >> 16;
194 psrc = ps + (sy * src_w); 194 psrc = ps + (sy * src_w);
195 ay = 1 + ((syy - (sy << 16)) >> 8); 195 ay = 1 + ((syy - (sy << 16)) >> 8);
@@ -205,7 +205,7 @@
205 int ax; 205 int ax;
206 DATA32 *p, *q; 206 DATA32 *p, *q;
207 DATA32 p0, p1, p2, p3; 207 DATA32 p0, p1, p2, p3;
208 208
209 sx = sxx >> 16; 209 sx = sxx >> 16;
210 ax = 1 + ((sxx - (sx << 16)) >> 8); 210 ax = 1 + ((sxx - (sx << 16)) >> 8);
211 p = psrc + sx; q = p + src_w; 211 p = psrc + sx; q = p + src_w;
diff --git a/legacy/evas/src/lib/engines/common/evas_tiler.c b/legacy/evas/src/lib/engines/common/evas_tiler.c
index 5e3f45a623..5cee207c0d 100644
--- a/legacy/evas/src/lib/engines/common/evas_tiler.c
+++ b/legacy/evas/src/lib/engines/common/evas_tiler.c
@@ -82,13 +82,13 @@ inline void
82rect_init(rect_t *r, int x, int y, int w, int h) 82rect_init(rect_t *r, int x, int y, int w, int h)
83{ 83{
84 r->area = w * h; 84 r->area = w * h;
85 85
86 r->left = x; 86 r->left = x;
87 r->top = y; 87 r->top = y;
88 88
89 r->right = x + w; 89 r->right = x + w;
90 r->bottom = y + h; 90 r->bottom = y + h;
91 91
92 r->width = w; 92 r->width = w;
93 r->height = h; 93 r->height = h;
94} 94}
@@ -104,10 +104,10 @@ rect_list_print(const list_t rects)
104{ 104{
105 list_node_t *node; 105 list_node_t *node;
106 int len; 106 int len;
107 107
108 len = 0; 108 len = 0;
109 for (node = rects.head; node != NULL; node = node->next) len++; 109 for (node = rects.head; node != NULL; node = node->next) len++;
110 110
111 printf("["); 111 printf("[");
112 for (node = rects.head; node != NULL; node = node->next) 112 for (node = rects.head; node != NULL; node = node->next)
113 { 113 {
@@ -145,11 +145,11 @@ inline void
145rect_list_append(list_t *rects, const rect_t r) 145rect_list_append(list_t *rects, const rect_t r)
146{ 146{
147 rect_node_t *rect_node; 147 rect_node_t *rect_node;
148 148
149 rect_node = (rect_node_t *)rect_list_node_pool_get(); 149 rect_node = (rect_node_t *)rect_list_node_pool_get();
150 rect_node->rect = r; 150 rect_node->rect = r;
151 rect_node->_lst = list_node_zeroed; 151 rect_node->_lst = list_node_zeroed;
152 152
153 rect_list_append_node(rects, (list_node_t *)rect_node); 153 rect_list_append_node(rects, (list_node_t *)rect_node);
154} 154}
155 155
@@ -157,7 +157,7 @@ inline void
157rect_list_append_xywh(list_t *rects, int x, int y, int w, int h) 157rect_list_append_xywh(list_t *rects, int x, int y, int w, int h)
158{ 158{
159 rect_t r; 159 rect_t r;
160 160
161 rect_init(&r, x, y, w, h); 161 rect_init(&r, x, y, w, h);
162 rect_list_append(rects, r); 162 rect_list_append(rects, r);
163} 163}
@@ -167,7 +167,7 @@ rect_list_concat(list_t *rects, list_t *other)
167{ 167{
168 if (!other->head) 168 if (!other->head)
169 return; 169 return;
170 170
171 if (rects->tail) 171 if (rects->tail)
172 { 172 {
173 rects->tail->next = other->head; 173 rects->tail->next = other->head;
@@ -196,7 +196,7 @@ rect_list_unlink_next(list_t *rects, list_node_t *parent_node)
196 node = rects->head; 196 node = rects->head;
197 rects->head = node->next; 197 rects->head = node->next;
198 } 198 }
199 199
200 if (rects->tail == node) rects->tail = parent_node; 200 if (rects->tail == node) rects->tail = parent_node;
201 *node = list_node_zeroed; 201 *node = list_node_zeroed;
202 return node; 202 return node;
@@ -215,12 +215,12 @@ void
215rect_list_clear(list_t *rects) 215rect_list_clear(list_t *rects)
216{ 216{
217 list_node_t *node; 217 list_node_t *node;
218 218
219 node = rects->head; 219 node = rects->head;
220 while (node) 220 while (node)
221 { 221 {
222 list_node_t *aux; 222 list_node_t *aux;
223 223
224 aux = node->next; 224 aux = node->next;
225 rect_list_node_pool_put(node); 225 rect_list_node_pool_put(node);
226 node = aux; 226 node = aux;
@@ -232,21 +232,21 @@ static inline void
232_calc_intra_rect_area(const rect_t a, const rect_t b, int *width, int *height) 232_calc_intra_rect_area(const rect_t a, const rect_t b, int *width, int *height)
233{ 233{
234 int max_left, min_right, max_top, min_bottom; 234 int max_left, min_right, max_top, min_bottom;
235 235
236 if (a.left < b.left) max_left = b.left; 236 if (a.left < b.left) max_left = b.left;
237 else max_left = a.left; 237 else max_left = a.left;
238 238
239 if (a.right < b.right) min_right = a.right; 239 if (a.right < b.right) min_right = a.right;
240 else min_right = b.right; 240 else min_right = b.right;
241 241
242 *width = min_right - max_left; 242 *width = min_right - max_left;
243 243
244 if (a.top < b.top) max_top = b.top; 244 if (a.top < b.top) max_top = b.top;
245 else max_top = a.top; 245 else max_top = a.top;
246 246
247 if (a.bottom < b.bottom) min_bottom = a.bottom; 247 if (a.bottom < b.bottom) min_bottom = a.bottom;
248 else min_bottom = b.bottom; 248 else min_bottom = b.bottom;
249 249
250 *height = min_bottom - max_top; 250 *height = min_bottom - max_top;
251} 251}
252 252
@@ -254,12 +254,12 @@ static inline void
254_split_strict(list_t *dirty, const rect_t current, rect_t r) 254_split_strict(list_t *dirty, const rect_t current, rect_t r)
255{ 255{
256 int h_1, h_2, w_1, w_2; 256 int h_1, h_2, w_1, w_2;
257 257
258 h_1 = current.top - r.top; 258 h_1 = current.top - r.top;
259 h_2 = r.bottom - current.bottom; 259 h_2 = r.bottom - current.bottom;
260 w_1 = current.left - r.left; 260 w_1 = current.left - r.left;
261 w_2 = r.right - current.right; 261 w_2 = r.right - current.right;
262 262
263 if (h_1 > 0) 263 if (h_1 > 0)
264 { 264 {
265 /* .--.r (b) .---.r2 265 /* .--.r (b) .---.r2
@@ -273,7 +273,7 @@ _split_strict(list_t *dirty, const rect_t current, rect_t r)
273 r.height -= h_1; 273 r.height -= h_1;
274 r.top = current.top; 274 r.top = current.top;
275 } 275 }
276 276
277 if (h_2 > 0) 277 if (h_2 > 0)
278 { 278 {
279 /* .-------.cur (a) 279 /* .-------.cur (a)
@@ -286,7 +286,7 @@ _split_strict(list_t *dirty, const rect_t current, rect_t r)
286 rect_list_append_xywh(dirty, r.left, current.bottom, r.width, h_2); 286 rect_list_append_xywh(dirty, r.left, current.bottom, r.width, h_2);
287 r.height -= h_2; 287 r.height -= h_2;
288 } 288 }
289 289
290 if (w_1 > 0) 290 if (w_1 > 0)
291 { 291 {
292 /* (b) r .----.cur (a) 292 /* (b) r .----.cur (a)
@@ -300,7 +300,7 @@ _split_strict(list_t *dirty, const rect_t current, rect_t r)
300 /* r.width -= w_1; */ 300 /* r.width -= w_1; */
301 /* r.left = current.left; */ 301 /* r.left = current.left; */
302 } 302 }
303 303
304 if (w_2 > 0) 304 if (w_2 > 0)
305 { 305 {
306 /* .----.cur (a) 306 /* .----.cur (a)
@@ -321,16 +321,16 @@ rect_list_del_split_strict(list_t *rects, const rect_t del_r)
321{ 321{
322 list_t modified = list_zeroed; 322 list_t modified = list_zeroed;
323 list_node_t *cur_node, *prev_node; 323 list_node_t *cur_node, *prev_node;
324 324
325 prev_node = NULL; 325 prev_node = NULL;
326 cur_node = rects->head; 326 cur_node = rects->head;
327 while (cur_node) 327 while (cur_node)
328 { 328 {
329 int intra_width, intra_height; 329 int intra_width, intra_height;
330 rect_t current; 330 rect_t current;
331 331
332 current = ((rect_node_t*)cur_node)->rect; 332 current = ((rect_node_t*)cur_node)->rect;
333 333
334 _calc_intra_rect_area(del_r, current, &intra_width, &intra_height); 334 _calc_intra_rect_area(del_r, current, &intra_width, &intra_height);
335 if ((intra_width <= 0) || (intra_height <= 0)) 335 if ((intra_width <= 0) || (intra_height <= 0))
336 { 336 {
@@ -374,33 +374,33 @@ rect_list_add_split_strict(list_t *rects, list_node_t *node)
374 list_t dirty = list_zeroed; 374 list_t dirty = list_zeroed;
375 list_t new_dirty = list_zeroed; 375 list_t new_dirty = list_zeroed;
376 list_node_t *cur_node; 376 list_node_t *cur_node;
377 377
378 if (!rects->head) 378 if (!rects->head)
379 { 379 {
380 rect_list_append_node(rects, node); 380 rect_list_append_node(rects, node);
381 return; 381 return;
382 } 382 }
383 383
384 rect_list_append_node(&dirty, node); 384 rect_list_append_node(&dirty, node);
385 385
386 cur_node = rects->head; 386 cur_node = rects->head;
387 while (dirty.head) 387 while (dirty.head)
388 { 388 {
389 rect_t current; 389 rect_t current;
390 390
391 if (!cur_node) 391 if (!cur_node)
392 { 392 {
393 rect_list_concat(rects, &dirty); 393 rect_list_concat(rects, &dirty);
394 break; 394 break;
395 } 395 }
396 396
397 current = ((rect_node_t*)cur_node)->rect; 397 current = ((rect_node_t*)cur_node)->rect;
398 398
399 while (dirty.head) 399 while (dirty.head)
400 { 400 {
401 int intra_width, intra_height; 401 int intra_width, intra_height;
402 rect_t r; 402 rect_t r;
403 403
404 r = ((rect_node_t *)dirty.head)->rect; 404 r = ((rect_node_t *)dirty.head)->rect;
405 _calc_intra_rect_area(r, current, &intra_width, &intra_height); 405 _calc_intra_rect_area(r, current, &intra_width, &intra_height);
406 if ((intra_width == r.width) && (intra_height == r.height)) 406 if ((intra_width == r.width) && (intra_height == r.height))
@@ -423,7 +423,7 @@ rect_list_add_split_strict(list_t *rects, list_node_t *node)
423 tmp = rect_list_unlink_next(&dirty, NULL); 423 tmp = rect_list_unlink_next(&dirty, NULL);
424 rect_list_append_node(&new_dirty, tmp); 424 rect_list_append_node(&new_dirty, tmp);
425 } 425 }
426 else 426 else
427 { 427 {
428 _split_strict(&new_dirty, current, r); 428 _split_strict(&new_dirty, current, r);
429 rect_list_del_next(&dirty, NULL); 429 rect_list_del_next(&dirty, NULL);
@@ -431,7 +431,7 @@ rect_list_add_split_strict(list_t *rects, list_node_t *node)
431 } 431 }
432 dirty = new_dirty; 432 dirty = new_dirty;
433 new_dirty = list_zeroed; 433 new_dirty = list_zeroed;
434 434
435 cur_node = cur_node->next; 435 cur_node = cur_node->next;
436 } 436 }
437} 437}
@@ -453,7 +453,7 @@ _calc_intra_outer_rect_area(const rect_t a, const rect_t b,
453 max_left = a.left; 453 max_left = a.left;
454 min_left = b.left; 454 min_left = b.left;
455 } 455 }
456 456
457 if (a.right < b.right) 457 if (a.right < b.right)
458 { 458 {
459 min_right = a.right; 459 min_right = a.right;
@@ -464,15 +464,15 @@ _calc_intra_outer_rect_area(const rect_t a, const rect_t b,
464 min_right = b.right; 464 min_right = b.right;
465 max_right = a.right; 465 max_right = a.right;
466 } 466 }
467 467
468 intra->left = max_left; 468 intra->left = max_left;
469 intra->right = min_right; 469 intra->right = min_right;
470 intra->width = min_right - max_left; 470 intra->width = min_right - max_left;
471 471
472 outer->left = min_left; 472 outer->left = min_left;
473 outer->right = max_right; 473 outer->right = max_right;
474 outer->width = max_right - min_left; 474 outer->width = max_right - min_left;
475 475
476 if (a.top < b.top) 476 if (a.top < b.top)
477 { 477 {
478 max_top = b.top; 478 max_top = b.top;
@@ -483,7 +483,7 @@ _calc_intra_outer_rect_area(const rect_t a, const rect_t b,
483 max_top = a.top; 483 max_top = a.top;
484 min_top = b.top; 484 min_top = b.top;
485 } 485 }
486 486
487 if (a.bottom < b.bottom) 487 if (a.bottom < b.bottom)
488 { 488 {
489 min_bottom = a.bottom; 489 min_bottom = a.bottom;
@@ -502,7 +502,7 @@ _calc_intra_outer_rect_area(const rect_t a, const rect_t b,
502 intra->area = intra->width * intra->height; 502 intra->area = intra->width * intra->height;
503 else 503 else
504 intra->area = 0; 504 intra->area = 0;
505 505
506 outer->top = min_top; 506 outer->top = min_top;
507 outer->bottom = max_bottom; 507 outer->bottom = max_bottom;
508 outer->height = max_bottom - min_top; 508 outer->height = max_bottom - min_top;
@@ -520,14 +520,14 @@ static inline int
520_split_fuzzy(list_t *dirty, const rect_t a, rect_t *b) 520_split_fuzzy(list_t *dirty, const rect_t a, rect_t *b)
521{ 521{
522 int h_1, h_2, w_1, w_2, action; 522 int h_1, h_2, w_1, w_2, action;
523 523
524 h_1 = a.top - b->top; 524 h_1 = a.top - b->top;
525 h_2 = b->bottom - a.bottom; 525 h_2 = b->bottom - a.bottom;
526 w_1 = a.left - b->left; 526 w_1 = a.left - b->left;
527 w_2 = b->right - a.right; 527 w_2 = b->right - a.right;
528 528
529 action = SPLIT_FUZZY_ACTION_NONE; 529 action = SPLIT_FUZZY_ACTION_NONE;
530 530
531 if (h_1 > 0) 531 if (h_1 > 0)
532 { 532 {
533 /* .--.r (b) .---.r2 533 /* .--.r (b) .---.r2
@@ -542,7 +542,7 @@ _split_fuzzy(list_t *dirty, const rect_t a, rect_t *b)
542 b->top = a.top; 542 b->top = a.top;
543 action = SPLIT_FUZZY_ACTION_SPLIT; 543 action = SPLIT_FUZZY_ACTION_SPLIT;
544 } 544 }
545 545
546 if (h_2 > 0) 546 if (h_2 > 0)
547 { 547 {
548 /* .-------.cur (a) 548 /* .-------.cur (a)
@@ -556,7 +556,7 @@ _split_fuzzy(list_t *dirty, const rect_t a, rect_t *b)
556 b->height -= h_2; 556 b->height -= h_2;
557 action = SPLIT_FUZZY_ACTION_SPLIT; 557 action = SPLIT_FUZZY_ACTION_SPLIT;
558 } 558 }
559 559
560 if (((w_1 > 0) || (w_2 > 0)) && (a.height == b->height)) 560 if (((w_1 > 0) || (w_2 > 0)) && (a.height == b->height))
561 return SPLIT_FUZZY_ACTION_MERGE; 561 return SPLIT_FUZZY_ACTION_MERGE;
562 562
@@ -574,7 +574,7 @@ _split_fuzzy(list_t *dirty, const rect_t a, rect_t *b)
574 /* b->left = a.left; */ 574 /* b->left = a.left; */
575 action = SPLIT_FUZZY_ACTION_SPLIT; 575 action = SPLIT_FUZZY_ACTION_SPLIT;
576 } 576 }
577 577
578 if (w_2 > 0) 578 if (w_2 > 0)
579 { 579 {
580 /* .----.cur (a) 580 /* .----.cur (a)
@@ -589,7 +589,7 @@ _split_fuzzy(list_t *dirty, const rect_t a, rect_t *b)
589 /* b->width -= w_2; */ 589 /* b->width -= w_2; */
590 action = SPLIT_FUZZY_ACTION_SPLIT; 590 action = SPLIT_FUZZY_ACTION_SPLIT;
591 } 591 }
592 592
593 return action; 593 return action;
594} 594}
595 595
@@ -598,25 +598,25 @@ rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error)
598{ 598{
599 list_t dirty = list_zeroed; 599 list_t dirty = list_zeroed;
600 list_node_t *old_last; 600 list_node_t *old_last;
601 601
602 old_last = rects->tail; 602 old_last = rects->tail;
603 603
604 if (!rects->head) 604 if (!rects->head)
605 { 605 {
606 rect_list_append_node(rects, node); 606 rect_list_append_node(rects, node);
607 return old_last; 607 return old_last;
608 } 608 }
609 609
610 rect_list_append_node(&dirty, node); 610 rect_list_append_node(&dirty, node);
611 while (dirty.head) 611 while (dirty.head)
612 { 612 {
613 list_node_t *d_node, *cur_node, *prev_cur_node; 613 list_node_t *d_node, *cur_node, *prev_cur_node;
614 int keep_dirty; 614 int keep_dirty;
615 rect_t r; 615 rect_t r;
616 616
617 d_node = rect_list_unlink_next(&dirty, NULL); 617 d_node = rect_list_unlink_next(&dirty, NULL);
618 r = ((rect_node_t *)d_node)->rect; 618 r = ((rect_node_t *)d_node)->rect;
619 619
620 prev_cur_node = NULL; 620 prev_cur_node = NULL;
621 cur_node = rects->head; 621 cur_node = rects->head;
622 keep_dirty = 1; 622 keep_dirty = 1;
@@ -624,12 +624,12 @@ rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error)
624 { 624 {
625 int area, action; 625 int area, action;
626 rect_t current, intra, outer; 626 rect_t current, intra, outer;
627 627
628 current = ((rect_node_t *)cur_node)->rect; 628 current = ((rect_node_t *)cur_node)->rect;
629 629
630 _calc_intra_outer_rect_area(r, current, &intra, &outer); 630 _calc_intra_outer_rect_area(r, current, &intra, &outer);
631 area = current.area + r.area - intra.area; 631 area = current.area + r.area - intra.area;
632 632
633 if ((intra.width == r.width) && (intra.height == r.height)) 633 if ((intra.width == r.width) && (intra.height == r.height))
634 { 634 {
635 /* .-------.cur 635 /* .-------.cur
@@ -666,14 +666,14 @@ rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error)
666 * merge them, remove both and add merged 666 * merge them, remove both and add merged
667 */ 667 */
668 rect_node_t *n; 668 rect_node_t *n;
669 669
670 if (old_last == cur_node) 670 if (old_last == cur_node)
671 old_last = prev_cur_node; 671 old_last = prev_cur_node;
672 672
673 n = (rect_node_t *)rect_list_unlink_next(rects, prev_cur_node); 673 n = (rect_node_t *)rect_list_unlink_next(rects, prev_cur_node);
674 n->rect = outer; 674 n->rect = outer;
675 rect_list_append_node(&dirty, (list_node_t *)n); 675 rect_list_append_node(&dirty, (list_node_t *)n);
676 676
677 keep_dirty = 0; 677 keep_dirty = 0;
678 break; 678 break;
679 } 679 }
@@ -697,13 +697,13 @@ rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error)
697 { 697 {
698 /* horizontal merge is possible: remove both, add merged */ 698 /* horizontal merge is possible: remove both, add merged */
699 rect_node_t *n; 699 rect_node_t *n;
700 700
701 if (old_last == cur_node) 701 if (old_last == cur_node)
702 old_last = prev_cur_node; 702 old_last = prev_cur_node;
703 703
704 n = (rect_node_t *) 704 n = (rect_node_t *)
705 rect_list_unlink_next(rects, prev_cur_node); 705 rect_list_unlink_next(rects, prev_cur_node);
706 706
707 n->rect.left = outer.left; 707 n->rect.left = outer.left;
708 n->rect.width = outer.width; 708 n->rect.width = outer.width;
709 n->rect.right = outer.right; 709 n->rect.right = outer.right;
@@ -721,12 +721,12 @@ rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error)
721 printf("Should not get here!\n"); 721 printf("Should not get here!\n");
722 abort(); 722 abort();
723 } 723 }
724 724
725 keep_dirty = 0; 725 keep_dirty = 0;
726 break; 726 break;
727 } 727 }
728 } 728 }
729 729
730 if (UNLIKELY(keep_dirty)) rect_list_append_node(rects, d_node); 730 if (UNLIKELY(keep_dirty)) rect_list_append_node(rects, d_node);
731 else rect_list_node_pool_put(d_node); 731 else rect_list_node_pool_put(d_node);
732 } 732 }
@@ -739,27 +739,27 @@ _calc_outer_rect_area(const rect_t a, const rect_t b, rect_t *outer)
739{ 739{
740 int min_left, max_right; 740 int min_left, max_right;
741 int min_top, max_bottom; 741 int min_top, max_bottom;
742 742
743 if (a.left < b.left) min_left = a.left; 743 if (a.left < b.left) min_left = a.left;
744 else min_left = b.left; 744 else min_left = b.left;
745 745
746 if (a.right < b.right) max_right = b.right; 746 if (a.right < b.right) max_right = b.right;
747 else max_right = a.right; 747 else max_right = a.right;
748 748
749 outer->left = min_left; 749 outer->left = min_left;
750 outer->right = max_right; 750 outer->right = max_right;
751 outer->width = max_right - min_left; 751 outer->width = max_right - min_left;
752 752
753 if (a.top < b.top) min_top = a.top; 753 if (a.top < b.top) min_top = a.top;
754 else min_top = b.top; 754 else min_top = b.top;
755 755
756 if (a.bottom < b.bottom) max_bottom = b.bottom; 756 if (a.bottom < b.bottom) max_bottom = b.bottom;
757 else max_bottom = a.bottom; 757 else max_bottom = a.bottom;
758 758
759 outer->top = min_top; 759 outer->top = min_top;
760 outer->bottom = max_bottom; 760 outer->bottom = max_bottom;
761 outer->height = max_bottom - min_top; 761 outer->height = max_bottom - min_top;
762 762
763 outer->area = outer->width * outer->height; 763 outer->area = outer->width * outer->height;
764} 764}
765 765
@@ -771,9 +771,9 @@ rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error)
771 list_node_t *node, *parent_node; 771 list_node_t *node, *parent_node;
772 rect_t r1; 772 rect_t r1;
773 int merged; 773 int merged;
774 774
775 r1 = ((rect_node_t *)to_merge->head)->rect; 775 r1 = ((rect_node_t *)to_merge->head)->rect;
776 776
777 merged = 0; 777 merged = 0;
778 parent_node = NULL; 778 parent_node = NULL;
779 node = rects->head; 779 node = rects->head;
@@ -781,9 +781,9 @@ rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error)
781 { 781 {
782 rect_t r2, outer; 782 rect_t r2, outer;
783 int area; 783 int area;
784 784
785 r2 = ((rect_node_t *)node)->rect; 785 r2 = ((rect_node_t *)node)->rect;
786 786
787 _calc_outer_rect_area(r1, r2, &outer); 787 _calc_outer_rect_area(r1, r2, &outer);
788 area = r1.area + r2.area; /* intra area is taken as 0 */ 788 area = r1.area + r2.area; /* intra area is taken as 0 */
789 if (outer.area - area <= accepted_error) 789 if (outer.area - area <= accepted_error)
@@ -793,18 +793,18 @@ rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error)
793 * actually r3 uses r2 instance, saves memory 793 * actually r3 uses r2 instance, saves memory
794 */ 794 */
795 rect_node_t *n; 795 rect_node_t *n;
796 796
797 n = (rect_node_t *)rect_list_unlink_next(rects, parent_node); 797 n = (rect_node_t *)rect_list_unlink_next(rects, parent_node);
798 n->rect = outer; 798 n->rect = outer;
799 rect_list_append_node(to_merge, (list_node_t *)n); 799 rect_list_append_node(to_merge, (list_node_t *)n);
800 merged = 1; 800 merged = 1;
801 break; 801 break;
802 } 802 }
803 803
804 parent_node = node; 804 parent_node = node;
805 node = node->next; 805 node = node->next;
806 } 806 }
807 807
808 if (!merged) 808 if (!merged)
809 { 809 {
810 list_node_t *n; 810 list_node_t *n;
@@ -823,18 +823,18 @@ rect_list_add_split_fuzzy_and_merge(list_t *rects,
823 int merge_accepted_error) 823 int merge_accepted_error)
824{ 824{
825 list_node_t *n; 825 list_node_t *n;
826 826
827 n = rect_list_add_split_fuzzy(rects, node, split_accepted_error); 827 n = rect_list_add_split_fuzzy(rects, node, split_accepted_error);
828 if (n && n->next) 828 if (n && n->next)
829 { 829 {
830 list_t to_merge; 830 list_t to_merge;
831 831
832 /* split list into 2 segments, already merged and to merge */ 832 /* split list into 2 segments, already merged and to merge */
833 to_merge.head = n->next; 833 to_merge.head = n->next;
834 to_merge.tail = rects->tail; 834 to_merge.tail = rects->tail;
835 rects->tail = n; 835 rects->tail = n;
836 n->next = NULL; 836 n->next = NULL;
837 837
838 rect_list_merge_rects(rects, &to_merge, merge_accepted_error); 838 rect_list_merge_rects(rects, &to_merge, merge_accepted_error);
839 } 839 }
840} 840}
@@ -991,7 +991,7 @@ evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h)
991 evas_common_regionbuf_span_del(tb->rb, x, x + w - 1, y + i); 991 evas_common_regionbuf_span_del(tb->rb, x, x + w - 1, y + i);
992#elif defined(EVAS_RECT_SPLIT) 992#elif defined(EVAS_RECT_SPLIT)
993 rect_t r; 993 rect_t r;
994 994
995 if (!tb->rects.head) return 0; 995 if (!tb->rects.head) return 0;
996 if ((w <= 0) || (h <= 0)) return 0; 996 if ((w <= 0) || (h <= 0)) return 0;
997 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); 997 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h);
@@ -1005,7 +1005,7 @@ evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h)
1005 w >>= 1; 1005 w >>= 1;
1006 h -= 1; 1006 h -= 1;
1007 h >>= 1; 1007 h >>= 1;
1008 1008
1009 if ((w <= 0) || (h <= 0)) return 0; 1009 if ((w <= 0) || (h <= 0)) return 0;
1010 1010
1011 rect_init(&r, x, y, w, h); 1011 rect_init(&r, x, y, w, h);