summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/engines/common/evas_scale_sample.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-04-22 11:47:14 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-04-22 11:47:14 +0000
commitc885080057631dbb7e99b20d1f4fcc9b6076a5a7 (patch)
tree6d207c09f02db1b75f3c0549c91755659b09b357 /legacy/evas/src/lib/engines/common/evas_scale_sample.c
parent02ee0d1ee65f6a79bc2397d1b9c93e90eaa1032c (diff)
an initial test at trying pixman instead of evas software rendering.
results... in comments. disabled atm unless u --enable it. only replaces 1 operation in 2 cases. SVN revision: 58824
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_sample.c56
1 files changed, 40 insertions, 16 deletions
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 9eefe14c4e..68d9e4990d 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_sample.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_sample.c
@@ -257,24 +257,48 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
257 257
258 if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h)) 258 if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h))
259 { 259 {
260 ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; 260#ifdef HAVE_PIXMAN
261 for (y = 0; y < dst_clip_h; y++) 261 if ((1) &&
262 { 262 (src->pixman.im) && (dst->pixman.im) &&
263 /* * blend here [clip_w *] ptr -> dst_ptr * */ 263 ((!dc->mul.use) ||
264 if (mask) 264 ((dc->mul.use) && (dc->mul.col == 0xffffffff))) &&
265 { 265 ((dc->render_op == _EVAS_RENDER_COPY) ||
266 mask += dst_clip_x - dc->mask.x; 266 (dc->render_op == _EVAS_RENDER_BLEND))
267 mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w; 267 )
268 } 268 {
269 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
270 if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER;
271 pixman_image_composite(op,
272 src->pixman.im, NULL,
273 dst->pixman.im,
274 (dst_clip_x - dst_region_x) + src_region_x,
275 (dst_clip_y - dst_region_y) + src_region_y,
276 0, 0,
277 dst_clip_x, dst_clip_y,
278 dst_clip_w, dst_clip_h);
279 }
280 else
281#endif
282 {
283 ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
284 for (y = 0; y < dst_clip_h; y++)
285 {
286 /* * blend here [clip_w *] ptr -> dst_ptr * */
287 if (mask)
288 {
289 mask += dst_clip_x - dc->mask.x;
290 mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
291 }
269#ifdef EVAS_SLI 292#ifdef EVAS_SLI
270 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) 293 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
271#endif 294#endif
272 { 295 {
273 func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w); 296 func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
274 } 297 }
275 ptr += src_w; 298 ptr += src_w;
276 dst_ptr += dst_w; 299 dst_ptr += dst_w;
277 if (mask) mask += maskobj->cache_entry.w; 300 if (mask) mask += maskobj->cache_entry.w;
301 }
278 } 302 }
279 } 303 }
280 else 304 else