summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_draw_main.c8
-rw-r--r--legacy/evas/src/lib/engines/common/evas_font_draw.c90
-rw-r--r--legacy/evas/src/lib/engines/common/evas_gradient_main.c13
-rw-r--r--legacy/evas/src/lib/engines/common/evas_line_main.c65
-rw-r--r--legacy/evas/src/lib/engines/common/evas_pipe.c159
-rw-r--r--legacy/evas/src/lib/engines/common/evas_polygon_main.c9
-rw-r--r--legacy/evas/src/lib/engines/common/evas_rectangle_main.c7
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_sample.c49
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c260
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c369
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c265
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c15
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c282
-rw-r--r--legacy/evas/src/lib/include/evas_common.h17
14 files changed, 923 insertions, 685 deletions
diff --git a/legacy/evas/src/lib/engines/common/evas_draw_main.c b/legacy/evas/src/lib/engines/common/evas_draw_main.c
index 0516d61db0..e67ddd02b0 100644
--- a/legacy/evas/src/lib/engines/common/evas_draw_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_draw_main.c
@@ -36,6 +36,7 @@ evas_common_draw_context_new(void)
36 RGBA_Draw_Context *dc; 36 RGBA_Draw_Context *dc;
37 37
38 dc = calloc(1, sizeof(RGBA_Draw_Context)); 38 dc = calloc(1, sizeof(RGBA_Draw_Context));
39 dc->sli.h = 1;
39 return dc; 40 return dc;
40} 41}
41 42
@@ -543,3 +544,10 @@ evas_common_draw_context_set_render_op(RGBA_Draw_Context *dc , int op)
543{ 544{
544 dc->render_op = op; 545 dc->render_op = op;
545} 546}
547
548EAPI void
549evas_common_draw_context_set_sli(RGBA_Draw_Context *dc, int y, int h)
550{
551 dc->sli.y = y;
552 dc->sli.h = h;
553}
diff --git a/legacy/evas/src/lib/engines/common/evas_font_draw.c b/legacy/evas/src/lib/engines/common/evas_font_draw.c
index aae41df0e0..be3bb4980f 100644
--- a/legacy/evas/src/lib/engines/common/evas_font_draw.c
+++ b/legacy/evas/src/lib/engines/common/evas_font_draw.c
@@ -259,22 +259,27 @@ evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int
259 in_w = 0; 259 in_w = 0;
260 dx = chr_x; 260 dx = chr_x;
261 dy = y - (chr_y - i - y); 261 dy = y - (chr_y - i - y);
262 if ((dx < (ext_x + ext_w)) && 262#ifdef EVAS_SLI
263 (dy >= (ext_y)) && 263 if (((dy) % dc->sli.h) == dc->sli.y)
264 (dy < (ext_y + ext_h))) 264#endif
265 { 265 {
266 if (dx + w > (ext_x + ext_w)) 266 if ((dx < (ext_x + ext_w)) &&
267 in_w += (dx + w) - (ext_x + ext_w); 267 (dy >= (ext_y)) &&
268 if (dx < ext_x) 268 (dy < (ext_y + ext_h)))
269 { 269 {
270 in_w += ext_x - dx; 270 if (dx + w > (ext_x + ext_w))
271 in_x = ext_x - dx; 271 in_w += (dx + w) - (ext_x + ext_w);
272 dx = ext_x; 272 if (dx < ext_x)
273 } 273 {
274 if (in_w < w) 274 in_w += ext_x - dx;
275 { 275 in_x = ext_x - dx;
276 func(NULL, data + (i * j) + in_x, dc->col.col, 276 dx = ext_x;
277 im + (dy * im_w) + dx, w - in_w); 277 }
278 if (in_w < w)
279 {
280 func(NULL, data + (i * j) + in_x, dc->col.col,
281 im + (dy * im_w) + dx, w - in_w);
282 }
278 } 283 }
279 } 284 }
280 } 285 }
@@ -295,36 +300,41 @@ evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int
295 in_w = 0; 300 in_w = 0;
296 dx = chr_x; 301 dx = chr_x;
297 dy = y - (chr_y - i - y); 302 dy = y - (chr_y - i - y);
298 tp = tmpbuf; 303#ifdef EVAS_SLI
299 dp = data + (i * fg->glyph_out->bitmap.pitch); 304 if (((dy) % dc->sli.h) == dc->sli.y)
300 for (bi = 0; bi < w; bi += 8) 305#endif
301 {
302 bits = *dp;
303 if ((w - bi) < 8) end = w - bi;
304 else end = 8;
305 for (bj = 0; bj < end; bj++)
306 {
307 *tp = bitrepl[(bits >> (7 - bj)) & 0x1];
308 tp++;
309 }
310 dp++;
311 }
312 if ((dx < (ext_x + ext_w)) &&
313 (dy >= (ext_y)) &&
314 (dy < (ext_y + ext_h)))
315 { 306 {
316 if (dx + w > (ext_x + ext_w)) 307 tp = tmpbuf;
317 in_w += (dx + w) - (ext_x + ext_w); 308 dp = data + (i * fg->glyph_out->bitmap.pitch);
318 if (dx < ext_x) 309 for (bi = 0; bi < w; bi += 8)
319 { 310 {
320 in_w += ext_x - dx; 311 bits = *dp;
321 in_x = ext_x - dx; 312 if ((w - bi) < 8) end = w - bi;
322 dx = ext_x; 313 else end = 8;
314 for (bj = 0; bj < end; bj++)
315 {
316 *tp = bitrepl[(bits >> (7 - bj)) & 0x1];
317 tp++;
318 }
319 dp++;
323 } 320 }
324 if (in_w < w) 321 if ((dx < (ext_x + ext_w)) &&
322 (dy >= (ext_y)) &&
323 (dy < (ext_y + ext_h)))
325 { 324 {
326 func(NULL, tmpbuf + in_x, dc->col.col, 325 if (dx + w > (ext_x + ext_w))
327 im + (dy * im_w) + dx, w - in_w); 326 in_w += (dx + w) - (ext_x + ext_w);
327 if (dx < ext_x)
328 {
329 in_w += ext_x - dx;
330 in_x = ext_x - dx;
331 dx = ext_x;
332 }
333 if (in_w < w)
334 {
335 func(NULL, tmpbuf + in_x, dc->col.col,
336 im + (dy * im_w) + dx, w - in_w);
337 }
328 } 338 }
329 } 339 }
330 } 340 }
diff --git a/legacy/evas/src/lib/engines/common/evas_gradient_main.c b/legacy/evas/src/lib/engines/common/evas_gradient_main.c
index 0f0c517238..8b0704c205 100644
--- a/legacy/evas/src/lib/engines/common/evas_gradient_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_gradient_main.c
@@ -526,10 +526,15 @@ evas_common_gradient_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
526 buf = pdst; 526 buf = pdst;
527 while (pdst < dst_end) 527 while (pdst < dst_end)
528 { 528 {
529 gfunc(map, len, buf, mask, w, xoff, yoff, axx, axy, ayx, ayy, gdata); 529#ifdef EVAS_SLI
530 if (!direct_copy) 530 if (((yoff + y) % dc->sli.h) == dc->sli.y)
531 bfunc(buf, mask, 0, pdst, w); 531#endif
532 evas_common_cpu_end_opt(); 532 {
533 gfunc(map, len, buf, mask, w, xoff, yoff, axx, axy, ayx, ayy, gdata);
534 if (!direct_copy)
535 bfunc(buf, mask, 0, pdst, w);
536 evas_common_cpu_end_opt();
537 }
533 buf += buf_step; 538 buf += buf_step;
534 pdst += dst->image->w; 539 pdst += dst->image->w;
535 yoff++; 540 yoff++;
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 c69d021575..5026bbd621 100644
--- a/legacy/evas/src/lib/engines/common/evas_line_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_line_main.c
@@ -152,24 +152,29 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
152 152
153 if (dy == 0) 153 if (dy == 0)
154 { 154 {
155 if ((y0 >= ty) && (y0 <= by)) 155#ifdef EVAS_SLI
156 if (((y0) % dc->sli.h) == dc->sli.y)
157#endif
156 { 158 {
157 if (dx < 0) 159 if ((y0 >= ty) && (y0 <= by))
158 { 160 {
159 int tmp = x1; 161 if (dx < 0)
162 {
163 int tmp = x1;
164
165 x1 = x0;
166 x0 = tmp;
167 }
160 168
161 x1 = x0; 169 if (x0 < lx) x0 = lx;
162 x0 = tmp; 170 if (x1 > rx) x1 = rx;
171
172 len = x1 - x0 + 1;
173 p = dst->image->data + (dstw * y0) + x0;
174 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op);
175 if (sfunc)
176 sfunc(NULL, NULL, color, p, len);
163 } 177 }
164
165 if (x0 < lx) x0 = lx;
166 if (x1 > rx) x1 = rx;
167
168 len = x1 - x0 + 1;
169 p = dst->image->data + (dstw * y0) + x0;
170 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op);
171 if (sfunc)
172 sfunc(NULL, NULL, color, p, len);
173 } 178 }
174 return; 179 return;
175 } 180 }
@@ -188,7 +193,12 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
188 p = dst->image->data + (dstw * y0) + x0; 193 p = dst->image->data + (dstw * y0) + x0;
189 while (len--) 194 while (len--)
190 { 195 {
191 pfunc(0, 255, color, p); 196#ifdef EVAS_SLI
197 if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
198#endif
199 {
200 pfunc(0, 255, color, p);
201 }
192 p += dstw; 202 p += dstw;
193 } 203 }
194 } 204 }
@@ -273,7 +283,12 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
273 283
274 while (len--) 284 while (len--)
275 { 285 {
276 pfunc(0, 255, color, p); 286#ifdef EVAS_SLI
287 if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
288#endif
289 {
290 pfunc(0, 255, color, p);
291 }
277 p += dstw; 292 p += dstw;
278 } 293 }
279 } 294 }
@@ -486,8 +501,13 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
486 if ((py < 0) && (dely < 0)) return; 501 if ((py < 0) && (dely < 0)) return;
487 if ((py > by) && (dely > 0)) return; 502 if ((py > by) && (dely > 0)) return;
488 } 503 }
489 if (IN_RANGE(px, py, clw, clh)) 504#ifdef EVAS_SLI
490 pfunc(0, 255, color, p); 505 if (((py) % dc->sli.h) == dc->sli.y)
506#endif
507 {
508 if (IN_RANGE(px, py, clw, clh))
509 pfunc(0, 255, color, p);
510 }
491 yy += dyy; 511 yy += dyy;
492 px++; 512 px++;
493 p++; 513 p++;
@@ -514,8 +534,13 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
514 if ((px < 0) && (delx < 0)) return; 534 if ((px < 0) && (delx < 0)) return;
515 if ((px > rx) && (delx > 0)) return; 535 if ((px > rx) && (delx > 0)) return;
516 } 536 }
517 if (IN_RANGE(px, py, clw, clh)) 537#ifdef EVAS_SLI
518 pfunc(0, 255, color, p); 538 if (((py) % dc->sli.h) == dc->sli.y)
539#endif
540 {
541 if (IN_RANGE(px, py, clw, clh))
542 pfunc(0, 255, color, p);
543 }
519 xx += dxx; 544 xx += dxx;
520 py++; 545 py++;
521 p += dstw; 546 p += dstw;
diff --git a/legacy/evas/src/lib/engines/common/evas_pipe.c b/legacy/evas/src/lib/engines/common/evas_pipe.c
index 88eecb7597..37e31dcaf8 100644
--- a/legacy/evas/src/lib/engines/common/evas_pipe.c
+++ b/legacy/evas/src/lib/engines/common/evas_pipe.c
@@ -62,13 +62,6 @@ evas_common_pipe_op_free(RGBA_Pipe_Op *op)
62} 62}
63 63
64/* main api calls */ 64/* main api calls */
65EAPI void
66evas_common_pipe_begin(RGBA_Image *im)
67{
68 /* FIXME: PTHREAD start any processing threads and lock - otherwise do
69 * nothing */
70}
71
72#ifdef BUILD_PTHREAD 65#ifdef BUILD_PTHREAD
73typedef struct _Thinfo 66typedef struct _Thinfo
74{ 67{
@@ -118,6 +111,77 @@ evas_common_pipe_thread(void *data)
118} 111}
119#endif 112#endif
120 113
114#ifdef BUILD_PTHREAD
115static int thread_num = 0;
116static Thinfo thinfo[TH_MAX];
117static pthread_barrier_t thbarrier[2];
118#endif
119
120EAPI void
121evas_common_pipe_begin(RGBA_Image *im)
122{
123#ifdef BUILD_PTHREAD
124 int i, y, h;
125
126 if (thread_num == 0)
127 {
128 int cpunum;
129
130 cpunum = evas_common_cpu_count();
131 thread_num = cpunum;
132 pthread_barrier_init(&(thbarrier[0]), NULL, thread_num + 1);
133 for (i = 0; i < thread_num; i++)
134 {
135 pthread_attr_t attr;
136 cpu_set_t cpu;
137
138 pthread_attr_init(&attr);
139 CPU_ZERO(&cpu);
140 CPU_SET(i % cpunum, &cpu);
141 pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
142 thinfo[i].thread_num = i;
143 thinfo[i].info = NULL;
144 thinfo[i].barrier = thbarrier;
145 /* setup initial locks */
146 pthread_create(&(thinfo[i].thread_id), &attr,
147 evas_common_pipe_thread, &(thinfo[i]));
148 }
149 }
150 y = 0;
151 h = im->image->h / thread_num;
152 if (h < 1) h = 1;
153 for (i = 0; i < thread_num; i++)
154 {
155 RGBA_Pipe_Thread_Info *info;
156
157// if (y >= im->image->h) break;
158 info = calloc(1, sizeof(RGBA_Pipe_Thread_Info));
159 info->im = im;
160#ifdef EVAS_SLI
161 info->x = 0;
162 info->w = im->image->w;
163 info->y = i;
164 info->h = thread_num;
165#else
166 info->x = 0;
167 info->y = y;
168 info->w = im->image->w;
169 if (i == (thread_num - 1))
170 info->h = im->image->h - y;
171 else
172 info->h = h;
173 y += info->h;
174#endif
175 thinfo[i].info = info;
176 /* send startsignal */
177// printf("START %i\n", i);
178 }
179 pthread_barrier_init(&(thbarrier[1]), NULL, thread_num + 1);
180 pthread_barrier_wait(&(thbarrier[0]));
181 pthread_barrier_destroy(&(thbarrier[0]));
182#endif
183}
184
121EAPI void 185EAPI void
122evas_common_pipe_flush(RGBA_Image *im) 186evas_common_pipe_flush(RGBA_Image *im)
123{ 187{
@@ -130,60 +194,9 @@ evas_common_pipe_flush(RGBA_Image *im)
130 /* FIXME: PTHREAD join all threads here (if not finished) or begin then join 194 /* FIXME: PTHREAD join all threads here (if not finished) or begin then join
131 * otherwise just process pipe */ 195 * otherwise just process pipe */
132 { 196 {
133 static int thread_num = 0; 197 pthread_barrier_init(&(thbarrier[0]), NULL, thread_num + 1);
134 static Thinfo thinfo[TH_MAX]; 198 pthread_barrier_wait(&(thbarrier[1]));
135 static pthread_barrier_t barrier[2]; 199 pthread_barrier_destroy(&(thbarrier[1]));
136
137 if (thread_num == 0)
138 {
139 thread_num = evas_common_cpu_count();
140 pthread_barrier_init(&(barrier[0]), NULL, thread_num + 1);
141 for (i = 0; i < thread_num; i++)
142 {
143 pthread_attr_t attr;
144 cpu_set_t cpu;
145
146 pthread_attr_init(&attr);
147 CPU_ZERO(&cpu);
148 CPU_SET(i, &cpu);
149 pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
150 thinfo[i].thread_num = i;
151 thinfo[i].info = NULL;
152 thinfo[i].barrier = barrier;
153 /* setup initial locks */
154 pthread_create(&(thinfo[i].thread_id), &attr,
155 evas_common_pipe_thread, &(thinfo[i]));
156 }
157 }
158 y = 0;
159 h = im->image->h / thread_num;
160 if (h < 1) h = 1;
161 for (i = 0; i < thread_num; i++)
162 {
163 RGBA_Pipe_Thread_Info *info;
164
165// if (y >= im->image->h) break;
166 info = calloc(1, sizeof(RGBA_Pipe_Thread_Info));
167 info->im = im;
168 info->x = 0;
169 info->y = y;
170 info->w = im->image->w;
171 if (i == (thread_num - 1))
172 info->h = im->image->h - y;
173 else
174 info->h = h;
175 y += info->h;
176 thinfo[i].info = info;
177 /* send startsignal */
178// printf("START %i\n", i);
179 }
180 pthread_barrier_init(&(barrier[1]), NULL, thread_num + 1);
181 pthread_barrier_wait(&(barrier[0]));
182 pthread_barrier_destroy(&(barrier[0]));
183
184 pthread_barrier_init(&(barrier[0]), NULL, thread_num + 1);
185 pthread_barrier_wait(&(barrier[1]));
186 pthread_barrier_destroy(&(barrier[1]));
187// printf("DONE\n"); 200// printf("DONE\n");
188 } 201 }
189 202
@@ -238,7 +251,11 @@ evas_common_pipe_rectangle_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_
238 RGBA_Draw_Context context; 251 RGBA_Draw_Context context;
239 252
240 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); 253 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
254#ifdef EVAS_SLI
255 evas_common_draw_context_set_sli(&(context), info->y, info->h);
256#else
241 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); 257 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
258#endif
242 evas_common_rectangle_draw(dst, &(context), 259 evas_common_rectangle_draw(dst, &(context),
243 op->op.rect.x, op->op.rect.y, 260 op->op.rect.x, op->op.rect.y,
244 op->op.rect.w, op->op.rect.h); 261 op->op.rect.w, op->op.rect.h);
@@ -276,7 +293,11 @@ evas_common_pipe_line_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
276 RGBA_Draw_Context context; 293 RGBA_Draw_Context context;
277 294
278 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); 295 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
296#ifdef EVAS_SLI
297 evas_common_draw_context_set_sli(&(context), info->y, info->h);
298#else
279 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); 299 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
300#endif
280 evas_common_line_draw(dst, &(context), 301 evas_common_line_draw(dst, &(context),
281 op->op.line.x0, op->op.line.y0, 302 op->op.line.x0, op->op.line.y0,
282 op->op.line.x1, op->op.line.y1); 303 op->op.line.x1, op->op.line.y1);
@@ -327,7 +348,11 @@ evas_common_pipe_poly_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
327 RGBA_Draw_Context context; 348 RGBA_Draw_Context context;
328 349
329 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); 350 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
351#ifdef EVAS_SLI
352 evas_common_draw_context_set_sli(&(context), info->y, info->h);
353#else
330 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); 354 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
355#endif
331 evas_common_polygon_draw(dst, &(context), 356 evas_common_polygon_draw(dst, &(context),
332 op->op.poly.points); 357 op->op.poly.points);
333 } 358 }
@@ -379,7 +404,11 @@ evas_common_pipe_grad_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
379 RGBA_Draw_Context context; 404 RGBA_Draw_Context context;
380 405
381 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); 406 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
407#ifdef EVAS_SLI
408 evas_common_draw_context_set_sli(&(context), info->y, info->h);
409#else
382 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); 410 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
411#endif
383 evas_common_gradient_draw(dst, &(context), 412 evas_common_gradient_draw(dst, &(context),
384 op->op.grad.x, op->op.grad.y, 413 op->op.grad.x, op->op.grad.y,
385 op->op.grad.w, op->op.grad.h, 414 op->op.grad.w, op->op.grad.h,
@@ -429,7 +458,11 @@ evas_common_pipe_text_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
429 RGBA_Draw_Context context; 458 RGBA_Draw_Context context;
430 459
431 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); 460 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
461#ifdef EVAS_SLI
462 evas_common_draw_context_set_sli(&(context), info->y, info->h);
463#else
432 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); 464 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
465#endif
433 evas_common_font_draw(dst, &(context), 466 evas_common_font_draw(dst, &(context),
434 op->op.text.font, op->op.text.x, op->op.text.y, 467 op->op.text.font, op->op.text.x, op->op.text.y,
435 op->op.text.text); 468 op->op.text.text);
@@ -476,7 +509,11 @@ evas_common_pipe_image_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thre
476 RGBA_Draw_Context context; 509 RGBA_Draw_Context context;
477 510
478 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); 511 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
512#ifdef EVAS_SLI
513 evas_common_draw_context_set_sli(&(context), info->y, info->h);
514#else
479 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); 515 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
516#endif
480 if (op->op.image.smooth) 517 if (op->op.image.smooth)
481 evas_common_scale_rgba_in_to_out_clip_smooth(op->op.image.src, 518 evas_common_scale_rgba_in_to_out_clip_smooth(op->op.image.src,
482 dst, &(context), 519 dst, &(context),
diff --git a/legacy/evas/src/lib/engines/common/evas_polygon_main.c b/legacy/evas/src/lib/engines/common/evas_polygon_main.c
index 28ed324cc0..88903fb6b7 100644
--- a/legacy/evas/src/lib/engines/common/evas_polygon_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_polygon_main.c
@@ -276,8 +276,13 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
276 DATA32 *ptr; 276 DATA32 *ptr;
277 277
278 span = (RGBA_Span *)l; 278 span = (RGBA_Span *)l;
279 ptr = dst->image->data + (span->y * (dst->image->w)) + span->x; 279#ifdef EVAS_SLI
280 func(NULL, NULL, dc->col.col, ptr, span->w); 280 if (((span->y) % dc->sli.h) == dc->sli.y)
281#endif
282 {
283 ptr = dst->image->data + (span->y * (dst->image->w)) + span->x;
284 func(NULL, NULL, dc->col.col, ptr, span->w);
285 }
281 } 286 }
282 while (spans) 287 while (spans)
283 { 288 {
diff --git a/legacy/evas/src/lib/engines/common/evas_rectangle_main.c b/legacy/evas/src/lib/engines/common/evas_rectangle_main.c
index 455648c34d..f9fae5ad73 100644
--- a/legacy/evas/src/lib/engines/common/evas_rectangle_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_rectangle_main.c
@@ -67,7 +67,12 @@ rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, in
67 ptr = dst->image->data + (y * dst->image->w) + x; 67 ptr = dst->image->data + (y * dst->image->w) + x;
68 for (yy = 0; yy < h; yy++) 68 for (yy = 0; yy < h; yy++)
69 { 69 {
70 func(NULL, NULL, dc->col.col, ptr, w); 70#ifdef EVAS_SLI
71 if (((yy + y) % dc->sli.h) == dc->sli.y)
72#endif
73 {
74 func(NULL, NULL, dc->col.col, ptr, w);
75 }
71 ptr += dst->image->w; 76 ptr += dst->image->w;
72 } 77 }
73} 78}
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 c864e5d760..54d255f31c 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_sample.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_sample.c
@@ -247,7 +247,12 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
247 for (y = 0; y < dst_clip_h; y++) 247 for (y = 0; y < dst_clip_h; y++)
248 { 248 {
249 /* * blend here [clip_w *] ptr -> dst_ptr * */ 249 /* * blend here [clip_w *] ptr -> dst_ptr * */
250 func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w); 250#ifdef EVAS_SLI
251 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
252#endif
253 {
254 func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
255 }
251 ptr += src_w; 256 ptr += src_w;
252 dst_ptr += dst_w; 257 dst_ptr += dst_w;
253 } 258 }
@@ -269,13 +274,18 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
269 { 274 {
270 for (y = 0; y < dst_clip_h; y++) 275 for (y = 0; y < dst_clip_h; y++)
271 { 276 {
272 dst_ptr = dptr; 277#ifdef EVAS_SLI
273 for (x = 0; x < dst_clip_w; x++) 278 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
274 { 279#endif
275 ptr = row_ptr[y] + lin_ptr[x]; 280 {
276 *dst_ptr = *ptr; 281 dst_ptr = dptr;
277 dst_ptr++; 282 for (x = 0; x < dst_clip_w; x++)
278 } 283 {
284 ptr = row_ptr[y] + lin_ptr[x];
285 *dst_ptr = *ptr;
286 dst_ptr++;
287 }
288 }
279 dptr += dst_w; 289 dptr += dst_w;
280 } 290 }
281 } 291 }
@@ -288,15 +298,20 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
288 298
289 for (y = 0; y < dst_clip_h; y++) 299 for (y = 0; y < dst_clip_h; y++)
290 { 300 {
291 dst_ptr = buf; 301#ifdef EVAS_SLI
292 for (x = 0; x < dst_clip_w; x++) 302 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
293 { 303#endif
294 ptr = row_ptr[y] + lin_ptr[x]; 304 {
295 *dst_ptr = *ptr; 305 dst_ptr = buf;
296 dst_ptr++; 306 for (x = 0; x < dst_clip_w; x++)
297 } 307 {
298 /* * blend here [clip_w *] buf -> dptr * */ 308 ptr = row_ptr[y] + lin_ptr[x];
299 func(buf, NULL, dc->mul.col, dptr, dst_clip_w); 309 *dst_ptr = *ptr;
310 dst_ptr++;
311 }
312 /* * blend here [clip_w *] buf -> dptr * */
313 func(buf, NULL, dc->mul.col, dptr, dst_clip_w);
314 }
300 dptr += dst_w; 315 dptr += dst_w;
301 } 316 }
302 } 317 }
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 464ea176f4..58570ba46f 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
@@ -5,6 +5,9 @@
5 int *xp, xap, yap, pos; 5 int *xp, xap, yap, pos;
6 int dyy, dxx; 6 int dyy, dxx;
7 int w = dst_clip_w; 7 int w = dst_clip_w;
8#ifdef EVAS_SLI
9 int ysli = dst_clip_y;
10#endif
8 11
9 dptr = dst_ptr; 12 dptr = dst_ptr;
10 pos = (src_region_y * src_w) + src_region_x; 13 pos = (src_region_y * src_w) + src_region_x;
@@ -21,95 +24,24 @@
21 { 24 {
22 while (dst_clip_h--) 25 while (dst_clip_h--)
23 { 26 {
24 while (dst_clip_w--) 27#ifdef EVAS_SLI
28 if (((ysli) % dc->sli.h) == dc->sli.y)
29#endif
25 { 30 {
26 Cx = *xapp >> 16;
27 xap = *xapp & 0xffff;
28 pix = *yp + *xp + pos;
29
30 a = (A_VAL(pix) * xap) >> 10;
31 r = (R_VAL(pix) * xap) >> 10;
32 g = (G_VAL(pix) * xap) >> 10;
33 b = (B_VAL(pix) * xap) >> 10;
34 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
35 {
36 pix++;
37 a += (A_VAL(pix) * Cx) >> 10;
38 r += (R_VAL(pix) * Cx) >> 10;
39 g += (G_VAL(pix) * Cx) >> 10;
40 b += (B_VAL(pix) * Cx) >> 10;
41 }
42 if (j > 0)
43 {
44 pix++;
45 a += (A_VAL(pix) * j) >> 10;
46 r += (R_VAL(pix) * j) >> 10;
47 g += (G_VAL(pix) * j) >> 10;
48 b += (B_VAL(pix) * j) >> 10;
49 }
50 if ((yap = *yapp) > 0)
51 {
52 pix = *yp + *xp + src_w + pos;
53 aa = (A_VAL(pix) * xap) >> 10;
54 rr = (R_VAL(pix) * xap) >> 10;
55 gg = (G_VAL(pix) * xap) >> 10;
56 bb = (B_VAL(pix) * xap) >> 10;
57 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
58 {
59 pix++;
60 aa += (A_VAL(pix) * Cx) >> 10;
61 rr += (R_VAL(pix) * Cx) >> 10;
62 gg += (G_VAL(pix) * Cx) >> 10;
63 bb += (B_VAL(pix) * Cx) >> 10;
64 }
65 if (j > 0)
66 {
67 pix++;
68 aa += (A_VAL(pix) * j) >> 10;
69 rr += (R_VAL(pix) * j) >> 10;
70 gg += (G_VAL(pix) * j) >> 10;
71 bb += (B_VAL(pix) * j) >> 10;
72 }
73 a += ((aa - a) * yap) >> 8;
74 r += ((rr - r) * yap) >> 8;
75 g += ((gg - g) * yap) >> 8;
76 b += ((bb - b) * yap) >> 8;
77 }
78 *pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4);
79 xp++; xapp++;
80 }
81
82 func(buf, NULL, dc->mul.col, dptr, w);
83
84 pbuf = buf;
85 dptr += dst_w; dst_clip_w = w;
86 yp++; yapp++;
87 xp = xpoints + dxx;
88 xapp = xapoints + dxx;
89 }
90 }
91 else
92 {
93#ifdef DIRECT_SCALE
94 if ((!(src->flags & RGBA_IMAGE_HAS_ALPHA)) &&
95 (!(dst->flags & RGBA_IMAGE_HAS_ALPHA)) &&
96 (!dc->mul.use))
97 {
98 while (dst_clip_h--)
99 {
100 pbuf = dptr;
101 while (dst_clip_w--) 31 while (dst_clip_w--)
102 { 32 {
103 Cx = *xapp >> 16; 33 Cx = *xapp >> 16;
104 xap = *xapp & 0xffff; 34 xap = *xapp & 0xffff;
105 pix = *yp + *xp + pos; 35 pix = *yp + *xp + pos;
106 36
37 a = (A_VAL(pix) * xap) >> 10;
107 r = (R_VAL(pix) * xap) >> 10; 38 r = (R_VAL(pix) * xap) >> 10;
108 g = (G_VAL(pix) * xap) >> 10; 39 g = (G_VAL(pix) * xap) >> 10;
109 b = (B_VAL(pix) * xap) >> 10; 40 b = (B_VAL(pix) * xap) >> 10;
110 for (j = (1 << 14) - xap; j > Cx; j -= Cx) 41 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
111 { 42 {
112 pix++; 43 pix++;
44 a += (A_VAL(pix) * Cx) >> 10;
113 r += (R_VAL(pix) * Cx) >> 10; 45 r += (R_VAL(pix) * Cx) >> 10;
114 g += (G_VAL(pix) * Cx) >> 10; 46 g += (G_VAL(pix) * Cx) >> 10;
115 b += (B_VAL(pix) * Cx) >> 10; 47 b += (B_VAL(pix) * Cx) >> 10;
@@ -117,6 +49,7 @@
117 if (j > 0) 49 if (j > 0)
118 { 50 {
119 pix++; 51 pix++;
52 a += (A_VAL(pix) * j) >> 10;
120 r += (R_VAL(pix) * j) >> 10; 53 r += (R_VAL(pix) * j) >> 10;
121 g += (G_VAL(pix) * j) >> 10; 54 g += (G_VAL(pix) * j) >> 10;
122 b += (B_VAL(pix) * j) >> 10; 55 b += (B_VAL(pix) * j) >> 10;
@@ -124,12 +57,14 @@
124 if ((yap = *yapp) > 0) 57 if ((yap = *yapp) > 0)
125 { 58 {
126 pix = *yp + *xp + src_w + pos; 59 pix = *yp + *xp + src_w + pos;
60 aa = (A_VAL(pix) * xap) >> 10;
127 rr = (R_VAL(pix) * xap) >> 10; 61 rr = (R_VAL(pix) * xap) >> 10;
128 gg = (G_VAL(pix) * xap) >> 10; 62 gg = (G_VAL(pix) * xap) >> 10;
129 bb = (B_VAL(pix) * xap) >> 10; 63 bb = (B_VAL(pix) * xap) >> 10;
130 for (j = (1 << 14) - xap; j > Cx; j -= Cx) 64 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
131 { 65 {
132 pix++; 66 pix++;
67 aa += (A_VAL(pix) * Cx) >> 10;
133 rr += (R_VAL(pix) * Cx) >> 10; 68 rr += (R_VAL(pix) * Cx) >> 10;
134 gg += (G_VAL(pix) * Cx) >> 10; 69 gg += (G_VAL(pix) * Cx) >> 10;
135 bb += (B_VAL(pix) * Cx) >> 10; 70 bb += (B_VAL(pix) * Cx) >> 10;
@@ -137,18 +72,101 @@
137 if (j > 0) 72 if (j > 0)
138 { 73 {
139 pix++; 74 pix++;
75 aa += (A_VAL(pix) * j) >> 10;
140 rr += (R_VAL(pix) * j) >> 10; 76 rr += (R_VAL(pix) * j) >> 10;
141 gg += (G_VAL(pix) * j) >> 10; 77 gg += (G_VAL(pix) * j) >> 10;
142 bb += (B_VAL(pix) * j) >> 10; 78 bb += (B_VAL(pix) * j) >> 10;
143 } 79 }
80 a += ((aa - a) * yap) >> 8;
144 r += ((rr - r) * yap) >> 8; 81 r += ((rr - r) * yap) >> 8;
145 g += ((gg - g) * yap) >> 8; 82 g += ((gg - g) * yap) >> 8;
146 b += ((bb - b) * yap) >> 8; 83 b += ((bb - b) * yap) >> 8;
147 } 84 }
148 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4); 85 *pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4);
149 xp++; xapp++; 86 xp++; xapp++;
150 } 87 }
151 88
89 func(buf, NULL, dc->mul.col, dptr, w);
90 }
91#ifdef EVAS_SLI
92 ysli++;
93#endif
94 pbuf = buf;
95 dptr += dst_w; dst_clip_w = w;
96 yp++; yapp++;
97 xp = xpoints + dxx;
98 xapp = xapoints + dxx;
99 }
100 }
101 else
102 {
103#ifdef DIRECT_SCALE
104 if ((!(src->flags & RGBA_IMAGE_HAS_ALPHA)) &&
105 (!(dst->flags & RGBA_IMAGE_HAS_ALPHA)) &&
106 (!dc->mul.use))
107 {
108 while (dst_clip_h--)
109 {
110 pbuf = dptr;
111#ifdef EVAS_SLI
112 if (((ysli) % dc->sli.h) == dc->sli.y)
113#endif
114 {
115 while (dst_clip_w--)
116 {
117 Cx = *xapp >> 16;
118 xap = *xapp & 0xffff;
119 pix = *yp + *xp + pos;
120
121 r = (R_VAL(pix) * xap) >> 10;
122 g = (G_VAL(pix) * xap) >> 10;
123 b = (B_VAL(pix) * xap) >> 10;
124 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
125 {
126 pix++;
127 r += (R_VAL(pix) * Cx) >> 10;
128 g += (G_VAL(pix) * Cx) >> 10;
129 b += (B_VAL(pix) * Cx) >> 10;
130 }
131 if (j > 0)
132 {
133 pix++;
134 r += (R_VAL(pix) * j) >> 10;
135 g += (G_VAL(pix) * j) >> 10;
136 b += (B_VAL(pix) * j) >> 10;
137 }
138 if ((yap = *yapp) > 0)
139 {
140 pix = *yp + *xp + src_w + pos;
141 rr = (R_VAL(pix) * xap) >> 10;
142 gg = (G_VAL(pix) * xap) >> 10;
143 bb = (B_VAL(pix) * xap) >> 10;
144 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
145 {
146 pix++;
147 rr += (R_VAL(pix) * Cx) >> 10;
148 gg += (G_VAL(pix) * Cx) >> 10;
149 bb += (B_VAL(pix) * Cx) >> 10;
150 }
151 if (j > 0)
152 {
153 pix++;
154 rr += (R_VAL(pix) * j) >> 10;
155 gg += (G_VAL(pix) * j) >> 10;
156 bb += (B_VAL(pix) * j) >> 10;
157 }
158 r += ((rr - r) * yap) >> 8;
159 g += ((gg - g) * yap) >> 8;
160 b += ((bb - b) * yap) >> 8;
161 }
162 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
163 xp++; xapp++;
164 }
165 }
166#ifdef EVAS_SLI
167 ysli++;
168#endif
169
152 dptr += dst_w; dst_clip_w = w; 170 dptr += dst_w; dst_clip_w = w;
153 yp++; yapp++; 171 yp++; yapp++;
154 xp = xpoints + dxx; 172 xp = xpoints + dxx;
@@ -160,59 +178,67 @@
160 { 178 {
161 while (dst_clip_h--) 179 while (dst_clip_h--)
162 { 180 {
163 while (dst_clip_w--) 181#ifdef EVAS_SLI
182 if (((ysli) % dc->sli.h) == dc->sli.y)
183#endif
164 { 184 {
165 Cx = *xapp >> 16; 185 while (dst_clip_w--)
166 xap = *xapp & 0xffff;
167 pix = *yp + *xp + pos;
168
169 r = (R_VAL(pix) * xap) >> 10;
170 g = (G_VAL(pix) * xap) >> 10;
171 b = (B_VAL(pix) * xap) >> 10;
172 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
173 { 186 {
174 pix++; 187 Cx = *xapp >> 16;
175 r += (R_VAL(pix) * Cx) >> 10; 188 xap = *xapp & 0xffff;
176 g += (G_VAL(pix) * Cx) >> 10; 189 pix = *yp + *xp + pos;
177 b += (B_VAL(pix) * Cx) >> 10; 190
178 } 191 r = (R_VAL(pix) * xap) >> 10;
179 if (j > 0) 192 g = (G_VAL(pix) * xap) >> 10;
180 { 193 b = (B_VAL(pix) * xap) >> 10;
181 pix++;
182 r += (R_VAL(pix) * j) >> 10;
183 g += (G_VAL(pix) * j) >> 10;
184 b += (B_VAL(pix) * j) >> 10;
185 }
186 if ((yap = *yapp) > 0)
187 {
188 pix = *yp + *xp + src_w + pos;
189 rr = (R_VAL(pix) * xap) >> 10;
190 gg = (G_VAL(pix) * xap) >> 10;
191 bb = (B_VAL(pix) * xap) >> 10;
192 for (j = (1 << 14) - xap; j > Cx; j -= Cx) 194 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
193 { 195 {
194 pix++; 196 pix++;
195 rr += (R_VAL(pix) * Cx) >> 10; 197 r += (R_VAL(pix) * Cx) >> 10;
196 gg += (G_VAL(pix) * Cx) >> 10; 198 g += (G_VAL(pix) * Cx) >> 10;
197 bb += (B_VAL(pix) * Cx) >> 10; 199 b += (B_VAL(pix) * Cx) >> 10;
198 } 200 }
199 if (j > 0) 201 if (j > 0)
200 { 202 {
201 pix++; 203 pix++;
202 rr += (R_VAL(pix) * j) >> 10; 204 r += (R_VAL(pix) * j) >> 10;
203 gg += (G_VAL(pix) * j) >> 10; 205 g += (G_VAL(pix) * j) >> 10;
204 bb += (B_VAL(pix) * j) >> 10; 206 b += (B_VAL(pix) * j) >> 10;
205 } 207 }
206 r += ((rr - r) * yap) >> 8; 208 if ((yap = *yapp) > 0)
207 g += ((gg - g) * yap) >> 8; 209 {
208 b += ((bb - b) * yap) >> 8; 210 pix = *yp + *xp + src_w + pos;
211 rr = (R_VAL(pix) * xap) >> 10;
212 gg = (G_VAL(pix) * xap) >> 10;
213 bb = (B_VAL(pix) * xap) >> 10;
214 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
215 {
216 pix++;
217 rr += (R_VAL(pix) * Cx) >> 10;
218 gg += (G_VAL(pix) * Cx) >> 10;
219 bb += (B_VAL(pix) * Cx) >> 10;
220 }
221 if (j > 0)
222 {
223 pix++;
224 rr += (R_VAL(pix) * j) >> 10;
225 gg += (G_VAL(pix) * j) >> 10;
226 bb += (B_VAL(pix) * j) >> 10;
227 }
228 r += ((rr - r) * yap) >> 8;
229 g += ((gg - g) * yap) >> 8;
230 b += ((bb - b) * yap) >> 8;
231 }
232 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
233 xp++; xapp++;
209 } 234 }
210 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4); 235
211 xp++; xapp++; 236 func(buf, NULL, dc->mul.col, dptr, w);
212 } 237 }
238#ifdef EVAS_SLI
239 ysli++;
240#endif
213 241
214 func(buf, NULL, dc->mul.col, dptr, w);
215
216 pbuf = buf; 242 pbuf = buf;
217 dptr += dst_w; dst_clip_w = w; 243 dptr += dst_w; dst_clip_w = w;
218 yp++; yapp++; 244 yp++; yapp++;
diff --git a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c
index d31c9a46df..5686917667 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c
@@ -4,6 +4,9 @@
4 int a, r, g, b, rx, gx, bx, ax; 4 int a, r, g, b, rx, gx, bx, ax;
5 int xap, yap, pos; 5 int xap, yap, pos;
6 int dyy, dxx; 6 int dyy, dxx;
7#ifdef EVAS_SLI
8 int ysli = dst_clip_y;
9#endif
7 10
8 DATA32 **yp; 11 DATA32 **yp;
9 int *xp; 12 int *xp;
@@ -26,130 +29,13 @@
26 { 29 {
27 while (dst_clip_h--) 30 while (dst_clip_h--)
28 { 31 {
29 Cy = *yapp >> 16; 32#ifdef EVAS_SLI
30 yap = *yapp & 0xffff; 33 if (((ysli) % dc->sli.h) == dc->sli.y)
31 34#endif
32 while (dst_clip_w--)
33 {
34 Cx = *xapp >> 16;
35 xap = *xapp & 0xffff;
36
37 sptr = *yp + *xp + pos;
38 pix = sptr;
39 sptr += src_w;
40
41 ax = (A_VAL(pix) * xap) >> 9;
42 rx = (R_VAL(pix) * xap) >> 9;
43 gx = (G_VAL(pix) * xap) >> 9;
44 bx = (B_VAL(pix) * xap) >> 9;
45 pix++;
46 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
47 {
48 ax += (A_VAL(pix) * Cx) >> 9;
49 rx += (R_VAL(pix) * Cx) >> 9;
50 gx += (G_VAL(pix) * Cx) >> 9;
51 bx += (B_VAL(pix) * Cx) >> 9;
52 pix++;
53 }
54 if (i > 0)
55 {
56 ax += (A_VAL(pix) * i) >> 9;
57 rx += (R_VAL(pix) * i) >> 9;
58 gx += (G_VAL(pix) * i) >> 9;
59 bx += (B_VAL(pix) * i) >> 9;
60 }
61
62 a = (ax * yap) >> 14;
63 r = (rx * yap) >> 14;
64 g = (gx * yap) >> 14;
65 b = (bx * yap) >> 14;
66
67 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
68 {
69 pix = sptr;
70 sptr += src_w;
71 ax = (A_VAL(pix) * xap) >> 9;
72 rx = (R_VAL(pix) * xap) >> 9;
73 gx = (G_VAL(pix) * xap) >> 9;
74 bx = (B_VAL(pix) * xap) >> 9;
75 pix++;
76 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
77 {
78 ax += (A_VAL(pix) * Cx) >> 9;
79 rx += (R_VAL(pix) * Cx) >> 9;
80 gx += (G_VAL(pix) * Cx) >> 9;
81 bx += (B_VAL(pix) * Cx) >> 9;
82 pix++;
83 }
84 if (i > 0)
85 {
86 ax += (A_VAL(pix) * i) >> 9;
87 rx += (R_VAL(pix) * i) >> 9;
88 gx += (G_VAL(pix) * i) >> 9;
89 bx += (B_VAL(pix) * i) >> 9;
90 }
91
92 a += (ax * Cy) >> 14;
93 r += (rx * Cy) >> 14;
94 g += (gx * Cy) >> 14;
95 b += (bx * Cy) >> 14;
96 }
97 if (j > 0)
98 {
99 pix = sptr;
100 sptr += src_w;
101 ax = (A_VAL(pix) * xap) >> 9;
102 rx = (R_VAL(pix) * xap) >> 9;
103 gx = (G_VAL(pix) * xap) >> 9;
104 bx = (B_VAL(pix) * xap) >> 9;
105 pix++;
106 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
107 {
108 ax += (A_VAL(pix) * Cx) >> 9;
109 rx += (R_VAL(pix) * Cx) >> 9;
110 gx += (G_VAL(pix) * Cx) >> 9;
111 bx += (B_VAL(pix) * Cx) >> 9;
112 pix++;
113 }
114 if (i > 0)
115 {
116 ax += (A_VAL(pix) * i) >> 9;
117 rx += (R_VAL(pix) * i) >> 9;
118 gx += (G_VAL(pix) * i) >> 9;
119 bx += (B_VAL(pix) * i) >> 9;
120 }
121
122 a += (ax * j) >> 14;
123 r += (rx * j) >> 14;
124 g += (gx * j) >> 14;
125 b += (bx * j) >> 14;
126 }
127 *pbuf++ = ARGB_JOIN(a >> 5, r >> 5, g >> 5, b >> 5);
128 xp++; xapp++;
129 }
130
131 func(buf, NULL, dc->mul.col, dptr, w);
132
133 pbuf = buf;
134 dptr += dst_w; dst_clip_w = w;
135 xp = xpoints + dxx;
136 xapp = xapoints + dxx;
137 yp++; yapp++;
138 }
139 }
140 else
141 {
142#ifdef DIRECT_SCALE
143 if ((!(src->flags & RGBA_IMAGE_HAS_ALPHA)) &&
144 (!(dst->flags & RGBA_IMAGE_HAS_ALPHA)) &&
145 (!dc->mul.use))
146 {
147 while (dst_clip_h--)
148 { 35 {
149 Cy = *yapp >> 16; 36 Cy = *yapp >> 16;
150 yap = *yapp & 0xffff; 37 yap = *yapp & 0xffff;
151 38
152 pbuf = dptr;
153 while (dst_clip_w--) 39 while (dst_clip_w--)
154 { 40 {
155 Cx = *xapp >> 16; 41 Cx = *xapp >> 16;
@@ -159,12 +45,14 @@
159 pix = sptr; 45 pix = sptr;
160 sptr += src_w; 46 sptr += src_w;
161 47
48 ax = (A_VAL(pix) * xap) >> 9;
162 rx = (R_VAL(pix) * xap) >> 9; 49 rx = (R_VAL(pix) * xap) >> 9;
163 gx = (G_VAL(pix) * xap) >> 9; 50 gx = (G_VAL(pix) * xap) >> 9;
164 bx = (B_VAL(pix) * xap) >> 9; 51 bx = (B_VAL(pix) * xap) >> 9;
165 pix++; 52 pix++;
166 for (i = (1 << 14) - xap; i > Cx; i -= Cx) 53 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
167 { 54 {
55 ax += (A_VAL(pix) * Cx) >> 9;
168 rx += (R_VAL(pix) * Cx) >> 9; 56 rx += (R_VAL(pix) * Cx) >> 9;
169 gx += (G_VAL(pix) * Cx) >> 9; 57 gx += (G_VAL(pix) * Cx) >> 9;
170 bx += (B_VAL(pix) * Cx) >> 9; 58 bx += (B_VAL(pix) * Cx) >> 9;
@@ -172,11 +60,13 @@
172 } 60 }
173 if (i > 0) 61 if (i > 0)
174 { 62 {
63 ax += (A_VAL(pix) * i) >> 9;
175 rx += (R_VAL(pix) * i) >> 9; 64 rx += (R_VAL(pix) * i) >> 9;
176 gx += (G_VAL(pix) * i) >> 9; 65 gx += (G_VAL(pix) * i) >> 9;
177 bx += (B_VAL(pix) * i) >> 9; 66 bx += (B_VAL(pix) * i) >> 9;
178 } 67 }
179 68
69 a = (ax * yap) >> 14;
180 r = (rx * yap) >> 14; 70 r = (rx * yap) >> 14;
181 g = (gx * yap) >> 14; 71 g = (gx * yap) >> 14;
182 b = (bx * yap) >> 14; 72 b = (bx * yap) >> 14;
@@ -185,12 +75,14 @@
185 { 75 {
186 pix = sptr; 76 pix = sptr;
187 sptr += src_w; 77 sptr += src_w;
78 ax = (A_VAL(pix) * xap) >> 9;
188 rx = (R_VAL(pix) * xap) >> 9; 79 rx = (R_VAL(pix) * xap) >> 9;
189 gx = (G_VAL(pix) * xap) >> 9; 80 gx = (G_VAL(pix) * xap) >> 9;
190 bx = (B_VAL(pix) * xap) >> 9; 81 bx = (B_VAL(pix) * xap) >> 9;
191 pix++; 82 pix++;
192 for (i = (1 << 14) - xap; i > Cx; i -= Cx) 83 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
193 { 84 {
85 ax += (A_VAL(pix) * Cx) >> 9;
194 rx += (R_VAL(pix) * Cx) >> 9; 86 rx += (R_VAL(pix) * Cx) >> 9;
195 gx += (G_VAL(pix) * Cx) >> 9; 87 gx += (G_VAL(pix) * Cx) >> 9;
196 bx += (B_VAL(pix) * Cx) >> 9; 88 bx += (B_VAL(pix) * Cx) >> 9;
@@ -198,11 +90,13 @@
198 } 90 }
199 if (i > 0) 91 if (i > 0)
200 { 92 {
93 ax += (A_VAL(pix) * i) >> 9;
201 rx += (R_VAL(pix) * i) >> 9; 94 rx += (R_VAL(pix) * i) >> 9;
202 gx += (G_VAL(pix) * i) >> 9; 95 gx += (G_VAL(pix) * i) >> 9;
203 bx += (B_VAL(pix) * i) >> 9; 96 bx += (B_VAL(pix) * i) >> 9;
204 } 97 }
205 98
99 a += (ax * Cy) >> 14;
206 r += (rx * Cy) >> 14; 100 r += (rx * Cy) >> 14;
207 g += (gx * Cy) >> 14; 101 g += (gx * Cy) >> 14;
208 b += (bx * Cy) >> 14; 102 b += (bx * Cy) >> 14;
@@ -211,12 +105,14 @@
211 { 105 {
212 pix = sptr; 106 pix = sptr;
213 sptr += src_w; 107 sptr += src_w;
108 ax = (A_VAL(pix) * xap) >> 9;
214 rx = (R_VAL(pix) * xap) >> 9; 109 rx = (R_VAL(pix) * xap) >> 9;
215 gx = (G_VAL(pix) * xap) >> 9; 110 gx = (G_VAL(pix) * xap) >> 9;
216 bx = (B_VAL(pix) * xap) >> 9; 111 bx = (B_VAL(pix) * xap) >> 9;
217 pix++; 112 pix++;
218 for (i = (1 << 14) - xap; i > Cx; i -= Cx) 113 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
219 { 114 {
115 ax += (A_VAL(pix) * Cx) >> 9;
220 rx += (R_VAL(pix) * Cx) >> 9; 116 rx += (R_VAL(pix) * Cx) >> 9;
221 gx += (G_VAL(pix) * Cx) >> 9; 117 gx += (G_VAL(pix) * Cx) >> 9;
222 bx += (B_VAL(pix) * Cx) >> 9; 118 bx += (B_VAL(pix) * Cx) >> 9;
@@ -224,67 +120,59 @@
224 } 120 }
225 if (i > 0) 121 if (i > 0)
226 { 122 {
123 ax += (A_VAL(pix) * i) >> 9;
227 rx += (R_VAL(pix) * i) >> 9; 124 rx += (R_VAL(pix) * i) >> 9;
228 gx += (G_VAL(pix) * i) >> 9; 125 gx += (G_VAL(pix) * i) >> 9;
229 bx += (B_VAL(pix) * i) >> 9; 126 bx += (B_VAL(pix) * i) >> 9;
230 } 127 }
231 128
129 a += (ax * j) >> 14;
232 r += (rx * j) >> 14; 130 r += (rx * j) >> 14;
233 g += (gx * j) >> 14; 131 g += (gx * j) >> 14;
234 b += (bx * j) >> 14; 132 b += (bx * j) >> 14;
235 } 133 }
236 *pbuf++ = ARGB_JOIN(0xff, r >> 5, g >> 5, b >> 5); 134 *pbuf++ = ARGB_JOIN(a >> 5, r >> 5, g >> 5, b >> 5);
237 xp++; xapp++; 135 xp++; xapp++;
238 } 136 }
239 dptr += dst_w; dst_clip_w = w; 137
240 xp = xpoints + dxx; 138 func(buf, NULL, dc->mul.col, dptr, w);
241 xapp = xapoints + dxx;
242 yp++; yapp++;
243 } 139 }
140#ifdef EVAS_SLI
141 ysli++;
142#endif
143 pbuf = buf;
144 dptr += dst_w; dst_clip_w = w;
145 xp = xpoints + dxx;
146 xapp = xapoints + dxx;
147 yp++; yapp++;
244 } 148 }
245 else 149 }
246#endif 150 else
151 {
152#ifdef DIRECT_SCALE
153 if ((!(src->flags & RGBA_IMAGE_HAS_ALPHA)) &&
154 (!(dst->flags & RGBA_IMAGE_HAS_ALPHA)) &&
155 (!dc->mul.use))
247 { 156 {
248 while (dst_clip_h--) 157 while (dst_clip_h--)
249 { 158 {
250 Cy = *yapp >> 16; 159#ifdef EVAS_SLI
251 yap = *yapp & 0xffff; 160 if (((ysli) % dc->sli.h) == dc->sli.y)
252 161#endif
253 while (dst_clip_w--)
254 { 162 {
255 Cx = *xapp >> 16; 163 Cy = *yapp >> 16;
256 xap = *xapp & 0xffff; 164 yap = *yapp & 0xffff;
257
258 sptr = *yp + *xp + pos;
259 pix = sptr;
260 sptr += src_w;
261 165
262 rx = (R_VAL(pix) * xap) >> 9; 166 pbuf = dptr;
263 gx = (G_VAL(pix) * xap) >> 9; 167 while (dst_clip_w--)
264 bx = (B_VAL(pix) * xap) >> 9;
265 pix++;
266 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
267 {
268 rx += (R_VAL(pix) * Cx) >> 9;
269 gx += (G_VAL(pix) * Cx) >> 9;
270 bx += (B_VAL(pix) * Cx) >> 9;
271 pix++;
272 }
273 if (i > 0)
274 {
275 rx += (R_VAL(pix) * i) >> 9;
276 gx += (G_VAL(pix) * i) >> 9;
277 bx += (B_VAL(pix) * i) >> 9;
278 }
279
280 r = (rx * yap) >> 14;
281 g = (gx * yap) >> 14;
282 b = (bx * yap) >> 14;
283
284 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
285 { 168 {
169 Cx = *xapp >> 16;
170 xap = *xapp & 0xffff;
171
172 sptr = *yp + *xp + pos;
286 pix = sptr; 173 pix = sptr;
287 sptr += src_w; 174 sptr += src_w;
175
288 rx = (R_VAL(pix) * xap) >> 9; 176 rx = (R_VAL(pix) * xap) >> 9;
289 gx = (G_VAL(pix) * xap) >> 9; 177 gx = (G_VAL(pix) * xap) >> 9;
290 bx = (B_VAL(pix) * xap) >> 9; 178 bx = (B_VAL(pix) * xap) >> 9;
@@ -303,14 +191,96 @@
303 bx += (B_VAL(pix) * i) >> 9; 191 bx += (B_VAL(pix) * i) >> 9;
304 } 192 }
305 193
306 r += (rx * Cy) >> 14; 194 r = (rx * yap) >> 14;
307 g += (gx * Cy) >> 14; 195 g = (gx * yap) >> 14;
308 b += (bx * Cy) >> 14; 196 b = (bx * yap) >> 14;
197
198 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
199 {
200 pix = sptr;
201 sptr += src_w;
202 rx = (R_VAL(pix) * xap) >> 9;
203 gx = (G_VAL(pix) * xap) >> 9;
204 bx = (B_VAL(pix) * xap) >> 9;
205 pix++;
206 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
207 {
208 rx += (R_VAL(pix) * Cx) >> 9;
209 gx += (G_VAL(pix) * Cx) >> 9;
210 bx += (B_VAL(pix) * Cx) >> 9;
211 pix++;
212 }
213 if (i > 0)
214 {
215 rx += (R_VAL(pix) * i) >> 9;
216 gx += (G_VAL(pix) * i) >> 9;
217 bx += (B_VAL(pix) * i) >> 9;
218 }
219
220 r += (rx * Cy) >> 14;
221 g += (gx * Cy) >> 14;
222 b += (bx * Cy) >> 14;
223 }
224 if (j > 0)
225 {
226 pix = sptr;
227 sptr += src_w;
228 rx = (R_VAL(pix) * xap) >> 9;
229 gx = (G_VAL(pix) * xap) >> 9;
230 bx = (B_VAL(pix) * xap) >> 9;
231 pix++;
232 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
233 {
234 rx += (R_VAL(pix) * Cx) >> 9;
235 gx += (G_VAL(pix) * Cx) >> 9;
236 bx += (B_VAL(pix) * Cx) >> 9;
237 pix++;
238 }
239 if (i > 0)
240 {
241 rx += (R_VAL(pix) * i) >> 9;
242 gx += (G_VAL(pix) * i) >> 9;
243 bx += (B_VAL(pix) * i) >> 9;
244 }
245
246 r += (rx * j) >> 14;
247 g += (gx * j) >> 14;
248 b += (bx * j) >> 14;
249 }
250 *pbuf++ = ARGB_JOIN(0xff, r >> 5, g >> 5, b >> 5);
251 xp++; xapp++;
309 } 252 }
310 if (j > 0) 253 }
254#ifdef EVAS_SLI
255 ysli++;
256#endif
257 dptr += dst_w; dst_clip_w = w;
258 xp = xpoints + dxx;
259 xapp = xapoints + dxx;
260 yp++; yapp++;
261 }
262 }
263 else
264#endif
265 {
266 while (dst_clip_h--)
267 {
268#ifdef EVAS_SLI
269 if (((ysli) % dc->sli.h) == dc->sli.y)
270#endif
271 {
272 Cy = *yapp >> 16;
273 yap = *yapp & 0xffff;
274
275 while (dst_clip_w--)
311 { 276 {
277 Cx = *xapp >> 16;
278 xap = *xapp & 0xffff;
279
280 sptr = *yp + *xp + pos;
312 pix = sptr; 281 pix = sptr;
313 sptr += src_w; 282 sptr += src_w;
283
314 rx = (R_VAL(pix) * xap) >> 9; 284 rx = (R_VAL(pix) * xap) >> 9;
315 gx = (G_VAL(pix) * xap) >> 9; 285 gx = (G_VAL(pix) * xap) >> 9;
316 bx = (B_VAL(pix) * xap) >> 9; 286 bx = (B_VAL(pix) * xap) >> 9;
@@ -329,16 +299,71 @@
329 bx += (B_VAL(pix) * i) >> 9; 299 bx += (B_VAL(pix) * i) >> 9;
330 } 300 }
331 301
332 r += (rx * j) >> 14; 302 r = (rx * yap) >> 14;
333 g += (gx * j) >> 14; 303 g = (gx * yap) >> 14;
334 b += (bx * j) >> 14; 304 b = (bx * yap) >> 14;
305
306 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
307 {
308 pix = sptr;
309 sptr += src_w;
310 rx = (R_VAL(pix) * xap) >> 9;
311 gx = (G_VAL(pix) * xap) >> 9;
312 bx = (B_VAL(pix) * xap) >> 9;
313 pix++;
314 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
315 {
316 rx += (R_VAL(pix) * Cx) >> 9;
317 gx += (G_VAL(pix) * Cx) >> 9;
318 bx += (B_VAL(pix) * Cx) >> 9;
319 pix++;
320 }
321 if (i > 0)
322 {
323 rx += (R_VAL(pix) * i) >> 9;
324 gx += (G_VAL(pix) * i) >> 9;
325 bx += (B_VAL(pix) * i) >> 9;
326 }
327
328 r += (rx * Cy) >> 14;
329 g += (gx * Cy) >> 14;
330 b += (bx * Cy) >> 14;
331 }
332 if (j > 0)
333 {
334 pix = sptr;
335 sptr += src_w;
336 rx = (R_VAL(pix) * xap) >> 9;
337 gx = (G_VAL(pix) * xap) >> 9;
338 bx = (B_VAL(pix) * xap) >> 9;
339 pix++;
340 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
341 {
342 rx += (R_VAL(pix) * Cx) >> 9;
343 gx += (G_VAL(pix) * Cx) >> 9;
344 bx += (B_VAL(pix) * Cx) >> 9;
345 pix++;
346 }
347 if (i > 0)
348 {
349 rx += (R_VAL(pix) * i) >> 9;
350 gx += (G_VAL(pix) * i) >> 9;
351 bx += (B_VAL(pix) * i) >> 9;
352 }
353
354 r += (rx * j) >> 14;
355 g += (gx * j) >> 14;
356 b += (bx * j) >> 14;
357 }
358 *pbuf++ = ARGB_JOIN(0xff, r >> 5, g >> 5, b >> 5);
359 xp++; xapp++;
335 } 360 }
336 *pbuf++ = ARGB_JOIN(0xff, r >> 5, g >> 5, b >> 5); 361
337 xp++; xapp++; 362 func(buf, NULL, dc->mul.col, dptr, w);
338 } 363 }
339 364#ifdef EVAS_SLI
340 func(buf, NULL, dc->mul.col, dptr, w); 365 ysli++;
341 366#endif
342 pbuf = buf; 367 pbuf = buf;
343 dptr += dst_w; dst_clip_w = w; 368 dptr += dst_w; dst_clip_w = w;
344 xp = xpoints + dxx; 369 xp = xpoints + dxx;
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 007df66dc2..b16f90216e 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
@@ -5,7 +5,10 @@
5 int *xp, xap, yap, pos; 5 int *xp, xap, yap, pos;
6 int dyy, dxx; 6 int dyy, dxx;
7 int w = dst_clip_w; 7 int w = dst_clip_w;
8 8#ifdef EVAS_SLI
9 int ysli = dst_clip_y;
10#endif
11
9 dptr = dst_ptr; 12 dptr = dst_ptr;
10 pos = (src_region_y * src_w) + src_region_x; 13 pos = (src_region_y * src_w) + src_region_x;
11 dyy = dst_clip_y - dst_region_y; 14 dyy = dst_clip_y - dst_region_y;
@@ -21,97 +24,25 @@
21 { 24 {
22 while (dst_clip_h--) 25 while (dst_clip_h--)
23 { 26 {
24 Cy = *yapp >> 16; 27#ifdef EVAS_SLI
25 yap = *yapp & 0xffff; 28 if (((ysli) % dc->sli.h) == dc->sli.y)
26 29#endif
27 while (dst_clip_w--)
28 {
29 pix = *yp + *xp + pos;
30
31 a = (A_VAL(pix) * yap) >> 10;
32 r = (R_VAL(pix) * yap) >> 10;
33 g = (G_VAL(pix) * yap) >> 10;
34 b = (B_VAL(pix) * yap) >> 10;
35 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
36 {
37 pix += src_w;
38 a += (A_VAL(pix) * Cy) >> 10;
39 r += (R_VAL(pix) * Cy) >> 10;
40 g += (G_VAL(pix) * Cy) >> 10;
41 b += (B_VAL(pix) * Cy) >> 10;
42 }
43 if (j > 0)
44 {
45 pix += src_w;
46 a += (A_VAL(pix) * j) >> 10;
47 r += (R_VAL(pix) * j) >> 10;
48 g += (G_VAL(pix) * j) >> 10;
49 b += (B_VAL(pix) * j) >> 10;
50 }
51 if ((xap = *xapp) > 0)
52 {
53 pix = *yp + *xp + 1 + pos;
54 aa = (A_VAL(pix) * yap) >> 10;
55 rr = (R_VAL(pix) * yap) >> 10;
56 gg = (G_VAL(pix) * yap) >> 10;
57 bb = (B_VAL(pix) * yap) >> 10;
58 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
59 {
60 pix += src_w;
61 aa += (A_VAL(pix) * Cy) >> 10;
62 rr += (R_VAL(pix) * Cy) >> 10;
63 gg += (G_VAL(pix) * Cy) >> 10;
64 bb += (B_VAL(pix) * Cy) >> 10;
65 }
66 if (j > 0)
67 {
68 pix += src_w;
69 aa += (A_VAL(pix) * j) >> 10;
70 rr += (R_VAL(pix) * j) >> 10;
71 gg += (G_VAL(pix) * j) >> 10;
72 bb += (B_VAL(pix) * j) >> 10;
73 }
74 a += ((aa - a) * xap) >> 8;
75 r += ((rr - r) * xap) >> 8;
76 g += ((gg - g) * xap) >> 8;
77 b += ((bb - b) * xap) >> 8;
78 }
79 *pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4);
80 xp++; xapp++;
81 }
82
83 func(buf, NULL, dc->mul.col, dptr, w);
84
85 pbuf = buf;
86 dptr += dst_w; dst_clip_w = w;
87 yp++; yapp++;
88 xp = xpoints + dxx;
89 xapp = xapoints + dxx;
90 }
91 }
92 else
93 {
94#ifdef DIRECT_SCALE
95 if ((!(src->flags & RGBA_IMAGE_HAS_ALPHA)) &&
96 (!(dst->flags & RGBA_IMAGE_HAS_ALPHA)) &&
97 (!dc->mul.use))
98 {
99 while (dst_clip_h--)
100 { 30 {
101 Cy = *yapp >> 16; 31 Cy = *yapp >> 16;
102 yap = *yapp & 0xffff; 32 yap = *yapp & 0xffff;
103 33
104 pbuf = dptr;
105 while (dst_clip_w--) 34 while (dst_clip_w--)
106 { 35 {
107 pix = *yp + *xp + pos; 36 pix = *yp + *xp + pos;
108 37
38 a = (A_VAL(pix) * yap) >> 10;
109 r = (R_VAL(pix) * yap) >> 10; 39 r = (R_VAL(pix) * yap) >> 10;
110 g = (G_VAL(pix) * yap) >> 10; 40 g = (G_VAL(pix) * yap) >> 10;
111 b = (B_VAL(pix) * yap) >> 10; 41 b = (B_VAL(pix) * yap) >> 10;
112 for (j = (1 << 14) - yap; j > Cy; j -= Cy) 42 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
113 { 43 {
114 pix += src_w; 44 pix += src_w;
45 a += (A_VAL(pix) * Cy) >> 10;
115 r += (R_VAL(pix) * Cy) >> 10; 46 r += (R_VAL(pix) * Cy) >> 10;
116 g += (G_VAL(pix) * Cy) >> 10; 47 g += (G_VAL(pix) * Cy) >> 10;
117 b += (B_VAL(pix) * Cy) >> 10; 48 b += (B_VAL(pix) * Cy) >> 10;
@@ -119,6 +50,7 @@
119 if (j > 0) 50 if (j > 0)
120 { 51 {
121 pix += src_w; 52 pix += src_w;
53 a += (A_VAL(pix) * j) >> 10;
122 r += (R_VAL(pix) * j) >> 10; 54 r += (R_VAL(pix) * j) >> 10;
123 g += (G_VAL(pix) * j) >> 10; 55 g += (G_VAL(pix) * j) >> 10;
124 b += (B_VAL(pix) * j) >> 10; 56 b += (B_VAL(pix) * j) >> 10;
@@ -126,12 +58,14 @@
126 if ((xap = *xapp) > 0) 58 if ((xap = *xapp) > 0)
127 { 59 {
128 pix = *yp + *xp + 1 + pos; 60 pix = *yp + *xp + 1 + pos;
61 aa = (A_VAL(pix) * yap) >> 10;
129 rr = (R_VAL(pix) * yap) >> 10; 62 rr = (R_VAL(pix) * yap) >> 10;
130 gg = (G_VAL(pix) * yap) >> 10; 63 gg = (G_VAL(pix) * yap) >> 10;
131 bb = (B_VAL(pix) * yap) >> 10; 64 bb = (B_VAL(pix) * yap) >> 10;
132 for (j = (1 << 14) - yap; j > Cy; j -= Cy) 65 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
133 { 66 {
134 pix += src_w; 67 pix += src_w;
68 aa += (A_VAL(pix) * Cy) >> 10;
135 rr += (R_VAL(pix) * Cy) >> 10; 69 rr += (R_VAL(pix) * Cy) >> 10;
136 gg += (G_VAL(pix) * Cy) >> 10; 70 gg += (G_VAL(pix) * Cy) >> 10;
137 bb += (B_VAL(pix) * Cy) >> 10; 71 bb += (B_VAL(pix) * Cy) >> 10;
@@ -139,17 +73,101 @@
139 if (j > 0) 73 if (j > 0)
140 { 74 {
141 pix += src_w; 75 pix += src_w;
76 aa += (A_VAL(pix) * j) >> 10;
142 rr += (R_VAL(pix) * j) >> 10; 77 rr += (R_VAL(pix) * j) >> 10;
143 gg += (G_VAL(pix) * j) >> 10; 78 gg += (G_VAL(pix) * j) >> 10;
144 bb += (B_VAL(pix) * j) >> 10; 79 bb += (B_VAL(pix) * j) >> 10;
145 } 80 }
81 a += ((aa - a) * xap) >> 8;
146 r += ((rr - r) * xap) >> 8; 82 r += ((rr - r) * xap) >> 8;
147 g += ((gg - g) * xap) >> 8; 83 g += ((gg - g) * xap) >> 8;
148 b += ((bb - b) * xap) >> 8; 84 b += ((bb - b) * xap) >> 8;
149 } 85 }
150 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4); 86 *pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4);
151 xp++; xapp++; 87 xp++; xapp++;
152 } 88 }
89
90 func(buf, NULL, dc->mul.col, dptr, w);
91 }
92#ifdef EVAS_SLI
93 ysli++;
94#endif
95 pbuf = buf;
96 dptr += dst_w; dst_clip_w = w;
97 yp++; yapp++;
98 xp = xpoints + dxx;
99 xapp = xapoints + dxx;
100 }
101 }
102 else
103 {
104#ifdef DIRECT_SCALE
105 if ((!(src->flags & RGBA_IMAGE_HAS_ALPHA)) &&
106 (!(dst->flags & RGBA_IMAGE_HAS_ALPHA)) &&
107 (!dc->mul.use))
108 {
109 while (dst_clip_h--)
110 {
111#ifdef EVAS_SLI
112 if (((ysli) % dc->sli.h) == dc->sli.y)
113#endif
114 {
115 Cy = *yapp >> 16;
116 yap = *yapp & 0xffff;
117
118 pbuf = dptr;
119 while (dst_clip_w--)
120 {
121 pix = *yp + *xp + pos;
122
123 r = (R_VAL(pix) * yap) >> 10;
124 g = (G_VAL(pix) * yap) >> 10;
125 b = (B_VAL(pix) * yap) >> 10;
126 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
127 {
128 pix += src_w;
129 r += (R_VAL(pix) * Cy) >> 10;
130 g += (G_VAL(pix) * Cy) >> 10;
131 b += (B_VAL(pix) * Cy) >> 10;
132 }
133 if (j > 0)
134 {
135 pix += src_w;
136 r += (R_VAL(pix) * j) >> 10;
137 g += (G_VAL(pix) * j) >> 10;
138 b += (B_VAL(pix) * j) >> 10;
139 }
140 if ((xap = *xapp) > 0)
141 {
142 pix = *yp + *xp + 1 + pos;
143 rr = (R_VAL(pix) * yap) >> 10;
144 gg = (G_VAL(pix) * yap) >> 10;
145 bb = (B_VAL(pix) * yap) >> 10;
146 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
147 {
148 pix += src_w;
149 rr += (R_VAL(pix) * Cy) >> 10;
150 gg += (G_VAL(pix) * Cy) >> 10;
151 bb += (B_VAL(pix) * Cy) >> 10;
152 }
153 if (j > 0)
154 {
155 pix += src_w;
156 rr += (R_VAL(pix) * j) >> 10;
157 gg += (G_VAL(pix) * j) >> 10;
158 bb += (B_VAL(pix) * j) >> 10;
159 }
160 r += ((rr - r) * xap) >> 8;
161 g += ((gg - g) * xap) >> 8;
162 b += ((bb - b) * xap) >> 8;
163 }
164 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
165 xp++; xapp++;
166 }
167 }
168#ifdef EVAS_SLI
169 ysli++;
170#endif
153 dptr += dst_w; dst_clip_w = w; 171 dptr += dst_w; dst_clip_w = w;
154 yp++; yapp++; 172 yp++; yapp++;
155 xp = xpoints + dxx; 173 xp = xpoints + dxx;
@@ -161,60 +179,67 @@
161 { 179 {
162 while (dst_clip_h--) 180 while (dst_clip_h--)
163 { 181 {
164 Cy = *yapp >> 16; 182#ifdef EVAS_SLI
165 yap = *yapp & 0xffff; 183 if (((ysli) % dc->sli.h) == dc->sli.y)
166 184#endif
167 while (dst_clip_w--)
168 { 185 {
169 pix = *yp + *xp + pos; 186 Cy = *yapp >> 16;
187 yap = *yapp & 0xffff;
170 188
171 r = (R_VAL(pix) * yap) >> 10; 189 while (dst_clip_w--)
172 g = (G_VAL(pix) * yap) >> 10;
173 b = (B_VAL(pix) * yap) >> 10;
174 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
175 {
176 pix += src_w;
177 r += (R_VAL(pix) * Cy) >> 10;
178 g += (G_VAL(pix) * Cy) >> 10;
179 b += (B_VAL(pix) * Cy) >> 10;
180 }
181 if (j > 0)
182 {
183 pix += src_w;
184 r += (R_VAL(pix) * j) >> 10;
185 g += (G_VAL(pix) * j) >> 10;
186 b += (B_VAL(pix) * j) >> 10;
187 }
188 if ((xap = *xapp) > 0)
189 { 190 {
190 pix = *yp + *xp + 1 + pos; 191 pix = *yp + *xp + pos;
191 rr = (R_VAL(pix) * yap) >> 10; 192
192 gg = (G_VAL(pix) * yap) >> 10; 193 r = (R_VAL(pix) * yap) >> 10;
193 bb = (B_VAL(pix) * yap) >> 10; 194 g = (G_VAL(pix) * yap) >> 10;
195 b = (B_VAL(pix) * yap) >> 10;
194 for (j = (1 << 14) - yap; j > Cy; j -= Cy) 196 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
195 { 197 {
196 pix += src_w; 198 pix += src_w;
197 rr += (R_VAL(pix) * Cy) >> 10; 199 r += (R_VAL(pix) * Cy) >> 10;
198 gg += (G_VAL(pix) * Cy) >> 10; 200 g += (G_VAL(pix) * Cy) >> 10;
199 bb += (B_VAL(pix) * Cy) >> 10; 201 b += (B_VAL(pix) * Cy) >> 10;
200 } 202 }
201 if (j > 0) 203 if (j > 0)
202 { 204 {
203 pix += src_w; 205 pix += src_w;
204 rr += (R_VAL(pix) * j) >> 10; 206 r += (R_VAL(pix) * j) >> 10;
205 gg += (G_VAL(pix) * j) >> 10; 207 g += (G_VAL(pix) * j) >> 10;
206 bb += (B_VAL(pix) * j) >> 10; 208 b += (B_VAL(pix) * j) >> 10;
207 } 209 }
208 r += ((rr - r) * xap) >> 8; 210 if ((xap = *xapp) > 0)
209 g += ((gg - g) * xap) >> 8; 211 {
210 b += ((bb - b) * xap) >> 8; 212 pix = *yp + *xp + 1 + pos;
213 rr = (R_VAL(pix) * yap) >> 10;
214 gg = (G_VAL(pix) * yap) >> 10;
215 bb = (B_VAL(pix) * yap) >> 10;
216 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
217 {
218 pix += src_w;
219 rr += (R_VAL(pix) * Cy) >> 10;
220 gg += (G_VAL(pix) * Cy) >> 10;
221 bb += (B_VAL(pix) * Cy) >> 10;
222 }
223 if (j > 0)
224 {
225 pix += src_w;
226 rr += (R_VAL(pix) * j) >> 10;
227 gg += (G_VAL(pix) * j) >> 10;
228 bb += (B_VAL(pix) * j) >> 10;
229 }
230 r += ((rr - r) * xap) >> 8;
231 g += ((gg - g) * xap) >> 8;
232 b += ((bb - b) * xap) >> 8;
233 }
234 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
235 xp++; xapp++;
211 } 236 }
212 *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4); 237
213 xp++; xapp++; 238 func(buf, NULL, dc->mul.col, dptr, w);
214 } 239 }
215 240#ifdef EVAS_SLI
216 func(buf, NULL, dc->mul.col, dptr, w); 241 ysli++;
217 242#endif
218 pbuf = buf; 243 pbuf = buf;
219 dptr += dst_w; dst_clip_w = w; 244 dptr += dst_w; dst_clip_w = w;
220 yp++; yapp++; 245 yp++; yapp++;
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 5ef020dca3..01ca8f92a4 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
@@ -1,7 +1,10 @@
1{ 1{
2 DATA32 *ptr; 2 DATA32 *ptr;
3 RGBA_Gfx_Func func; 3 RGBA_Gfx_Func func;
4 4#ifdef EVAS_SLI
5 int ysli = dst_clip_y;
6#endif
7
5 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;
6 if (dc->mul.use) 9 if (dc->mul.use)
7 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);
@@ -9,7 +12,15 @@
9 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); 12 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
10 while (dst_clip_h--) 13 while (dst_clip_h--)
11 { 14 {
12 func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w); 15#ifdef EVAS_SLI
16 if (((ysli) % dc->sli.h) == dc->sli.y)
17#endif
18 {
19 func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
20 }
21#ifdef EVAS_SLI
22 ysli++;
23#endif
13 ptr += src_w; 24 ptr += src_w;
14 dst_ptr += dst_w; 25 dst_ptr += dst_w;
15 } 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 8688af6d31..ac40ceb667 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
@@ -59,49 +59,59 @@
59 if (drh == srh) 59 if (drh == srh)
60 { 60 {
61 int sxx0 = sxx; 61 int sxx0 = sxx;
62 62#ifdef EVAS_SLI
63 int ysli = dst_clip_y;
64#endif
63 psrc = src->image->data + (src_w * (sry + cy)) + srx; 65 psrc = src->image->data + (src_w * (sry + cy)) + srx;
64 while (pdst < pdst_end) 66 while (pdst < pdst_end)
65 { 67 {
66 pbuf = buf; pbuf_end = buf + dst_clip_w; 68#ifdef EVAS_SLI
67 sxx = sxx0; 69 if (((ysli) % dc->sli.h) == dc->sli.y)
70#endif
71 {
72 pbuf = buf; pbuf_end = buf + dst_clip_w;
73 sxx = sxx0;
68#ifdef SCALE_USING_MMX 74#ifdef SCALE_USING_MMX
69 pxor_r2r(mm0, mm0); 75 pxor_r2r(mm0, mm0);
70 MOV_A2R(ALPHA_255, mm5) 76 MOV_A2R(ALPHA_255, mm5)
71#endif 77#endif
72 while (pbuf < pbuf_end) 78 while (pbuf < pbuf_end)
73 { 79 {
74 DATA32 p0, p1; 80 DATA32 p0, p1;
75 int ax; 81 int ax;
76 82
77 sx = (sxx >> 16); 83 sx = (sxx >> 16);
78 ax = 1 + ((sxx - (sx << 16)) >> 8); 84 ax = 1 + ((sxx - (sx << 16)) >> 8);
79 p0 = p1 = *(psrc + sx); 85 p0 = p1 = *(psrc + sx);
80 if ((sx + 1) < srw) 86 if ((sx + 1) < srw)
81 p1 = *(psrc + sx + 1); 87 p1 = *(psrc + sx + 1);
82#ifdef SCALE_USING_MMX 88#ifdef SCALE_USING_MMX
83 MOV_P2R(p0, mm1, mm0) 89 MOV_P2R(p0, mm1, mm0)
84 if (p0 | p1) 90 if (p0 | p1)
85 { 91 {
86 MOV_A2R(ax, mm3) 92 MOV_A2R(ax, mm3)
87 MOV_P2R(p1, mm2, mm0) 93 MOV_P2R(p1, mm2, mm0)
88 INTERP_256_R2R(mm3, mm2, mm1, mm5) 94 INTERP_256_R2R(mm3, mm2, mm1, mm5)
89 } 95 }
90 MOV_R2P(mm1, *pbuf, mm0) 96 MOV_R2P(mm1, *pbuf, mm0)
91 pbuf++; 97 pbuf++;
92#else 98#else
93 if (p0 | p1) 99 if (p0 | p1)
94 p0 = INTERP_256(ax, p1, p0); 100 p0 = INTERP_256(ax, p1, p0);
95 *pbuf++ = p0; 101 *pbuf++ = p0;
96#endif 102#endif
97 sxx += dsxx; 103 sxx += dsxx;
98 } 104 }
99 /* * blend here [clip_w *] buf -> dptr * */ 105 /* * blend here [clip_w *] buf -> dptr * */
100 if (!direct_scale) 106 if (!direct_scale)
101 func(buf, NULL, dc->mul.col, pdst, dst_clip_w); 107 func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
102 pdst += dst_w; 108 }
103 psrc += src_w; 109#ifdef EVAS_SLI
104 buf += buf_step; 110 ysli++;
111#endif
112 pdst += dst_w;
113 psrc += src_w;
114 buf += buf_step;
105 } 115 }
106 116
107 goto done_scale_up; 117 goto done_scale_up;
@@ -109,45 +119,56 @@
109 else if (drw == srw) 119 else if (drw == srw)
110 { 120 {
111 DATA32 *ps = src->image->data + (src_w * sry) + srx + cx; 121 DATA32 *ps = src->image->data + (src_w * sry) + srx + cx;
122#ifdef EVAS_SLI
123 int ysli = dst_clip_y;
124#endif
112 125
113 while (pdst < pdst_end) 126 while (pdst < pdst_end)
114 { 127 {
115 int ay; 128#ifdef EVAS_SLI
116 129 if (((ysli) % dc->sli.h) == dc->sli.y)
117 sy = syy >> 16; 130#endif
118 psrc = ps + (sy * src_w); 131 {
119 ay = 1 + ((syy - (sy << 16)) >> 8); 132 int ay;
133
134 sy = syy >> 16;
135 psrc = ps + (sy * src_w);
136 ay = 1 + ((syy - (sy << 16)) >> 8);
120#ifdef SCALE_USING_MMX 137#ifdef SCALE_USING_MMX
121 pxor_r2r(mm0, mm0); 138 pxor_r2r(mm0, mm0);
122 MOV_A2R(ALPHA_255, mm5) 139 MOV_A2R(ALPHA_255, mm5)
123 MOV_A2R(ay, mm4) 140 MOV_A2R(ay, mm4)
124#endif 141#endif
125 pbuf = buf; pbuf_end = buf + dst_clip_w; 142 pbuf = buf; pbuf_end = buf + dst_clip_w;
126 while (pbuf < pbuf_end) 143 while (pbuf < pbuf_end)
127 { 144 {
128 DATA32 p0 = *psrc, p2 = p0; 145 DATA32 p0 = *psrc, p2 = p0;
129 146
130 if ((sy + 1) < srh) 147 if ((sy + 1) < srh)
131 p2 = *(psrc + src_w); 148 p2 = *(psrc + src_w);
132#ifdef SCALE_USING_MMX 149#ifdef SCALE_USING_MMX
133 MOV_P2R(p0, mm1, mm0) 150 MOV_P2R(p0, mm1, mm0)
134 if (p0 | p2) 151 if (p0 | p2)
135 { 152 {
136 MOV_P2R(p2, mm2, mm0) 153 MOV_P2R(p2, mm2, mm0)
137 INTERP_256_R2R(mm4, mm2, mm1, mm5) 154 INTERP_256_R2R(mm4, mm2, mm1, mm5)
138 } 155 }
139 MOV_R2P(mm1, *pbuf, mm0) 156 MOV_R2P(mm1, *pbuf, mm0)
140 pbuf++; 157 pbuf++;
141#else 158#else
142 if (p0 | p2) 159 if (p0 | p2)
143 p0 = INTERP_256(ay, p2, p0); 160 p0 = INTERP_256(ay, p2, p0);
144 *pbuf++ = p0; 161 *pbuf++ = p0;
145#endif 162#endif
146 psrc++; 163 psrc++;
147 } 164 }
148 /* * blend here [clip_w *] buf -> dptr * */ 165 /* * blend here [clip_w *] buf -> dptr * */
149 if (!direct_scale) 166 if (!direct_scale)
150 func(buf, NULL, dc->mul.col, pdst, dst_clip_w); 167 func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
168 }
169#ifdef EVAS_SLI
170 ysli++;
171#endif
151 pdst += dst_w; 172 pdst += dst_w;
152 syy += dsyy; 173 syy += dsyy;
153 buf += buf_step; 174 buf += buf_step;
@@ -158,73 +179,84 @@
158 { 179 {
159 DATA32 *ps = src->image->data + (src_w * sry) + srx; 180 DATA32 *ps = src->image->data + (src_w * sry) + srx;
160 int sxx0 = sxx; 181 int sxx0 = sxx;
182#ifdef EVAS_SLI
183 int ysli = dst_clip_y;
184#endif
161 185
162 while (pdst < pdst_end) 186 while (pdst < pdst_end)
163 { 187 {
164 int ay; 188#ifdef EVAS_SLI
165 189 if (((ysli) % dc->sli.h) == dc->sli.y)
166 sy = syy >> 16; 190#endif
167 psrc = ps + (sy * src_w); 191 {
168 ay = 1 + ((syy - (sy << 16)) >> 8); 192 int ay;
193
194 sy = syy >> 16;
195 psrc = ps + (sy * src_w);
196 ay = 1 + ((syy - (sy << 16)) >> 8);
169#ifdef SCALE_USING_MMX 197#ifdef SCALE_USING_MMX
170 MOV_A2R(ay, mm4) 198 MOV_A2R(ay, mm4)
171 pxor_r2r(mm0, mm0); 199 pxor_r2r(mm0, mm0);
172 MOV_A2R(ALPHA_255, mm5) 200 MOV_A2R(ALPHA_255, mm5)
173#endif 201#endif
174 pbuf = buf; pbuf_end = buf + dst_clip_w; 202 pbuf = buf; pbuf_end = buf + dst_clip_w;
175 sxx = sxx0; 203 sxx = sxx0;
176 while (pbuf < pbuf_end) 204 while (pbuf < pbuf_end)
177 { 205 {
178 int ax; 206 int ax;
179 DATA32 *p, *q; 207 DATA32 *p, *q;
180 DATA32 p0, p1, p2, p3; 208 DATA32 p0, p1, p2, p3;
181 209
182 sx = sxx >> 16; 210 sx = sxx >> 16;
183 ax = 1 + ((sxx - (sx << 16)) >> 8); 211 ax = 1 + ((sxx - (sx << 16)) >> 8);
184 p = psrc + sx; q = p + src_w; 212 p = psrc + sx; q = p + src_w;
185 p0 = p1 = p2 = p3 = *p; 213 p0 = p1 = p2 = p3 = *p;
186 if ((sx + 1) < srw) 214 if ((sx + 1) < srw)
187 p1 = *(p + 1); 215 p1 = *(p + 1);
188 if ((sy + 1) < srh) 216 if ((sy + 1) < srh)
189 { 217 {
190 p2 = *q; p3 = p2; 218 p2 = *q; p3 = p2;
191 if ((sx + 1) < srw) 219 if ((sx + 1) < srw)
192 p3 = *(q + 1); 220 p3 = *(q + 1);
193 } 221 }
194#ifdef SCALE_USING_MMX 222#ifdef SCALE_USING_MMX
195 MOV_A2R(ax, mm6) 223 MOV_A2R(ax, mm6)
196 MOV_P2R(p0, mm1, mm0) 224 MOV_P2R(p0, mm1, mm0)
197 if (p0 | p1) 225 if (p0 | p1)
198 { 226 {
199 MOV_P2R(p1, mm2, mm0) 227 MOV_P2R(p1, mm2, mm0)
200 INTERP_256_R2R(mm6, mm2, mm1, mm5) 228 INTERP_256_R2R(mm6, mm2, mm1, mm5)
201 } 229 }
202 MOV_P2R(p2, mm2, mm0) 230 MOV_P2R(p2, mm2, mm0)
203 if (p2 | p3) 231 if (p2 | p3)
204 { 232 {
205 MOV_P2R(p3, mm3, mm0) 233 MOV_P2R(p3, mm3, mm0)
206 INTERP_256_R2R(mm6, mm3, mm2, mm5) 234 INTERP_256_R2R(mm6, mm3, mm2, mm5)
207 } 235 }
208 INTERP_256_R2R(mm4, mm2, mm1, mm5) 236 INTERP_256_R2R(mm4, mm2, mm1, mm5)
209 MOV_R2P(mm1, *pbuf, mm0) 237 MOV_R2P(mm1, *pbuf, mm0)
210 pbuf++; 238 pbuf++;
211#else 239#else
212 if (p0 | p1) 240 if (p0 | p1)
213 p0 = INTERP_256(ax, p1, p0); 241 p0 = INTERP_256(ax, p1, p0);
214 if (p2 | p3) 242 if (p2 | p3)
215 p2 = INTERP_256(ax, p3, p2); 243 p2 = INTERP_256(ax, p3, p2);
216 if (p0 | p2) 244 if (p0 | p2)
217 p0 = INTERP_256(ay, p2, p0); 245 p0 = INTERP_256(ay, p2, p0);
218 *pbuf++ = p0; 246 *pbuf++ = p0;
219#endif 247#endif
220 sxx += dsxx; 248 sxx += dsxx;
221 } 249 }
222 /* * blend here [clip_w *] buf -> dptr * */ 250 /* * blend here [clip_w *] buf -> dptr * */
223 if (!direct_scale) 251 if (!direct_scale)
224 func(buf, NULL, dc->mul.col, pdst, dst_clip_w); 252 func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
225 pdst += dst_w; 253 }
226 syy += dsyy; 254#ifdef EVAS_SLI
227 buf += buf_step; 255 ysli++;
256#endif
257 pdst += dst_w;
258 syy += dsyy;
259 buf += buf_step;
228 } 260 }
229 } 261 }
230 done_scale_up: 262 done_scale_up:
diff --git a/legacy/evas/src/lib/include/evas_common.h b/legacy/evas/src/lib/include/evas_common.h
index bea7276310..89a1627bb3 100644
--- a/legacy/evas/src/lib/include/evas_common.h
+++ b/legacy/evas/src/lib/include/evas_common.h
@@ -22,7 +22,12 @@
22# define LKU(x) pthread_mutex_unlock(&(x)); 22# define LKU(x) pthread_mutex_unlock(&(x));
23# define TH(x) pthread_t x 23# define TH(x) pthread_t x
24# define THI(x) int x 24# define THI(x) int x
25# define TH_MAX 4 25# define TH_MAX 8
26
27// even though in theory having every Nth rendered line done by a different
28// thread might even out load across threads - it actually slows things down.
29//#define EVAS_SLI 1
30
26#else 31#else
27# define LK(x) 32# define LK(x)
28# define LKI(x) 33# define LKI(x)
@@ -255,8 +260,11 @@ struct _RGBA_Draw_Context
255 struct { 260 struct {
256 int color_space; 261 int color_space;
257 } interpolation; 262 } interpolation;
258 unsigned char anti_alias : 1; 263 struct {
264 int y, h;
265 } sli;
259 int render_op; 266 int render_op;
267 unsigned char anti_alias : 1;
260}; 268};
261 269
262struct _RGBA_Surface 270struct _RGBA_Surface
@@ -978,9 +986,10 @@ EAPI Cutout_Rect *evas_common_draw_context_cutouts_split (Cutout_Rect
978EAPI Cutout_Rect *evas_common_draw_context_cutout_split (Cutout_Rect *in, Cutout_Rect *split); 986EAPI Cutout_Rect *evas_common_draw_context_cutout_split (Cutout_Rect *in, Cutout_Rect *split);
979EAPI Cutout_Rect *evas_common_draw_context_cutout_merge (Cutout_Rect *in, Cutout_Rect *merge); 987EAPI Cutout_Rect *evas_common_draw_context_cutout_merge (Cutout_Rect *in, Cutout_Rect *merge);
980EAPI void evas_common_draw_context_set_anti_alias (RGBA_Draw_Context *dc, unsigned char aa); 988EAPI void evas_common_draw_context_set_anti_alias (RGBA_Draw_Context *dc, unsigned char aa);
981EAPI void evas_common_draw_context_set_color_interpolation (RGBA_Draw_Context *dc, int color_space); 989EAPI void evas_common_draw_context_set_color_interpolation(RGBA_Draw_Context *dc, int color_space);
982EAPI void evas_common_draw_context_set_render_op (RGBA_Draw_Context *dc, int op); 990EAPI void evas_common_draw_context_set_render_op (RGBA_Draw_Context *dc, int op);
983 991EAPI void evas_common_draw_context_set_sli (RGBA_Draw_Context *dc, int y, int h);
992
984/****/ 993/****/
985/* image rendering pipelines... new optional system - non-immediate and 994/* image rendering pipelines... new optional system - non-immediate and
986 * threadable 995 * threadable