summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorSanghee Park <sh15.park@samsung.com>2011-12-23 11:50:29 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-12-23 11:50:29 +0000
commit550b8417c704bb64a57767dbab0894ae8a718c4a (patch)
treea19374776a755e7c61d7a2c79afeabdcb673e018 /legacy
parentbd24931df18c774c5f43cc6d3bcc1e1baa0c2649 (diff)
From: Sanghee Park <sh15.park@samsung.com>
Subject: Drawing objects by pixman * Extend pixman support to allow other operations to use pixman when doing software rendering. On x86 this isn't useful but on ARMv7 with NEON pixman happens to do better with image blending and nearest scale blending. * Add tiled rotator for 32bit display as an option. SVN revision: 66478
Diffstat (limited to '')
-rw-r--r--legacy/evas/ChangeLog8
-rw-r--r--legacy/evas/configure.ac77
-rw-r--r--legacy/evas/src/lib/engines/common/evas_convert_rgb_32.c347
-rw-r--r--legacy/evas/src/lib/engines/common/evas_draw_main.c68
-rw-r--r--legacy/evas/src/lib/engines/common/evas_font_draw.c135
-rw-r--r--legacy/evas/src/lib/engines/common/evas_image_main.c54
-rw-r--r--legacy/evas/src/lib/engines/common/evas_line_main.c478
-rw-r--r--legacy/evas/src/lib/engines/common/evas_polygon_main.c36
-rw-r--r--legacy/evas/src/lib/engines/common/evas_rectangle_main.c34
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_sample.c113
-rw-r--r--legacy/evas/src/lib/include/evas_common.h28
-rw-r--r--legacy/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c2
12 files changed, 1083 insertions, 297 deletions
diff --git a/legacy/evas/ChangeLog b/legacy/evas/ChangeLog
index 62ccfcf9e1..c3105e96ed 100644
--- a/legacy/evas/ChangeLog
+++ b/legacy/evas/ChangeLog
@@ -584,3 +584,11 @@
584 * Fix bug in ico loader that causes crashes (eina_file_close 584 * Fix bug in ico loader that causes crashes (eina_file_close
585 bug and mis-read of uchar into int). 585 bug and mis-read of uchar into int).
586 586
5872011-12-23 Sanghee Park
588
589 * Extend pixman support to allow other operations to use
590 pixman when doing software rendering. On x86 this isn't useful
591 but on ARMv7 with NEON pixman happens to do better with image
592 blending and nearest scale blending.
593 * Add tiled rotator for 32bit display as an option.
594
diff --git a/legacy/evas/configure.ac b/legacy/evas/configure.ac
index 6b5609c158..ef7d7a6591 100644
--- a/legacy/evas/configure.ac
+++ b/legacy/evas/configure.ac
@@ -404,8 +404,8 @@ fi
404# Pixman 404# Pixman
405have_pixman="no" 405have_pixman="no"
406AC_ARG_ENABLE([pixman], 406AC_ARG_ENABLE([pixman],
407 AC_HELP_STRING([--disable-pixman], 407 AC_HELP_STRING([--enable-pixman],
408 [disable pixman for software rendering. @<:@default=enabled@:>@]), 408 [enable pixman for software rendering. @<:@default=enabled@:>@]),
409 [ 409 [
410 if test "x${enableval}" = "xyes" ; then 410 if test "x${enableval}" = "xyes" ; then
411 want_pixman="yes" 411 want_pixman="yes"
@@ -430,6 +430,69 @@ if test "x${want_pixman}" = "xyes" -o "x${want_pixman}" = "xauto" ; then
430 ]) 430 ])
431fi 431fi
432 432
433have_pixman_font="no"
434AC_ARG_ENABLE(pixman-font,
435 AC_HELP_STRING([--enable-pixman-font], [Allow pixman to render fonts]),
436 [
437 have_pixman_font="yes"
438 AC_DEFINE(PIXMAN_FONT, 1, [Allow pixman to render fonts])
439 ]
440)
441
442have_pixman_rect="no"
443AC_ARG_ENABLE(pixman-rect,
444 AC_HELP_STRING([--enable-pixman-rect], [Allow pixman to render rects]),
445 [
446 have_pixman_rect="yes"
447 AC_DEFINE(PIXMAN_RECT, 1, [Allow pixman to render rects])
448 ]
449)
450
451have_pixman_line="no"
452AC_ARG_ENABLE(pixman-line,
453 AC_HELP_STRING([--enable-pixman-line], [Allow pixman to render lines]),
454 [
455 have_pixman_line="yes"
456 AC_DEFINE(PIXMAN_LINE, 1, [Allow pixman to render lines])
457 ]
458)
459
460have_pixman_poly="no"
461AC_ARG_ENABLE(pixman-poly,
462 AC_HELP_STRING([--enable-pixman-poly], [Allow pixman to render polys]),
463 [
464 have_pixman_poly="yes"
465 AC_DEFINE(PIXMAN_POLY, 1, [Allow pixman to render polys])
466 ]
467)
468
469have_pixman_image="no"
470AC_ARG_ENABLE(pixman-image,
471 AC_HELP_STRING([--enable-pixman-image], [Allow pixman to render images]),
472 [
473 have_pixman_image="yes"
474 AC_DEFINE(PIXMAN_IMAGE, 1, [Allow pixman to render images])
475 ]
476)
477
478have_pixman_image_scale_sample="no"
479AC_ARG_ENABLE(pixman-image-scale-sample,
480 AC_HELP_STRING([--enable-pixman-image-scale-sample], [Allow pixman to render sampled scaled images]),
481 [
482 have_pixman_image_scale_sample="yes"
483 AC_DEFINE(PIXMAN_IMAGE_SCALE_SAMPLE, 1, [Allow pixman to render image sampled scaling])
484 ]
485)
486
487have_tile_rotate="no"
488AC_ARG_ENABLE(tile-rotate,
489 AC_HELP_STRING([--enable-tile-rotate], [Enable tiled rotate algorithm]),
490 [
491 have_tile_rotate="yes"
492 AC_DEFINE(TILE_ROTATE, 1, [Enable tiled rotate algorithm])
493 ]
494)
495
433### Checks for header files 496### Checks for header files
434AC_HEADER_STDC 497AC_HEADER_STDC
435AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h netinet/in.h sys/mman.h]) 498AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h netinet/in.h sys/mman.h])
@@ -2023,6 +2086,16 @@ echo
2023echo " Word Cache..............: $want_word_cache" 2086echo " Word Cache..............: $want_word_cache"
2024echo " Metric Cache............: $want_metric_cache" 2087echo " Metric Cache............: $want_metric_cache"
2025echo 2088echo
2089echo " Pixman..................: $have_pixman"
2090echo " Pixman Fonts............: $have_pixman_font"
2091echo " Pixman Rects............: $have_pixman_rect"
2092echo " Pixman Lines............: $have_pixman_line"
2093echo " Pixman Polygons.........: $have_pixman_poly"
2094echo " Pixman Images...........: $have_pixman_image"
2095echo " Pixman Image ScaleSample: $have_pixman_image_scale_sample"
2096echo
2097echo " Tiled 32BPP rotate......: $have_tile_rotate"
2098echo
2026echo "ARGB Software Engine Options:" 2099echo "ARGB Software Engine Options:"
2027echo " Sampling Scaler.........: $scaler_sample" 2100echo " Sampling Scaler.........: $scaler_sample"
2028echo " Smooth Scaler...........: $scaler_smooth" 2101echo " Smooth Scaler...........: $scaler_smooth"
diff --git a/legacy/evas/src/lib/engines/common/evas_convert_rgb_32.c b/legacy/evas/src/lib/engines/common/evas_convert_rgb_32.c
index 565e0d09fb..0401a4a7b4 100644
--- a/legacy/evas/src/lib/engines/common/evas_convert_rgb_32.c
+++ b/legacy/evas/src/lib/engines/common/evas_convert_rgb_32.c
@@ -48,15 +48,167 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int
48#endif 48#endif
49#endif 49#endif
50 50
51#ifdef TILE_ROTATE
52#define FAST_SIMPLE_ROTATE(suffix, pix_type) \
53 static void \
54 blt_rotated_90_trivial_##suffix(pix_type *dst, \
55 int dst_stride, \
56 const pix_type *src, \
57 int src_stride, \
58 int w, \
59 int h) \
60 { \
61 int x, y; \
62 for (y = 0; y < h; y++) \
63 { \
64 const pix_type *s = src + (h - y - 1); \
65 pix_type *d = dst + (dst_stride * y); \
66 for (x = 0; x < w; x++) \
67 { \
68 *d++ = *s; \
69 s += src_stride; \
70 } \
71 } \
72 } \
73 static void \
74 blt_rotated_270_trivial_##suffix(pix_type *dst, \
75 int dst_stride, \
76 const pix_type *src, \
77 int src_stride, \
78 int w, \
79 int h) \
80 { \
81 int x, y; \
82 for (y = 0; y < h; y++) \
83 { \
84 const pix_type *s = src + (src_stride * (w - 1)) + y; \
85 pix_type *d = dst + (dst_stride * y); \
86 for (x = 0; x < w; x++) \
87 { \
88 *d++ = *s; \
89 s -= src_stride; \
90 } \
91 } \
92 } \
93 static void \
94 blt_rotated_90_##suffix(pix_type *dst, \
95 int dst_stride, \
96 const pix_type *src, \
97 int src_stride, \
98 int w, \
99 int h) \
100 { \
101 int x, leading_pixels = 0, trailing_pixels = 0; \
102 const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \
103 if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \
104 { \
105 leading_pixels = TILE_SIZE - \
106 (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \
107 if (leading_pixels > w) \
108 leading_pixels = w; \
109 blt_rotated_90_trivial_##suffix(dst, \
110 dst_stride, \
111 src, \
112 src_stride, \
113 leading_pixels, \
114 h); \
115 dst += leading_pixels; \
116 src += leading_pixels * src_stride; \
117 w -= leading_pixels; \
118 } \
119 if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \
120 { \
121 trailing_pixels = (((uintptr_t)(dst + w) & \
122 (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \
123 if (trailing_pixels > w) \
124 trailing_pixels = w; \
125 w -= trailing_pixels; \
126 } \
127 for (x = 0; x < w; x += TILE_SIZE) \
128 { \
129 blt_rotated_90_trivial_##suffix(dst + x, \
130 dst_stride, \
131 src + (src_stride * x), \
132 src_stride, \
133 TILE_SIZE, \
134 h); \
135 } \
136 if (trailing_pixels) \
137 blt_rotated_90_trivial_##suffix(dst + w, \
138 dst_stride, \
139 src + (w * src_stride), \
140 src_stride, \
141 trailing_pixels, \
142 h); \
143 } \
144 static void \
145 blt_rotated_270_##suffix(pix_type *dst, \
146 int dst_stride, \
147 const pix_type *src, \
148 int src_stride, \
149 int w, \
150 int h) \
151 { \
152 int x, leading_pixels = 0, trailing_pixels = 0; \
153 const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \
154 if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \
155 { \
156 leading_pixels = TILE_SIZE - \
157 (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \
158 if (leading_pixels > w) \
159 leading_pixels = w; \
160 blt_rotated_270_trivial_##suffix(dst, \
161 dst_stride, \
162 src + (src_stride * (w - leading_pixels)), \
163 src_stride, \
164 leading_pixels, \
165 h); \
166 dst += leading_pixels; \
167 w -= leading_pixels; \
168 } \
169 if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \
170 { \
171 trailing_pixels = (((uintptr_t)(dst + w) & \
172 (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \
173 if (trailing_pixels > w) \
174 trailing_pixels = w; \
175 w -= trailing_pixels; \
176 src += trailing_pixels * src_stride; \
177 } \
178 for (x = 0; x < w; x += TILE_SIZE) \
179 { \
180 blt_rotated_270_trivial_##suffix(dst + x, \
181 dst_stride, \
182 src + (src_stride * (w - x - TILE_SIZE)), \
183 src_stride, \
184 TILE_SIZE, \
185 h); \
186 } \
187 if (trailing_pixels) \
188 blt_rotated_270_trivial_##suffix(dst + w, \
189 dst_stride, \
190 src - (trailing_pixels * src_stride), \
191 src_stride, \
192 trailing_pixels, \
193 h); \
194 }
195
196FAST_SIMPLE_ROTATE(8888, DATA8)
197#endif
198
199
51#ifdef BUILD_CONVERT_32_RGB_8888 200#ifdef BUILD_CONVERT_32_RGB_8888
52#ifdef BUILD_CONVERT_32_RGB_ROT270 201#ifdef BUILD_CONVERT_32_RGB_ROT270
53void 202void
54evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) 203evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
55{ 204{
205#ifdef TILE_ROTATE
206 blt_rotated_270_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ;
207#else
56 DATA32 *src_ptr; 208 DATA32 *src_ptr;
57 DATA32 *dst_ptr; 209 DATA32 *dst_ptr;
58 int x, y; 210 int x, y;
59 211
60 dst_ptr = (DATA32 *)dst; 212 dst_ptr = (DATA32 *)dst;
61 213
62 CONVERT_LOOP_START_ROT_270(); 214 CONVERT_LOOP_START_ROT_270();
@@ -64,6 +216,7 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int
64 *dst_ptr = *src_ptr; 216 *dst_ptr = *src_ptr;
65 217
66 CONVERT_LOOP_END_ROT_270(); 218 CONVERT_LOOP_END_ROT_270();
219#endif
67 return; 220 return;
68} 221}
69#endif 222#endif
@@ -74,106 +227,118 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int
74void 227void
75evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) 228evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
76{ 229{
77#ifndef BUILD_NEON 230# ifndef BUILD_NEON
231# ifdef TILE_ROTATE
232 blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ;
233# else
78 DATA32 *src_ptr; 234 DATA32 *src_ptr;
79 DATA32 *dst_ptr; 235 DATA32 *dst_ptr;
80 int x, y; 236 int x, y;
81 237
82 dst_ptr = (DATA32 *)dst; 238 dst_ptr = (DATA32 *)dst;
83 CONVERT_LOOP_START_ROT_90(); 239 CONVERT_LOOP_START_ROT_90();
84 240
85 *dst_ptr = *src_ptr; 241 *dst_ptr = *src_ptr;
86 242
87 CONVERT_LOOP_END_ROT_90(); 243 CONVERT_LOOP_END_ROT_90();
88#else 244# endif
245
246# else
247
248# ifdef TILE_ROTATE
249 blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ;
250# else
89 if ((w & 1) || (h & 1)) 251 if ((w & 1) || (h & 1))
90 { 252 {
91 /* Rarely (if ever) if ever: so slow path is fine */ 253 /* Rarely (if ever) if ever: so slow path is fine */
92 DATA32 *src_ptr; 254 DATA32 *src_ptr;
93 DATA32 *dst_ptr; 255 DATA32 *dst_ptr;
94 int x, y; 256 int x, y;
95 257
96 dst_ptr = (DATA32 *)dst; 258 dst_ptr = (DATA32 *)dst;
97 CONVERT_LOOP_START_ROT_90(); 259 CONVERT_LOOP_START_ROT_90();
98 260
99 *dst_ptr = *src_ptr; 261 *dst_ptr = *src_ptr;
100 262
101 CONVERT_LOOP_END_ROT_90(); 263 CONVERT_LOOP_END_ROT_90();
102 } else { 264 }
103#define AP "convert_rgba32_rot_90_" 265 else
104 asm volatile ( 266 {
105 ".fpu neon \n\t" 267# define AP "convert_rgba32_rot_90_"
106 " mov %[s1], %[src] \n\t" 268 asm volatile (
107 " add %[s1], %[s1], %[h],lsl #2 \n\t" 269 ".fpu neon \n\t"
108 " sub %[s1], #8 \n\t" 270 " mov %[s1], %[src] \n\t"
109 271 " add %[s1], %[s1], %[h],lsl #2 \n\t"
110 " mov %[s2], %[src] \n\t" 272 " sub %[s1], #8 \n\t"
111 " add %[s2], %[s2], %[h], lsl #3 \n\t" 273
112 " add %[s2], %[s2], %[sjmp], lsr #1 \n\t" 274 " mov %[s2], %[src] \n\t"
113 " sub %[s2], #8 \n\t" 275 " add %[s2], %[s2], %[h], lsl #3 \n\t"
114 276 " add %[s2], %[s2], %[sjmp], lsr #1 \n\t"
115 " mov %[d1], %[dst] \n\t" 277 " sub %[s2], #8 \n\t"
116 278
117 " add %[d2], %[d1], %[djmp] \n\t" 279 " mov %[d1], %[dst] \n\t"
118 " add %[d2], %[d2], %[w], lsl #2 \n\t" 280
119 281 " add %[d2], %[d1], %[djmp] \n\t"
120 " mov %[sadv], %[h], lsl #3 \n\t" 282 " add %[d2], %[d2], %[w], lsl #2 \n\t"
121 " add %[sadv], %[sadv], %[sjmp], lsl #1\n\t" 283
122 284 " mov %[sadv], %[h], lsl #3 \n\t"
123 " mov %[y], #0 \n\t" 285 " add %[sadv], %[sadv], %[sjmp], lsl #1\n\t"
124 " mov %[x], #0 \n\t" 286
125 AP"loop: \n\t" 287 " mov %[y], #0 \n\t"
126 " vld1.u32 d0, [%[s1]] \n\t" 288 " mov %[x], #0 \n\t"
127 " vld1.u32 d1, [%[s2]] \n\t" 289 AP"loop: \n\t"
128 " add %[x], #2 \n\t" 290 " vld1.u32 d0, [%[s1]] \n\t"
129 " add %[s1], %[sadv] \n\t" 291 " vld1.u32 d1, [%[s2]] \n\t"
130 " add %[s2], %[sadv] \n\t" 292 " add %[x], #2 \n\t"
131 " vtrn.u32 d0, d1 \n\t" 293 " add %[s1], %[sadv] \n\t"
132 " cmp %[x], %[w] \n\t" 294 " add %[s2], %[sadv] \n\t"
133 " vst1.u32 d1, [%[d1]]! \n\t" 295 " vtrn.u32 d0, d1 \n\t"
134 " vst1.u32 d0, [%[d2]]! \n\t" 296 " cmp %[x], %[w] \n\t"
135 " blt "AP"loop \n\t" 297 " vst1.u32 d1, [%[d1]]! \n\t"
136 298 " vst1.u32 d0, [%[d2]]! \n\t"
137 " mov %[x], #0 \n\t" 299 " blt "AP"loop \n\t"
138 " add %[d1], %[djmp] \n\t" 300
139 " add %[d1], %[d1], %[w], lsl #2 \n\t" 301 " mov %[x], #0 \n\t"
140 " add %[d2], %[djmp] \n\t" 302 " add %[d1], %[djmp] \n\t"
141 " add %[d2], %[d2], %[w], lsl #2 \n\t" 303 " add %[d1], %[d1], %[w], lsl #2 \n\t"
142 304 " add %[d2], %[djmp] \n\t"
143 " mov %[s1], %[src] \n\t" 305 " add %[d2], %[d2], %[w], lsl #2 \n\t"
144 " add %[s1], %[s1], %[h], lsl #2 \n\t" 306
145 " sub %[s1], %[s1], %[y], lsl #2 \n\t" 307 " mov %[s1], %[src] \n\t"
146 " sub %[s1], #16 \n\t" 308 " add %[s1], %[s1], %[h], lsl #2 \n\t"
147 309 " sub %[s1], %[s1], %[y], lsl #2 \n\t"
148 " add %[s2], %[s1], %[h], lsl #2 \n\t" 310 " sub %[s1], #16 \n\t"
149 " add %[s2], %[s2], %[sjmp], lsl #2 \n\t" 311
150 312 " add %[s2], %[s1], %[h], lsl #2 \n\t"
151 " add %[y], #2 \n\t" 313 " add %[s2], %[s2], %[sjmp], lsl #2 \n\t"
152 314
153 " cmp %[y], %[h] \n\t" 315 " add %[y], #2 \n\t"
154 " blt "AP"loop \n\t" 316
155 317 " cmp %[y], %[h] \n\t"
156 : // Out 318 " blt "AP"loop \n\t"
157 : [s1] "r" (1), 319
158 [s2] "r" (11), 320 : // Out
159 [d1] "r" (2), 321 : [s1] "r" (1),
160 [d2] "r" (12), 322 [s2] "r" (11),
161 [src] "r" (src), 323 [d1] "r" (2),
162 [dst] "r" (dst), 324 [d2] "r" (12),
163 [x] "r" (3), 325 [src] "r" (src),
164 [y] "r" (4), 326 [dst] "r" (dst),
165 [w] "r" (w), 327 [x] "r" (3),
166 [h] "r" (h), 328 [y] "r" (4),
167 [sadv] "r" (5), 329 [w] "r" (w),
168 [sjmp] "r" (src_jump * 4), 330 [h] "r" (h),
169 [djmp] "r" (dst_jump * 4 * 2) 331 [sadv] "r" (5),
170 : "d0", "d1", "memory", "cc"// Clober 332 [sjmp] "r" (src_jump * 4),
171 333 [djmp] "r" (dst_jump * 4 * 2)
172 334 : "d0", "d1", "memory", "cc"// Clober
173 ); 335
174 } 336
175#undef AP 337 );
176#endif 338 }
339# undef AP
340# endif
341# endif
177 return; 342 return;
178} 343}
179#endif 344#endif
@@ -448,7 +613,7 @@ evas_common_convert_rgba_to_32bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump,
448 613
449 CONVERT_LOOP_START_ROT_0(); 614 CONVERT_LOOP_START_ROT_0();
450 615
451 *dst_ptr = 616 *dst_ptr =
452 (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) | 617 (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) |
453 ((G_VAL(src_ptr) << 4) & 0x000fc0); 618 ((G_VAL(src_ptr) << 4) & 0x000fc0);
454 619
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 7652708b22..def19a822c 100644
--- a/legacy/evas/src/lib/engines/common/evas_draw_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_draw_main.c
@@ -75,6 +75,14 @@ evas_common_draw_context_free(RGBA_Draw_Context *dc)
75{ 75{
76 if (!dc) return; 76 if (!dc) return;
77 77
78#ifdef HAVE_PIXMAN
79 if (dc->col.pixman_color_image)
80 {
81 pixman_image_unref(dc->col.pixman_color_image);
82 dc->col.pixman_color_image = NULL;
83 }
84#endif
85
78 evas_common_draw_context_apply_clean_cutouts(&dc->cutout); 86 evas_common_draw_context_apply_clean_cutouts(&dc->cutout);
79 free(dc); 87 free(dc);
80} 88}
@@ -133,6 +141,20 @@ evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, i
133 G_VAL(&(dc->col.col)) = (DATA8)g; 141 G_VAL(&(dc->col.col)) = (DATA8)g;
134 B_VAL(&(dc->col.col)) = (DATA8)b; 142 B_VAL(&(dc->col.col)) = (DATA8)b;
135 A_VAL(&(dc->col.col)) = (DATA8)a; 143 A_VAL(&(dc->col.col)) = (DATA8)a;
144#ifdef HAVE_PIXMAN
145 if (dc && dc->col.pixman_color_image)
146 pixman_image_unref(dc->col.pixman_color_image);
147
148 pixman_color_t pixman_color;
149
150 pixman_color.alpha = (dc->col.col & 0xff000000) >> 16;
151 pixman_color.red = (dc->col.col & 0x00ff0000) >> 8;
152 pixman_color.green = (dc->col.col & 0x0000ff00);
153 pixman_color.blue = (dc->col.col & 0x000000ff) << 8;
154
155 dc->col.pixman_color_image = pixman_image_create_solid_fill(&pixman_color);
156#endif
157
136} 158}
137 159
138EAPI void 160EAPI void
@@ -159,12 +181,42 @@ evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x
159 dc->mask.y = y; 181 dc->mask.y = y;
160 dc->mask.w = w; 182 dc->mask.w = w;
161 dc->mask.h = h; 183 dc->mask.h = h;
184
185#ifdef HAVE_PIXMAN
186 if (mask->pixman.im)
187 pixman_image_unref(mask->pixman.im);
188
189 if (mask->cache_entry.flags.alpha)
190 {
191 mask->pixman.im = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h,
192 (uint32_t *)mask->mask.mask,
193 w * 4);
194 }
195 else
196 {
197 mask->pixman.im = pixman_image_create_bits(PIXMAN_x8r8g8b8, w, h,
198 (uint32_t *)mask->mask.mask,
199 w * 4);
200 }
201#endif
202
162} 203}
163 204
164EAPI void 205EAPI void
165evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc) 206evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc)
166{ 207{
167 dc->mask.mask = NULL; 208 dc->mask.mask = NULL;
209
210#ifdef HAVE_PIXMAN
211 RGBA_Image *mask;
212 mask = (RGBA_Image *)dc->mask.mask;
213
214 if (mask && mask->pixman.im)
215 {
216 pixman_image_unref(mask->pixman.im);
217 mask->pixman.im = NULL;
218 }
219#endif
168} 220}
169 221
170 222
@@ -179,32 +231,32 @@ evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w,
179 { 231 {
180#if 1 // this is a bit faster 232#if 1 // this is a bit faster
181 int xa1, xa2, xb1, xb2; 233 int xa1, xa2, xb1, xb2;
182 234
183 xa1 = x; 235 xa1 = x;
184 xa2 = xa1 + w - 1; 236 xa2 = xa1 + w - 1;
185 xb1 = dc->clip.x; 237 xb1 = dc->clip.x;
186 if (xa2 < xb1) return; 238 if (xa2 < xb1) return;
187 xb2 = xb1 + dc->clip.w - 1; 239 xb2 = xb1 + dc->clip.w - 1;
188 if (xa1 >= xb2) return; 240 if (xa1 >= xb2) return;
189 if (xa2 > xb2) xa2 = xb2; 241 if (xa2 > xb2) xa2 = xb2;
190 if (xb1 > xa1) xa1 = xb1; 242 if (xb1 > xa1) xa1 = xb1;
191 x = xa1; 243 x = xa1;
192 w = xa2 - xa1 + 1; 244 w = xa2 - xa1 + 1;
193 245
194 xa1 = y; 246 xa1 = y;
195 xa2 = xa1 + h - 1; 247 xa2 = xa1 + h - 1;
196 xb1 = dc->clip.y; 248 xb1 = dc->clip.y;
197 if (xa2 < xb1) return; 249 if (xa2 < xb1) return;
198 xb2 = xb1 + dc->clip.h - 1; 250 xb2 = xb1 + dc->clip.h - 1;
199 if (xa1 >= xb2) return; 251 if (xa1 >= xb2) return;
200 if (xa2 > xb2) xa2 = xb2; 252 if (xa2 > xb2) xa2 = xb2;
201 if (xb1 > xa1) xa1 = xb1; 253 if (xb1 > xa1) xa1 = xb1;
202 y = xa1; 254 y = xa1;
203 h = xa2 - xa1 + 1; 255 h = xa2 - xa1 + 1;
204#else 256#else
205 RECTS_CLIP_TO_RECT(x, y, w, h, 257 RECTS_CLIP_TO_RECT(x, y, w, h,
206 dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); 258 dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
207#endif 259#endif
208 if ((w < 1) || (h < 1)) return; 260 if ((w < 1) || (h < 1)) return;
209 } 261 }
210 evas_common_draw_context_cutouts_add(&dc->cutout, x, y, w, h); 262 evas_common_draw_context_cutouts_add(&dc->cutout, x, y, w, h);
@@ -513,7 +565,7 @@ evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc)
513 565
514 if (!dc->clip.use) return NULL; 566 if (!dc->clip.use) return NULL;
515 if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return NULL; 567 if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return NULL;
516 568
517 569
518 res = evas_common_draw_context_cutouts_new(); 570 res = evas_common_draw_context_cutouts_new();
519 evas_common_draw_context_cutouts_add(res, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); 571 evas_common_draw_context_cutouts_add(res, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
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 94aa08500b..638cdfe247 100644
--- a/legacy/evas/src/lib/engines/common/evas_font_draw.c
+++ b/legacy/evas/src/lib/engines/common/evas_font_draw.c
@@ -22,7 +22,7 @@
22 22
23static int max_cached_words = WORD_CACHE_NWORDS; 23static int max_cached_words = WORD_CACHE_NWORDS;
24 24
25struct prword 25struct prword
26{ 26{
27 EINA_INLIST; 27 EINA_INLIST;
28 struct cinfo *cinfo; 28 struct cinfo *cinfo;
@@ -34,16 +34,16 @@ struct prword
34 int baseline; 34 int baseline;
35}; 35};
36 36
37struct cinfo 37struct cinfo
38{ 38{
39 FT_UInt index; 39 FT_UInt index;
40 struct 40 struct
41 { 41 {
42 int x, y; 42 int x, y;
43 } pos; 43 } pos;
44 int posx; 44 int posx;
45 RGBA_Font_Glyph *fg; 45 RGBA_Font_Glyph *fg;
46 struct 46 struct
47 { 47 {
48 int w,h; 48 int w,h;
49 int rows; 49 int rows;
@@ -77,11 +77,11 @@ evas_common_font_draw_init(void)
77#ifdef EVAS_FRAME_QUEUING 77#ifdef EVAS_FRAME_QUEUING
78EAPI void 78EAPI void
79evas_common_font_draw_finish(void) 79evas_common_font_draw_finish(void)
80{ 80{
81} 81}
82#endif 82#endif
83 83
84/* 84/*
85 * BiDi handling: We receive the shaped string + other props from text_props, 85 * BiDi handling: We receive the shaped string + other props from text_props,
86 * we need to reorder it so we'll have the visual string (the way we draw) 86 * we need to reorder it so we'll have the visual string (the way we draw)
87 * and then for kerning we have to switch the order of the kerning query (as the prev 87 * and then for kerning we have to switch the order of the kerning query (as the prev
@@ -89,7 +89,7 @@ evas_common_font_draw_finish(void)
89 */ 89 */
90static void 90static void
91evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn __UNUSED__, int x, int y, 91evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn __UNUSED__, int x, int y,
92 const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, 92 const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w,
93 int ext_h, int im_w, int im_h __UNUSED__) 93 int ext_h, int im_w, int im_h __UNUSED__)
94{ 94{
95 DATA32 *im; 95 DATA32 *im;
@@ -136,7 +136,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
136 { 136 {
137 xrun -= x + xrun - ext_x - ext_w; 137 xrun -= x + xrun - ext_x - ext_w;
138 } 138 }
139 if (x < ext_x) 139 if (x < ext_x)
140 { 140 {
141 int excess = ext_x - x; 141 int excess = ext_x - x;
142 xstart = excess - 1; 142 xstart = excess - 1;
@@ -244,10 +244,29 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
244 if (j < w) j = w; 244 if (j < w) j = w;
245 h = fg->glyph_out->bitmap.rows; 245 h = fg->glyph_out->bitmap.rows;
246 /* 246 /*
247 if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays) 247 if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays)
248 && (fg->glyph_out->bitmap.num_grays == 256) 248 && (fg->glyph_out->bitmap.num_grays == 256)
249 ) 249 )
250 */ 250 */
251
252#ifdef HAVE_PIXMAN
253# ifdef PIXMAN_FONT
254 int index;
255 DATA32 *font_alpha_buffer;
256 pixman_image_t *font_mask_image;
257
258 font_alpha_buffer = alloca(w * h * sizeof(DATA32));
259 for (index = 0; index < (w * h); index++)
260 font_alpha_buffer[index] = data[index] << 24;
261
262 font_mask_image = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h,
263 font_alpha_buffer,
264 w * sizeof(DATA32));
265
266 if (!font_mask_image) return;
267# endif
268#endif
269
251 { 270 {
252 if ((j > 0) && (chr_x + w > ext_x)) 271 if ((j > 0) && (chr_x + w > ext_x))
253 { 272 {
@@ -255,44 +274,63 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
255 { 274 {
256 /* ext glyph draw */ 275 /* ext glyph draw */
257 dc->font_ext.func.gl_draw(dc->font_ext.data, 276 dc->font_ext.func.gl_draw(dc->font_ext.data,
258 (void *)dst, 277 (void *)dst,
259 dc, fg, chr_x, 278 dc, fg, chr_x,
260 y - (chr_y - y)); 279 y - (chr_y - y));
261 } 280 }
262 else 281 else
263 { 282 {
264 if ((fg->glyph_out->bitmap.num_grays == 256) && 283 if ((fg->glyph_out->bitmap.num_grays == 256) &&
265 (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)) 284 (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY))
266 { 285 {
267 for (i = 0; i < h; i++) 286#ifdef HAVE_PIXMAN
287# ifdef PIXMAN_FONT
288 if ((dst->pixman.im) &&
289 (dc->col.pixman_color_image))
290 pixman_image_composite(PIXMAN_OP_OVER,
291 dc->col.pixman_color_image,
292 font_mask_image,
293 dst->pixman.im,
294 chr_x,
295 y - (chr_y - y),
296 0, 0,
297 chr_x,
298 y - (chr_y - y),
299 w, h);
300 else
301# endif
302#endif
268 { 303 {
269 int dx, dy; 304 for (i = 0; i < h; i++)
270 int in_x, in_w; 305 {
271 306 int dx, dy;
272 in_x = 0; 307 int in_x, in_w;
273 in_w = 0; 308
274 dx = chr_x; 309 in_x = 0;
275 dy = y - (chr_y - i - y); 310 in_w = 0;
311 dx = chr_x;
312 dy = y - (chr_y - i - y);
276#ifdef EVAS_SLI 313#ifdef EVAS_SLI
277 if (((dy) % dc->sli.h) == dc->sli.y) 314 if (((dy) % dc->sli.h) == dc->sli.y)
278#endif 315#endif
279 {
280 if ((dx < (ext_x + ext_w)) &&
281 (dy >= (ext_y)) &&
282 (dy < (ext_y + ext_h)))
283 { 316 {
284 if (dx + w > (ext_x + ext_w)) 317 if ((dx < (ext_x + ext_w)) &&
285 in_w += (dx + w) - (ext_x + ext_w); 318 (dy >= (ext_y)) &&
286 if (dx < ext_x) 319 (dy < (ext_y + ext_h)))
287 { 320 {
288 in_w += ext_x - dx; 321 if (dx + w > (ext_x + ext_w))
289 in_x = ext_x - dx; 322 in_w += (dx + w) - (ext_x + ext_w);
290 dx = ext_x; 323 if (dx < ext_x)
291 } 324 {
292 if (in_w < w) 325 in_w += ext_x - dx;
293 { 326 in_x = ext_x - dx;
294 func(NULL, data + (i * j) + in_x, dc->col.col, 327 dx = ext_x;
295 im + (dy * im_w) + dx, w - in_w); 328 }
329 if (in_w < w)
330 {
331 func(NULL, data + (i * j) + in_x, dc->col.col,
332 im + (dy * im_w) + dx, w - in_w);
333 }
296 } 334 }
297 } 335 }
298 } 336 }
@@ -309,7 +347,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
309 { 347 {
310 int dx, dy; 348 int dx, dy;
311 int in_x, in_w, end; 349 int in_x, in_w, end;
312 350
313 in_x = 0; 351 in_x = 0;
314 in_w = 0; 352 in_w = 0;
315 dx = chr_x; 353 dx = chr_x;
@@ -333,8 +371,8 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
333 dp++; 371 dp++;
334 } 372 }
335 if ((dx < (ext_x + ext_w)) && 373 if ((dx < (ext_x + ext_w)) &&
336 (dy >= (ext_y)) && 374 (dy >= (ext_y)) &&
337 (dy < (ext_y + ext_h))) 375 (dy < (ext_y + ext_h)))
338 { 376 {
339 if (dx + w > (ext_x + ext_w)) 377 if (dx + w > (ext_x + ext_w))
340 in_w += (dx + w) - (ext_x + ext_w); 378 in_w += (dx + w) - (ext_x + ext_w);
@@ -347,7 +385,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
347 if (in_w < w) 385 if (in_w < w)
348 { 386 {
349 func(NULL, tmpbuf + in_x, dc->col.col, 387 func(NULL, tmpbuf + in_x, dc->col.col,
350 im + (dy * im_w) + dx, w - in_w); 388 im + (dy * im_w) + dx, w - in_w);
351 } 389 }
352 } 390 }
353 } 391 }
@@ -356,6 +394,11 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
356 } 394 }
357 } 395 }
358 } 396 }
397#ifdef HAVE_PIXMAN
398# ifdef PIXMAN_FONT
399 pixman_image_unref(font_mask_image);
400# endif
401#endif
359 } 402 }
360 else 403 else
361 break; 404 break;
@@ -573,7 +616,7 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_prop
573 } 616 }
574 } 617 }
575 } 618 }
576 else 619 else
577 { 620 {
578 im = NULL; 621 im = NULL;
579 } 622 }
@@ -599,7 +642,7 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_prop
599 { 642 {
600 struct prword *last = (struct prword *)(words->last); 643 struct prword *last = (struct prword *)(words->last);
601 644
602 if (last) 645 if (last)
603 { 646 {
604 if (last->im) free(last->im); 647 if (last->im) free(last->im);
605 if (last->cinfo) free(last->cinfo); 648 if (last->cinfo) free(last->cinfo);
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 d4d847ccaa..188fca1bc7 100644
--- a/legacy/evas/src/lib/engines/common/evas_image_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_image_main.c
@@ -145,7 +145,7 @@ _evas_common_rgba_image_new(void)
145#endif 145#endif
146 146
147 evas_common_rgba_image_scalecache_init(&im->cache_entry); 147 evas_common_rgba_image_scalecache_init(&im->cache_entry);
148 148
149 return &im->cache_entry; 149 return &im->cache_entry;
150} 150}
151 151
@@ -161,7 +161,7 @@ _evas_common_rgba_image_delete(Image_Entry *ie)
161 LKD(im->cache_entry.ref_fq_del); 161 LKD(im->cache_entry.ref_fq_del);
162 eina_condition_free(&(im->cache_entry.cond_fq_del)); 162 eina_condition_free(&(im->cache_entry.cond_fq_del));
163# endif 163# endif
164#endif 164#endif
165 evas_common_rgba_image_scalecache_shutdown(&im->cache_entry); 165 evas_common_rgba_image_scalecache_shutdown(&im->cache_entry);
166 if (ie->info.module) evas_module_unref((Evas_Module *)ie->info.module); 166 if (ie->info.module) evas_module_unref((Evas_Module *)ie->info.module);
167 /* memset the image to 0x99 because i recently saw a segv where an 167 /* memset the image to 0x99 because i recently saw a segv where an
@@ -173,13 +173,13 @@ _evas_common_rgba_image_delete(Image_Entry *ie)
173// memset(im, 0x99, sizeof(im)); 173// memset(im, 0x99, sizeof(im));
174#ifdef EVAS_CSERVE 174#ifdef EVAS_CSERVE
175 if (ie->data1) evas_cserve_image_free(ie); 175 if (ie->data1) evas_cserve_image_free(ie);
176#endif 176#endif
177/* 177/*
178 * FIXME: This doesn't seem to be needed... But I'm not sure why. 178 * FIXME: This doesn't seem to be needed... But I'm not sure why.
179 * -- nash 179 * -- nash
180 { 180 {
181 Filtered_Image *fi; 181 Filtered_Image *fi;
182 182
183 EINA_LIST_FREE(im->filtered, fi) 183 EINA_LIST_FREE(im->filtered, fi)
184 { 184 {
185 free(fi->key); 185 free(fi->key);
@@ -249,8 +249,8 @@ evas_common_rgba_image_unload(Image_Entry *ie)
249#endif 249#endif
250 return; 250 return;
251 } 251 }
252#endif 252#endif
253 253
254 if (im->image.data && !im->image.no_free) 254 if (im->image.data && !im->image.no_free)
255 free(im->image.data); 255 free(im->image.data);
256 im->image.data = NULL; 256 im->image.data = NULL;
@@ -266,18 +266,19 @@ void
266_evas_common_rgba_image_post_surface(Image_Entry *ie) 266_evas_common_rgba_image_post_surface(Image_Entry *ie)
267{ 267{
268#ifdef HAVE_PIXMAN 268#ifdef HAVE_PIXMAN
269 RGBA_Image *im = (RGBA_Image *) ie; 269# ifdef PIXMAN_IMAGE
270 270 RGBA_Image *im = (RGBA_Image *)ie;
271
271 if (im->pixman.im) pixman_image_unref(im->pixman.im); 272 if (im->pixman.im) pixman_image_unref(im->pixman.im);
272 if (im->cache_entry.flags.alpha) 273 if (im->cache_entry.flags.alpha)
273 { 274 {
274 im->pixman.im = pixman_image_create_bits 275 im->pixman.im = pixman_image_create_bits
275 ( 276 (
276// FIXME: endianess determines this 277// FIXME: endianess determines this
277 PIXMAN_a8r8g8b8, 278 PIXMAN_a8r8g8b8,
278// PIXMAN_b8g8r8a8, 279// PIXMAN_b8g8r8a8,
279 im->cache_entry.w, im->cache_entry.h, 280 im->cache_entry.w, im->cache_entry.h,
280 im->image.data, 281 im->image.data,
281 im->cache_entry.w * 4 282 im->cache_entry.w * 4
282 ); 283 );
283 } 284 }
@@ -285,14 +286,17 @@ _evas_common_rgba_image_post_surface(Image_Entry *ie)
285 { 286 {
286 im->pixman.im = pixman_image_create_bits 287 im->pixman.im = pixman_image_create_bits
287 ( 288 (
288// FIXME: endianess determines this 289// FIXME: endianess determines this
289 PIXMAN_x8r8g8b8, 290 PIXMAN_x8r8g8b8,
290// PIXMAN_b8g8r8x8, 291// PIXMAN_b8g8r8x8,
291 im->cache_entry.w, im->cache_entry.h, 292 im->cache_entry.w, im->cache_entry.h,
292 im->image.data, 293 im->image.data,
293 im->cache_entry.w * 4 294 im->cache_entry.w * 4
294 ); 295 );
295 } 296 }
297# else
298 ie = NULL;
299# endif
296#else 300#else
297 ie = NULL; 301 ie = NULL;
298#endif 302#endif
@@ -306,7 +310,7 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned
306 310
307#ifdef EVAS_CSERVE 311#ifdef EVAS_CSERVE
308 if (ie->data1) return 0; 312 if (ie->data1) return 0;
309#endif 313#endif
310 if (im->image.no_free) return 0; 314 if (im->image.no_free) return 0;
311 315
312 if (im->flags & RGBA_IMAGE_ALPHA_ONLY) 316 if (im->flags & RGBA_IMAGE_ALPHA_ONLY)
@@ -328,7 +332,7 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned
328# endif 332# endif
329#endif 333#endif
330 _evas_common_rgba_image_post_surface(ie); 334 _evas_common_rgba_image_post_surface(ie);
331 335
332 return 0; 336 return 0;
333} 337}
334 338
@@ -338,12 +342,14 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie)
338 RGBA_Image *im = (RGBA_Image *) ie; 342 RGBA_Image *im = (RGBA_Image *) ie;
339 343
340#ifdef HAVE_PIXMAN 344#ifdef HAVE_PIXMAN
345# ifdef PIXMAN_IMAGE
341 if (im->pixman.im) 346 if (im->pixman.im)
342 { 347 {
343 pixman_image_unref(im->pixman.im); 348 pixman_image_unref(im->pixman.im);
344 im->pixman.im = NULL; 349 im->pixman.im = NULL;
345 } 350 }
346#endif 351# endif
352#endif
347 if (ie->file) 353 if (ie->file)
348 DBG("unload: [%p] %s %s", ie, ie->file, ie->key); 354 DBG("unload: [%p] %s %s", ie, ie->file, ie->key);
349 if ((im->cs.data) && (im->image.data)) 355 if ((im->cs.data) && (im->image.data))
@@ -364,7 +370,7 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie)
364#ifdef EVAS_CSERVE 370#ifdef EVAS_CSERVE
365 else if (ie->data1) 371 else if (ie->data1)
366 evas_cserve_image_free(ie); 372 evas_cserve_image_free(ie);
367#endif 373#endif
368 374
369 im->image.data = NULL; 375 im->image.data = NULL;
370 ie->allocated.w = 0; 376 ie->allocated.w = 0;
@@ -391,7 +397,7 @@ _evas_common_rgba_image_dirty_region(Image_Entry* ie, unsigned int x __UNUSED__,
391 397
392#ifdef EVAS_CSERVE 398#ifdef EVAS_CSERVE
393 if (ie->data1) evas_cserve_image_free(ie); 399 if (ie->data1) evas_cserve_image_free(ie);
394#endif 400#endif
395 im->flags |= RGBA_IMAGE_IS_DIRTY; 401 im->flags |= RGBA_IMAGE_IS_DIRTY;
396 evas_common_rgba_image_scalecache_dirty(&im->cache_entry); 402 evas_common_rgba_image_scalecache_dirty(&im->cache_entry);
397} 403}
@@ -411,13 +417,13 @@ _evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src)
411 { 417 {
412#ifdef EVAS_CSERVE 418#ifdef EVAS_CSERVE
413 if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); 419 if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src);
414#endif 420#endif
415 return 1; 421 return 1;
416 } 422 }
417 423
418#ifdef EVAS_CSERVE 424#ifdef EVAS_CSERVE
419 if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); 425 if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src);
420#endif 426#endif
421 evas_common_image_colorspace_normalize(src); 427 evas_common_image_colorspace_normalize(src);
422 evas_common_image_colorspace_normalize(dst); 428 evas_common_image_colorspace_normalize(dst);
423/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ 429/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */
@@ -431,18 +437,18 @@ _evas_common_rgba_image_ram_usage(Image_Entry *ie)
431{ 437{
432 RGBA_Image *im = (RGBA_Image *)ie; 438 RGBA_Image *im = (RGBA_Image *)ie;
433 int size = sizeof(struct _RGBA_Image); 439 int size = sizeof(struct _RGBA_Image);
434 440
435 if (ie->cache_key) size += strlen(ie->cache_key); 441 if (ie->cache_key) size += strlen(ie->cache_key);
436 if (ie->file) size += strlen(ie->file); 442 if (ie->file) size += strlen(ie->file);
437 if (ie->key) size += strlen(ie->key); 443 if (ie->key) size += strlen(ie->key);
438 444
439 if (im->image.data) 445 if (im->image.data)
440 { 446 {
441#ifdef EVAS_CSERVE 447#ifdef EVAS_CSERVE
442 if ((!im->image.no_free) || (ie->data1)) 448 if ((!im->image.no_free) || (ie->data1))
443#else 449#else
444 if ((!im->image.no_free)) 450 if ((!im->image.no_free))
445#endif 451#endif
446 size += im->cache_entry.w * im->cache_entry.h * sizeof(DATA32); 452 size += im->cache_entry.w * im->cache_entry.h * sizeof(DATA32);
447 } 453 }
448 size += evas_common_rgba_image_scalecache_usage_get(&im->cache_entry); 454 size += evas_common_rgba_image_scalecache_usage_get(&im->cache_entry);
@@ -590,7 +596,7 @@ evas_common_image_colorspace_normalize(RGBA_Image *im)
590 { 596 {
591#ifdef EVAS_CSERVE 597#ifdef EVAS_CSERVE
592 if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry); 598 if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry);
593#endif 599#endif
594 if (!im->image.no_free) free(im->image.data); 600 if (!im->image.no_free) free(im->image.data);
595 im->image.data = im->cs.data; 601 im->image.data = im->cs.data;
596 im->cs.no_free = im->image.no_free; 602 im->cs.no_free = im->image.no_free;
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 04401cbe36..dabbcd0350 100644
--- a/legacy/evas/src/lib/engines/common/evas_line_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_line_main.c
@@ -109,9 +109,24 @@ _evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y)
109 return; 109 return;
110 if ((dc->clip.use) && (!IN_RECT(x, y, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h))) 110 if ((dc->clip.use) && (!IN_RECT(x, y, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h)))
111 return; 111 return;
112 pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op); 112#ifdef HAVE_PIXMAN
113 if (pfunc) 113# ifdef PIXMAN_LINE
114 pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x); 114 pixman_op_t op = PIXMAN_OP_SRC;
115
116 if (dc->render_op == _EVAS_RENDER_BLEND)
117 op = PIXMAN_OP_OVER;
118
119 if ((dst->pixman.im) && (dc->col.pixman_color_image))
120 pixman_image_composite(op, dc->col.pixman_color_image, NULL,
121 dst->pixman.im, x, y, 0, 0, x, y, 1, 1);
122 else
123# endif
124#endif
125 {
126 pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op);
127 if (pfunc)
128 pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x);
129 }
115} 130}
116 131
117/* 132/*
@@ -130,6 +145,14 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
130 RGBA_Gfx_Pt_Func pfunc; 145 RGBA_Gfx_Pt_Func pfunc;
131 RGBA_Gfx_Func sfunc; 146 RGBA_Gfx_Func sfunc;
132 147
148#ifdef HAVE_PIXMAN
149# ifdef PIXMAN_LINE
150 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
151 if (dc->render_op == _EVAS_RENDER_BLEND)
152 op = PIXMAN_OP_OVER;
153# endif
154#endif
155
133 dstw = dst->cache_entry.w; 156 dstw = dst->cache_entry.w;
134 color = dc->col.col; 157 color = dc->col.col;
135 158
@@ -172,12 +195,30 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
172 195
173 len = x1 - x0 + 1; 196 len = x1 - x0 + 1;
174 p = dst->image.data + (dstw * y0) + x0; 197 p = dst->image.data + (dstw * y0) + x0;
175 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); 198#ifdef HAVE_PIXMAN
176 if (sfunc) 199# ifdef PIXMAN_LINE
177 sfunc(NULL, NULL, color, p, len); 200 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
178 } 201 (!dc->mask.mask))
179 } 202 pixman_image_composite(op, dc->col.pixman_color_image,
180 return; 203 NULL, dst->pixman.im,
204 x0, y0, 0, 0, x0, y0, len, 1);
205 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
206 (dc->mask.mask))
207 pixman_image_composite(op, dc->col.pixman_color_image,
208 dc->mask.mask->pixman.im,
209 dst->pixman.im,
210 x0, y0, 0, 0, x0, y0, len, 1);
211 else
212# endif
213#endif
214 {
215 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op);
216 if (sfunc)
217 sfunc(NULL, NULL, color, p, len);
218 }
219 }
220 }
221 return;
181 } 222 }
182 223
183 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); 224 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op);
@@ -192,17 +233,34 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
192 233
193 len = y1 - y0 + 1; 234 len = y1 - y0 + 1;
194 p = dst->image.data + (dstw * y0) + x0; 235 p = dst->image.data + (dstw * y0) + x0;
195 while (len--) 236#ifdef HAVE_PIXMAN
196 { 237# ifdef PIXMAN_LINE
238 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
239 (!dc->mask.mask))
240 pixman_image_composite(op, dc->col.pixman_color_image,
241 NULL, dst->pixman.im,
242 x0, y0, 0, 0, x0, y0, 1, len);
243 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
244 (dc->mask.mask))
245 pixman_image_composite(op, dc->col.pixman_color_image,
246 dc->mask.mask->pixman.im, dst->pixman.im,
247 x0, y0, 0, 0, x0, y0, 1, len);
248 else
249# endif
250#endif
251 {
252 while (len--)
253 {
197#ifdef EVAS_SLI 254#ifdef EVAS_SLI
198 if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) 255 if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
199#endif 256#endif
200 { 257 {
201 pfunc(0, 255, color, p); 258 pfunc(0, 255, color, p);
202 } 259 }
203 p += dstw; 260 p += dstw;
204 } 261 }
205 } 262 }
263 }
206 return; 264 return;
207 } 265 }
208 266
@@ -281,16 +339,52 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
281 if (dx > 0) dstw--; 339 if (dx > 0) dstw--;
282 else dstw++; 340 else dstw++;
283 } 341 }
284 342#ifdef HAVE_PIXMAN
343# ifdef PIXMAN_LINE
344 int pixman_x_position = x0;
345 int pixman_y_position = y0;
346 int x_unit = dstw - dst->cache_entry.w;
347# endif
348#endif
349
350
285 while (len--) 351 while (len--)
286 { 352 {
287#ifdef EVAS_SLI 353#ifdef EVAS_SLI
288 if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) 354 if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
289#endif 355#endif
290 { 356 {
291 pfunc(0, 255, color, p); 357#ifdef HAVE_PIXMAN
292 } 358# ifdef PIXMAN_LINE
293 p += dstw; 359 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
360 (!dc->mask.mask))
361 pixman_image_composite(op, dc->col.pixman_color_image,
362 NULL, dst->pixman.im,
363 pixman_x_position,
364 pixman_y_position,
365 0, 0, pixman_x_position,
366 pixman_y_position, 1, 1);
367 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
368 (dc->mask.mask))
369 pixman_image_composite(op, dc->col.pixman_color_image,
370 dc->mask.mask->pixman.im,
371 dst->pixman.im,
372 pixman_x_position,
373 pixman_y_position, 0, 0,
374 pixman_x_position,
375 pixman_y_position, 1, 1);
376 else
377# endif
378#endif
379 pfunc(0, 255, color, p);
380 }
381#ifdef HAVE_PIXMAN
382# ifdef PIXMAN_LINE
383 pixman_x_position += x_unit;
384 pixman_y_position += 1;
385# endif
386#endif
387 p += dstw;
294 } 388 }
295 } 389 }
296} 390}
@@ -456,6 +550,31 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
456 dx = x1 - x0; 550 dx = x1 - x0;
457 dy = y1 - y0; 551 dy = y1 - y0;
458 552
553#ifdef HAVE_PIXMAN
554# ifdef PIXMAN_LINE
555 int pix_x;
556 int pix_y;
557 int pix_x_unit;
558 int pix_y_unit;
559
560 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
561 if (dc->render_op == _EVAS_RENDER_BLEND)
562 op = PIXMAN_OP_OVER;
563 pix_x = x0;
564 pix_y = y0;
565
566 if (dx < 0)
567 pix_x_unit = -1;
568 else
569 pix_x_unit = 1;
570
571 if (dy < 0)
572 pix_y_unit = -1;
573 else
574 pix_y_unit = 1;
575# endif
576#endif
577
459 if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) 578 if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) )
460 { 579 {
461 _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); 580 _evas_draw_simple_line(dst, dc, x0, y0, x1, y1);
@@ -494,6 +613,11 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
494 prev_y = y; 613 prev_y = y;
495 p += dh; 614 p += dh;
496 py += dely; 615 py += dely;
616#ifdef HAVE_PIXMAN
617# ifdef PIXMAN_LINE
618 pix_y += pix_y_unit;
619# endif
620#endif
497 } 621 }
498 if (!p1_in) 622 if (!p1_in)
499 { 623 {
@@ -509,12 +633,37 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
509#endif 633#endif
510 { 634 {
511 if (IN_RANGE(px, py, clw, clh)) 635 if (IN_RANGE(px, py, clw, clh))
512 pfunc(0, 255, color, p); 636 {
513 } 637#ifdef HAVE_PIXMAN
514 next_x: 638# ifdef PIXMAN_LINE
515 yy += dyy; 639 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
516 px++; 640 (!dc->mask.mask))
517 p++; 641 pixman_image_composite(op, dc->col.pixman_color_image,
642 NULL, dst->pixman.im,
643 pix_x, pix_y, 0, 0,
644 pix_x, pix_y, 1, 1);
645 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
646 (dc->mask.mask))
647 pixman_image_composite(op, dc->col.pixman_color_image,
648 dc->mask.mask->pixman.im,
649 dst->pixman.im,
650 pix_x, pix_y, 0, 0,
651 pix_x, pix_y, 1, 1);
652 else
653# endif
654#endif
655 pfunc(0, 255, color, p);
656 }
657 }
658next_x:
659 yy += dyy;
660 px++;
661 p++;
662#ifdef HAVE_PIXMAN
663# ifdef PIXMAN_LINE
664 pix_x += pix_x_unit;
665# endif
666#endif
518 } 667 }
519 return; 668 return;
520 } 669 }
@@ -529,9 +678,14 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
529 x += ((xx - (x << 16)) >> 15); 678 x += ((xx - (x << 16)) >> 15);
530 if (prev_x != x) 679 if (prev_x != x)
531 { 680 {
532 prev_x = x; 681 prev_x = x;
533 px += delx; 682 px += delx;
534 p += delx; 683 p += delx;
684#ifdef HAVE_PIXMAN
685# ifdef PIXMAN_LINE
686 pix_x += pix_x_unit;
687# endif
688#endif
535 } 689 }
536 if (!p1_in) 690 if (!p1_in)
537 { 691 {
@@ -547,12 +701,38 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
547#endif 701#endif
548 { 702 {
549 if (IN_RANGE(px, py, clw, clh)) 703 if (IN_RANGE(px, py, clw, clh))
550 pfunc(0, 255, color, p); 704 {
551 } 705#ifdef HAVE_PIXMAN
552 next_y: 706# ifdef PIXMAN_LINE
707 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
708 (!dc->mask.mask))
709 pixman_image_composite(op, dc->col.pixman_color_image,
710 NULL, dst->pixman.im,
711 pix_x, pix_y, 0, 0,
712 pix_x, pix_y, 1, 1);
713 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
714 (dc->mask.mask))
715 pixman_image_composite(op, dc->col.pixman_color_image,
716 dc->mask.mask->pixman.im,
717 dst->pixman.im,
718 pix_x, pix_y, 0, 0,
719 pix_x, pix_y, 1, 1);
720 else
721# endif
722#endif
723 pfunc(0, 255, color, p);
724 }
725 }
726next_y:
553 xx += dxx; 727 xx += dxx;
554 py++; 728 py++;
555 p += dstw; 729 p += dstw;
730#ifdef HAVE_PIXMAN
731# ifdef PIXMAN_LINE
732 pix_y += pix_y_unit;
733# endif
734#endif
735
556 } 736 }
557} 737}
558 738
@@ -564,16 +744,47 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
564 int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 1; 744 int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 1;
565 int delx, dely, xx, yy, dxx, dyy; 745 int delx, dely, xx, yy, dxx, dyy;
566 int clx, cly, clw, clh; 746 int clx, cly, clw, clh;
567 int dstw; 747 int dstw, dsth;
568 DATA32 *p, *data, color; 748 DATA32 *p, *data, color;
569 RGBA_Gfx_Pt_Func pfunc; 749 RGBA_Gfx_Pt_Func pfunc;
570 750
751 dx = x1 - x0;
752 dy = y1 - y0;
753
754#ifdef HAVE_PIXMAN
755# ifdef PIXMAN_LINE
756 int pix_x;
757 int pix_y;
758 int pix_x_unit;
759 int pix_y_unit;
760
761 pixman_image_t *aa_mask_image;
762 int alpha_data_buffer;
763
764 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
765 if (dc->render_op == _EVAS_RENDER_BLEND)
766 op = PIXMAN_OP_OVER;
767 pix_x = x0;
768 pix_y = y0;
769
770 if (dx < 0)
771 pix_x_unit = -1;
772 else
773 pix_x_unit = 1;
774
775 if (dy < 0)
776 pix_y_unit = -1;
777 else
778 pix_y_unit = 1;
779# endif
780#endif
571 if (y0 > y1) 781 if (y0 > y1)
572 EXCHANGE_POINTS(x0, y0, x1, y1); 782 EXCHANGE_POINTS(x0, y0, x1, y1);
783
573 dx = x1 - x0; 784 dx = x1 - x0;
574 dy = y1 - y0; 785 dy = y1 - y0;
575 786
576 if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) 787 if ((dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy))
577 { 788 {
578 _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); 789 _evas_draw_simple_line(dst, dc, x0, y0, x1, y1);
579 return; 790 return;
@@ -590,6 +801,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
590 801
591 data = evas_cache_image_pixels(&dst->cache_entry); 802 data = evas_cache_image_pixels(&dst->cache_entry);
592 dstw = dst->cache_entry.w; 803 dstw = dst->cache_entry.w;
804 dsth = dst->cache_entry.h;
593 805
594 data += (dstw * cly) + clx; 806 data += (dstw * cly) + clx;
595 x0 -= clx; 807 x0 -= clx;
@@ -609,9 +821,14 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
609 y = (yy >> 16); 821 y = (yy >> 16);
610 if (prev_y != y) 822 if (prev_y != y)
611 { 823 {
612 prev_y = y; 824 prev_y = y;
613 p += dh; 825 p += dh;
614 py += dely; 826 py += dely;
827#ifdef HAVE_PIXMAN
828# ifdef PIXMAN_LINE
829 pix_y += pix_y_unit;
830# endif
831#endif
615 } 832 }
616 if (!p1_in) 833 if (!p1_in)
617 { 834 {
@@ -624,39 +841,109 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
624 } 841 }
625 if (px < clw) 842 if (px < clw)
626 { 843 {
627 aa = ((yy - (y << 16)) >> 8); 844 aa = ((yy - (y << 16)) >> 8);
628 if ((py) < clh) 845 if ((py) < clh)
629 pfunc(0, 255 - aa, color, p); 846 {
630 if ((py + 1) < clh) 847#ifdef HAVE_PIXMAN
631 pfunc(0, aa, color, p + dstw); 848# ifdef PIXMAN_LINE
632 } 849 alpha_data_buffer = 255 - aa;
633 850 aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
634 next_x: 851 (uint32_t *)&alpha_data_buffer, 4);
635 yy += dyy; 852
636 px++; 853 if ((dst->pixman.im) && (dc->col.pixman_color_image ) &&
637 p++; 854 (!dc->mask.mask))
855 pixman_image_composite(PIXMAN_OP_OVER,
856 dc->col.pixman_color_image,
857 aa_mask_image, dst->pixman.im,
858 pix_x, pix_y, 0, 0,
859 pix_x, pix_y, 1, 1);
860 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
861 (dc->mask.mask) )
862 pixman_image_composite(op, dc->col.pixman_color_image,
863 dc->mask.mask->pixman.im,
864 dst->pixman.im,
865 pix_x, pix_y, 0, 0,
866 pix_x, pix_y, 1, 1);
867 else
868# endif
869#endif
870 pfunc(0, 255 - aa, color, p);
871#ifdef HAVE_PIXMAN
872# ifdef PIXMAN_LINE
873 pixman_image_unref(aa_mask_image);
874# endif
875#endif
876 }
877 if ((py + 1) < clh)
878 {
879#ifdef HAVE_PIXMAN
880# ifdef PIXMAN_LINE
881 alpha_data_buffer = aa;
882 aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
883 (uint32_t *)&alpha_data_buffer, 4);
884
885 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
886 (!dc->mask.mask))
887 pixman_image_composite(PIXMAN_OP_OVER,
888 dc->col.pixman_color_image,
889 aa_mask_image, dst->pixman.im,
890 pix_x, pix_y + 1, 0, 0,
891 pix_x, pix_y + 1, 1, 1);
892 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
893 (dc->mask.mask))
894 pixman_image_composite(op, dc->col.pixman_color_image,
895 dc->mask.mask->pixman.im,
896 dst->pixman.im,
897 pix_x, pix_y + 1, 0, 0,
898 pix_x, pix_y + 1, 1, 1);
899 else
900# endif
901#endif
902 pfunc(0, aa, color, p + dstw);
903#ifdef HAVE_PIXMAN
904# ifdef PIXMAN_LINE
905 pixman_image_unref(aa_mask_image);
906# endif
907#endif
908 }
909 }
910
911next_x:
912 yy += dyy;
913 px++;
914 p++;
915#ifdef HAVE_PIXMAN
916# ifdef PIXMAN_LINE
917 pix_x += pix_x_unit;
918# endif
919#endif
638 } 920 }
639 return; 921 return;
640 } 922 }
641 923
642 /* steep: y-parametric */ 924 /* steep: y-parametric */
643 SETUP_LINE_STEEP; 925 SETUP_LINE_STEEP;
644 926
645 while (py < by) 927 while (py < by)
646 { 928 {
647 DATA8 aa; 929 DATA8 aa;
648 930
649 x = (xx >> 16); 931 x = (xx >> 16);
650 if (prev_x != x) 932 if (prev_x != x)
651 { 933 {
652 prev_x = x; 934 prev_x = x;
653 px += delx; 935 px += delx;
654 p += delx; 936 p += delx;
937#ifdef HAVE_PIXMAN
938# ifdef PIXMAN_LINE
939 pix_x += pix_x_unit;
940# endif
941#endif
655 } 942 }
656 if (!p1_in) 943 if (!p1_in)
657 { 944 {
658 if ((px < 0) && (delx < 0)) return; 945 if ((px < 0) && (delx < 0)) return;
659 if ((px > rx) && (delx > 0)) return; 946 if ((px > rx) && (delx > 0)) return;
660 } 947 }
661 if (!p0_in) 948 if (!p0_in)
662 { 949 {
@@ -664,15 +951,80 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
664 } 951 }
665 if (py < clh) 952 if (py < clh)
666 { 953 {
667 aa = ((xx - (x << 16)) >> 8); 954 aa = ((xx - (x << 16)) >> 8);
668 if ((px) < clw) 955 if ((px) < clw)
669 pfunc(0, 255 - aa, color, p); 956 {
670 if ((px + 1) < clw) 957#ifdef HAVE_PIXMAN
671 pfunc(0, aa, color, p + 1); 958# ifdef PIXMAN_LINE
672 } 959 alpha_data_buffer = 255 - aa;
960 aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, (uint32_t *)&alpha_data_buffer, 4);
961
962 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
963 (!dc->mask.mask))
964 pixman_image_composite(PIXMAN_OP_OVER,
965 dc->col.pixman_color_image,
966 aa_mask_image, dst->pixman.im,
967 pix_x, pix_y, 0, 0,
968 pix_x, pix_y, 1, 1);
969 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
970 (dc->mask.mask))
971 pixman_image_composite(op, dc->col.pixman_color_image,
972 dc->mask.mask->pixman.im,
973 dst->pixman.im,
974 pix_x, pix_y, 0, 0,
975 pix_x, pix_y, 1, 1);
976 else
977# endif
978#endif
979 pfunc(0, 255 - aa, color, p);
980#ifdef HAVE_PIXMAN
981# ifdef PIXMAN_LINE
982 pixman_image_unref(aa_mask_image);
983# endif
984#endif
985
986 }
987 if ((px + 1) < clw)
988 {
989#ifdef HAVE_PIXMAN
990# ifdef PIXMAN_LINE
991 alpha_data_buffer = aa;
992 aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
993 (uint32_t *)&alpha_data_buffer, 4);
994
995 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
996 (!dc->mask.mask))
997 pixman_image_composite(PIXMAN_OP_OVER,
998 dc->col.pixman_color_image,
999 aa_mask_image, dst->pixman.im,
1000 pix_x + 1, pix_y, 0, 0,
1001 pix_x + 1, pix_y, 1, 1);
1002 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
1003 (dc->mask.mask))
1004 pixman_image_composite(op, dc->col.pixman_color_image,
1005 dc->mask.mask->pixman.im,
1006 dst->pixman.im,
1007 pix_x + 1, pix_y, 0, 0,
1008 pix_x + 1, pix_y, 1, 1);
1009 else
1010# endif
1011#endif
1012 pfunc(0, aa, color, p + 1);
1013#ifdef HAVE_PIXMAN
1014# ifdef PIXMAN_LINE
1015 pixman_image_unref(aa_mask_image);
1016# endif
1017#endif
1018 }
1019 }
673 next_y: 1020 next_y:
674 xx += dxx; 1021 xx += dxx;
675 py++; 1022 py++;
676 p += dstw; 1023 p += dstw;
1024#ifdef HAVE_PIXMAN
1025# ifdef PIXMAN_LINE
1026 pix_y += pix_y_unit;
1027# endif
1028#endif
677 } 1029 }
678} 1030}
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 bca3f83db4..e0095a4a5f 100644
--- a/legacy/evas/src/lib/engines/common/evas_polygon_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_polygon_main.c
@@ -133,6 +133,14 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
133 int ext_x, ext_y, ext_w, ext_h; 133 int ext_x, ext_y, ext_w, ext_h;
134 int *sorted_index; 134 int *sorted_index;
135 135
136#ifdef HAVE_PIXMAN
137# ifdef PIXMAN_POLY
138 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
139 if (dc->render_op == _EVAS_RENDER_BLEND)
140 op = PIXMAN_OP_OVER;
141# endif
142#endif
143
136 ext_x = 0; 144 ext_x = 0;
137 ext_y = 0; 145 ext_y = 0;
138 ext_w = dst->cache_entry.w; 146 ext_w = dst->cache_entry.w;
@@ -279,10 +287,30 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
279 if (((span->y) % dc->sli.h) == dc->sli.y) 287 if (((span->y) % dc->sli.h) == dc->sli.y)
280#endif 288#endif
281 { 289 {
282 ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x; 290#ifdef HAVE_PIXMAN
283 func(NULL, NULL, dc->col.col, ptr, span->w); 291# ifdef PIXMAN_POLY
284 } 292 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
285 } 293 (!dc->mask.mask))
294 pixman_image_composite(op, dc->col.pixman_color_image,
295 NULL, dst->pixman.im,
296 span->x, span->y, 0, 0,
297 span->x, span->y, span->w, 1);
298 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
299 (dc->mask.mask))
300 pixman_image_composite(op, dc->col.pixman_color_image,
301 dc->mask.mask->pixman.im,
302 dst->pixman.im,
303 span->x, span->y, 0, 0,
304 span->x, span->y, span->w, 1);
305 else
306# endif
307#endif
308 {
309 ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x;
310 func(NULL, NULL, dc->col.col, ptr, span->w);
311 }
312 }
313 }
286 while (spans) 314 while (spans)
287 { 315 {
288 span = (RGBA_Span *)spans; 316 span = (RGBA_Span *)spans;
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 28aaf16519..fc25fd033b 100644
--- a/legacy/evas/src/lib/engines/common/evas_rectangle_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_rectangle_main.c
@@ -58,16 +58,34 @@ rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, in
58 RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); 58 RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
59 if ((w <= 0) || (h <= 0)) return; 59 if ((w <= 0) || (h <= 0)) return;
60 60
61 func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op); 61#ifdef HAVE_PIXMAN
62 ptr = dst->image.data + (y * dst->cache_entry.w) + x; 62# ifdef PIXMAN_RECT
63 for (yy = 0; yy < h; yy++) 63 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
64
65 if (dc->render_op == _EVAS_RENDER_BLEND)
66 op = PIXMAN_OP_OVER;
67
68 if ((dst->pixman.im) && (dc->col.pixman_color_image))
64 { 69 {
70 pixman_image_composite(op, dc->col.pixman_color_image, NULL,
71 dst->pixman.im, x, y, 0, 0,
72 x, y, w, h);
73 }
74 else
75# endif
76#endif
77 {
78 func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op);
79 ptr = dst->image.data + (y * dst->cache_entry.w) + x;
80 for (yy = 0; yy < h; yy++)
81 {
65#ifdef EVAS_SLI 82#ifdef EVAS_SLI
66 if (((yy + y) % dc->sli.h) == dc->sli.y) 83 if (((yy + y) % dc->sli.h) == dc->sli.y)
67#endif 84#endif
68 { 85 {
69 func(NULL, NULL, dc->col.col, ptr, w); 86 func(NULL, NULL, dc->col.col, ptr, w);
70 } 87 }
71 ptr += dst->cache_entry.w; 88 ptr += dst->cache_entry.w;
89 }
72 } 90 }
73} 91}
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 54b8e92dc7..a8951b8353 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_sample.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_sample.c
@@ -154,7 +154,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
154 dst_clip_w = m_clip_w; 154 dst_clip_w = m_clip_w;
155 dst_clip_h = m_clip_h; 155 dst_clip_h = m_clip_h;
156 } 156 }
157 157
158 if (dst_clip_x < dst_region_x) 158 if (dst_clip_x < dst_region_x)
159 { 159 {
160 dst_clip_w += dst_clip_x - dst_region_x; 160 dst_clip_w += dst_clip_x - dst_region_x;
@@ -258,7 +258,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
258 func = evas_common_gfx_func_composite_pixel_mask_span_get(src, dst, dst_clip_w, dc->render_op); 258 func = evas_common_gfx_func_composite_pixel_mask_span_get(src, dst, dst_clip_w, dc->render_op);
259 maskobj = dc->mask.mask; 259 maskobj = dc->mask.mask;
260 mask = maskobj->mask.mask; 260 mask = maskobj->mask.mask;
261/* 261/*
262 if (1 || dst_region_w > src_region_w || dst_region_h > src_region_h){ 262 if (1 || dst_region_w > src_region_w || dst_region_h > src_region_h){
263 printf("Mask w/h: %d/%d\n",maskobj->cache_entry.w, 263 printf("Mask w/h: %d/%d\n",maskobj->cache_entry.w,
264 maskobj->cache_entry.h); 264 maskobj->cache_entry.h);
@@ -276,26 +276,47 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
276 if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h)) 276 if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h))
277 { 277 {
278#ifdef HAVE_PIXMAN 278#ifdef HAVE_PIXMAN
279 if ((1) && 279# ifdef PIXMAN_IMAGE_SCALE_SAMPLE
280 (src->pixman.im) && (dst->pixman.im) && 280 if ((src->pixman.im) && (dst->pixman.im) && (!dc->mask.mask) &&
281 ((!dc->mul.use) || 281 ((!dc->mul.use) ||
282 ((dc->mul.use) && (dc->mul.col == 0xffffffff))) && 282 ((dc->mul.use) && (dc->mul.col == 0xffffffff))) &&
283 ((dc->render_op == _EVAS_RENDER_COPY) || 283 ((dc->render_op == _EVAS_RENDER_COPY) ||
284 (dc->render_op == _EVAS_RENDER_BLEND)) 284 (dc->render_op == _EVAS_RENDER_BLEND)))
285 )
286 { 285 {
287 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY 286 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
288 if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; 287 if (dc->render_op == _EVAS_RENDER_BLEND)
288 op = PIXMAN_OP_OVER;
289
289 pixman_image_composite(op, 290 pixman_image_composite(op,
290 src->pixman.im, NULL, 291 src->pixman.im, NULL,
291 dst->pixman.im, 292 dst->pixman.im,
292 (dst_clip_x - dst_region_x) + src_region_x, 293 (dst_clip_x - dst_region_x) + src_region_x,
293 (dst_clip_y - dst_region_y) + src_region_y, 294 (dst_clip_y - dst_region_y) + src_region_y,
294 0, 0, 295 0, 0,
295 dst_clip_x, dst_clip_y, 296 dst_clip_x, dst_clip_y,
297 dst_clip_w, dst_clip_h);
298 }
299 else if ((src->pixman.im) && (dst->pixman.im) &&
300 (dc->mask.mask) && (dc->mask.mask->pixman.im) &&
301 ((dc->render_op == _EVAS_RENDER_COPY) ||
302 (dc->render_op == _EVAS_RENDER_BLEND)))
303 {
304 // In case of pixel and color operation.
305 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
306 if (dc->render_op == _EVAS_RENDER_BLEND)
307 op = PIXMAN_OP_OVER;
308
309 pixman_image_composite(op,
310 src->pixman.im, dc->mask.mask->pixman.im,
311 dst->pixman.im,
312 (dst_clip_x - dst_region_x) + src_region_x,
313 (dst_clip_y - dst_region_y) + src_region_y,
314 0, 0,
315 dst_clip_x, dst_clip_y,
296 dst_clip_w, dst_clip_h); 316 dst_clip_w, dst_clip_h);
297 } 317 }
298 else 318 else
319# endif
299#endif 320#endif
300 { 321 {
301 ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; 322 ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
@@ -322,59 +343,59 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
322 } 343 }
323 else 344 else
324 { 345 {
325 /* fill scale tables */ 346 /* fill scale tables */
326 for (x = 0; x < dst_clip_w; x++) 347 for (x = 0; x < dst_clip_w; x++)
327 lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x; 348 lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x;
328 for (y = 0; y < dst_clip_h; y++) 349 for (y = 0; y < dst_clip_h; y++)
329 row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h) 350 row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h)
330 + src_region_y) * src_w); 351 + src_region_y) * src_w);
331 /* scale to dst */ 352 /* scale to dst */
332 dptr = dst_ptr; 353 dptr = dst_ptr;
333#ifdef DIRECT_SCALE 354#ifdef DIRECT_SCALE
334 if ((!src->cache_entry.flags.alpha) && 355 if ((!src->cache_entry.flags.alpha) &&
335 (!dst->cache_entry.flags.alpha) && 356 (!dst->cache_entry.flags.alpha) &&
336 (!dc->mul.use)) 357 (!dc->mul.use))
337 { 358 {
338 for (y = 0; y < dst_clip_h; y++) 359 for (y = 0; y < dst_clip_h; y++)
339 { 360 {
340#ifdef EVAS_SLI 361# ifdef EVAS_SLI
341 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) 362 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
342#endif 363# endif
343 { 364 {
344 dst_ptr = dptr; 365 dst_ptr = dptr;
345 for (x = 0; x < dst_clip_w; x++) 366 for (x = 0; x < dst_clip_w; x++)
346 { 367 {
347 ptr = row_ptr[y] + lin_ptr[x]; 368 ptr = row_ptr[y] + lin_ptr[x];
348 *dst_ptr = *ptr; 369 *dst_ptr = *ptr;
349 dst_ptr++; 370 dst_ptr++;
350 } 371 }
351 } 372 }
352 dptr += dst_w; 373 dptr += dst_w;
353 } 374 }
354 } 375 }
355 else 376 else
356#endif 377#endif
357 { 378 {
358 /* a scanline buffer */ 379 /* a scanline buffer */
359 buf = alloca(dst_clip_w * sizeof(DATA32)); 380 buf = alloca(dst_clip_w * sizeof(DATA32));
360 for (y = 0; y < dst_clip_h; y++) 381 for (y = 0; y < dst_clip_h; y++)
361 { 382 {
362#ifdef EVAS_SLI 383#ifdef EVAS_SLI
363 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) 384 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
364#endif 385#endif
365 { 386 {
366 dst_ptr = buf; 387 dst_ptr = buf;
367 for (x = 0; x < dst_clip_w; x++) 388 for (x = 0; x < dst_clip_w; x++)
368 { 389 {
369 ptr = row_ptr[y] + lin_ptr[x]; 390 ptr = row_ptr[y] + lin_ptr[x];
370 *dst_ptr = *ptr; 391 *dst_ptr = *ptr;
371 dst_ptr++; 392 dst_ptr++;
372 } 393 }
373 /* * blend here [clip_w *] buf -> dptr * */ 394 /* * blend here [clip_w *] buf -> dptr * */
374 func(buf, NULL, dc->mul.col, dptr, dst_clip_w); 395 func(buf, NULL, dc->mul.col, dptr, dst_clip_w);
375 } 396 }
376 dptr += dst_w; 397 dptr += dst_w;
377 } 398 }
378 } 399 }
379 } 400 }
380} 401}
diff --git a/legacy/evas/src/lib/include/evas_common.h b/legacy/evas/src/lib/include/evas_common.h
index 90d349c1d7..a9063e6b02 100644
--- a/legacy/evas/src/lib/include/evas_common.h
+++ b/legacy/evas/src/lib/include/evas_common.h
@@ -1,9 +1,9 @@
1#ifndef EVAS_COMMON_H 1#ifndef EVAS_COMMON_H
2#define EVAS_COMMON_H 2#define EVAS_COMMON_H
3 3
4#ifdef HAVE_CONFIG_H 4//#ifdef HAVE_CONFIG_H
5# include "config.h" /* so that EAPI in Evas.h is correctly defined */ 5#include "config.h" /* so that EAPI in Evas.h is correctly defined */
6#endif 6//#endif
7 7
8#ifdef HAVE_EVIL 8#ifdef HAVE_EVIL
9# include <Evil.h> 9# include <Evil.h>
@@ -322,6 +322,21 @@ void *alloca (size_t);
322#define pld(addr, off) 322#define pld(addr, off)
323#endif /* __ARMEL__ */ 323#endif /* __ARMEL__ */
324 324
325// these here are in config.h - just here for documentation
326//#ifdef __ARM_ARCH__
327// *IF* you enable pixman, this determines which things pixman will do
328////#define PIXMAN_FONT 1
329////#define PIXMAN_RECT 1
330////#define PIXMAN_LINE 1
331////#define PIXMAN_POLY 1
332//#define PIXMAN_IMAGE 1
333//#define PIXMAN_IMAGE_SCALE_SAMPLE 1
334//#endif
335// not related to pixman but an alternate rotate code
336//#define TILE_ROTATE 1
337
338#define TILE_CACHE_LINE_SIZE 64
339
325/*****************************************************************************/ 340/*****************************************************************************/
326 341
327#define UNROLL2(op...) op op 342#define UNROLL2(op...) op op
@@ -662,6 +677,9 @@ struct _RGBA_Draw_Context
662 DATA32 col; 677 DATA32 col;
663 } mul; 678 } mul;
664 struct { 679 struct {
680#ifdef HAVE_PIXMAN
681 pixman_image_t *pixman_color_image;
682#endif
665 DATA32 col; 683 DATA32 col;
666 } col; 684 } col;
667 struct RGBA_Draw_Context_clip { 685 struct RGBA_Draw_Context_clip {
@@ -1016,14 +1034,14 @@ struct _Tilebuf
1016 int x, y, w, h; 1034 int x, y, w, h;
1017 } prev_add, prev_del; 1035 } prev_add, prev_del;
1018#ifdef RECTUPDATE 1036#ifdef RECTUPDATE
1019/* 1037/*
1020 Regionbuf *rb; 1038 Regionbuf *rb;
1021 */ 1039 */
1022#elif defined(EVAS_RECT_SPLIT) 1040#elif defined(EVAS_RECT_SPLIT)
1023 int need_merge; 1041 int need_merge;
1024 list_t rects; 1042 list_t rects;
1025#else 1043#else
1026/* 1044/*
1027 struct { 1045 struct {
1028 int w, h; 1046 int w, h;
1029 Tilebuf_Tile *tiles; 1047 Tilebuf_Tile *tiles;
diff --git a/legacy/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c b/legacy/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c
index 1b1d3d985f..24c45df97b 100644
--- a/legacy/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c
+++ b/legacy/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c
@@ -579,6 +579,8 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
579 free(obr); 579 free(obr);
580 return NULL; 580 return NULL;
581 } 581 }
582 im->cache_entry.w = w;
583 im->cache_entry.h = h;
582 im->cache_entry.flags.alpha |= alpha ? 1 : 0; 584 im->cache_entry.flags.alpha |= alpha ? 1 : 0;
583 evas_cache_image_surface_alloc(&im->cache_entry, w, h); 585 evas_cache_image_surface_alloc(&im->cache_entry, w, h);
584 im->extended_info = obr; 586 im->extended_info = obr;