summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2008-06-03 09:09:39 +0000
committerCedric BAIL <cedric.bail@free.fr>2008-06-03 09:09:39 +0000
commitd102e3db82d3a74c0bbb94cb24162cf0dfeaf97e (patch)
tree8374433ef857f2a8627790d97997070eb9624a72 /legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
parent6ec89fc019c593211cbeab5c4d500c79f7e14e8e (diff)
* Make RGBA_IMAGE_HAS_ALPHA and RGBA_IMAGE_ALPHA_SPARSE part of
Image_Entry flag structure. This fix a bug with 16 bpp software engine. * Change image loader module API to take any Image_Entry. Same goes for evas_common_image_premul and evas_common_image_set_alpha_sparse. * Use new eet API: eet_data_image_read_to_surface. SVN revision: 34728
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_op_blend_main_.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c b/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
index 8821455294..beabf1d24b 100644
--- a/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
+++ b/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
@@ -12,11 +12,11 @@ static RGBA_Gfx_Func op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col,
12static RGBA_Gfx_Func op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); 12static RGBA_Gfx_Func op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
13static RGBA_Gfx_Func op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); 13static RGBA_Gfx_Func op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
14 14
15static RGBA_Gfx_Pt_Func op_blend_pixel_pt_get(int src_flags, RGBA_Image *dst); 15static RGBA_Gfx_Pt_Func op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
16static RGBA_Gfx_Pt_Func op_blend_color_pt_get(DATA32 col, RGBA_Image *dst); 16static RGBA_Gfx_Pt_Func op_blend_color_pt_get(DATA32 col, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_blend_pixel_color_pt_get(int src_flags, DATA32 col, RGBA_Image *dst); 17static RGBA_Gfx_Pt_Func op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 18static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(int src_flags, RGBA_Image *dst); 19static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20 20
21static RGBA_Gfx_Compositor _composite_blend = { "blend", 21static RGBA_Gfx_Compositor _composite_blend = { "blend",
22 op_blend_init, op_blend_shutdown, 22 op_blend_init, op_blend_shutdown,
@@ -47,11 +47,11 @@ static RGBA_Gfx_Func op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 c
47static RGBA_Gfx_Func op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); 47static RGBA_Gfx_Func op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
48static RGBA_Gfx_Func op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); 48static RGBA_Gfx_Func op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
49 49
50static RGBA_Gfx_Pt_Func op_blend_rel_pixel_pt_get(int src_flags, RGBA_Image *dst); 50static RGBA_Gfx_Pt_Func op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
51static RGBA_Gfx_Pt_Func op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst); 51static RGBA_Gfx_Pt_Func op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst);
52static RGBA_Gfx_Pt_Func op_blend_rel_pixel_color_pt_get(int src_flags, DATA32 col, RGBA_Image *dst); 52static RGBA_Gfx_Pt_Func op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
53static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); 53static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
54static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(int src_flags, RGBA_Image *dst); 54static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
55 55
56static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel", 56static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel",
57 op_blend_rel_init, op_blend_rel_shutdown, 57 op_blend_rel_init, op_blend_rel_shutdown,
@@ -148,13 +148,13 @@ op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
148{ 148{
149 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; 149 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
150 150
151 if (src && (src->flags & RGBA_IMAGE_HAS_ALPHA)) 151 if (src && src->cache_entry.flags.alpha)
152 { 152 {
153 s = SP; 153 s = SP;
154 if (src->flags & RGBA_IMAGE_ALPHA_SPARSE) 154 if (src->cache_entry.flags.alpha_sparse)
155 s = SP_AS; 155 s = SP_AS;
156 } 156 }
157 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 157 if (dst && dst->cache_entry.flags.alpha)
158 d = DP; 158 d = DP;
159 return blend_gfx_span_func_cpu(s, m, c, d); 159 return blend_gfx_span_func_cpu(s, m, c, d);
160} 160}
@@ -170,7 +170,7 @@ op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels)
170 c = SC_AA; 170 c = SC_AA;
171 if (col == 0xffffffff) 171 if (col == 0xffffffff)
172 c = SC_N; 172 c = SC_N;
173 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 173 if (dst && dst->cache_entry.flags.alpha)
174 d = DP; 174 d = DP;
175 return blend_gfx_span_func_cpu(s, m, c, d); 175 return blend_gfx_span_func_cpu(s, m, c, d);
176} 176}
@@ -180,10 +180,10 @@ op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int
180{ 180{
181 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; 181 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
182 182
183 if (src && (src->flags & RGBA_IMAGE_HAS_ALPHA)) 183 if (src && src->cache_entry.flags.alpha)
184 { 184 {
185 s = SP; 185 s = SP;
186 if (src->flags & RGBA_IMAGE_ALPHA_SPARSE) 186 if (src->cache_entry.flags.alpha_sparse)
187 s = SP_AS; 187 s = SP_AS;
188 } 188 }
189 if ((col >> 24) < 255) 189 if ((col >> 24) < 255)
@@ -192,7 +192,7 @@ op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int
192 c = SC_AA; 192 c = SC_AA;
193 if (col == 0xffffffff) 193 if (col == 0xffffffff)
194 c = SC_N; 194 c = SC_N;
195 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 195 if (dst && dst->cache_entry.flags.alpha)
196 d = DP; 196 d = DP;
197 return blend_gfx_span_func_cpu(s, m, c, d); 197 return blend_gfx_span_func_cpu(s, m, c, d);
198} 198}
@@ -208,7 +208,7 @@ op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels)
208 c = SC_AA; 208 c = SC_AA;
209 if (col == 0xffffffff) 209 if (col == 0xffffffff)
210 c = SC_N; 210 c = SC_N;
211 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 211 if (dst && dst->cache_entry.flags.alpha)
212 d = DP; 212 d = DP;
213 return blend_gfx_span_func_cpu(s, m, c, d); 213 return blend_gfx_span_func_cpu(s, m, c, d);
214} 214}
@@ -218,13 +218,13 @@ op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
218{ 218{
219 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; 219 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
220 220
221 if (src && (src->flags & RGBA_IMAGE_HAS_ALPHA)) 221 if (src && src->cache_entry.flags.alpha)
222 { 222 {
223 s = SP; 223 s = SP;
224 if (src->flags & RGBA_IMAGE_ALPHA_SPARSE) 224 if (src->cache_entry.flags.alpha_sparse)
225 s = SP_AS; 225 s = SP_AS;
226 } 226 }
227 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 227 if (dst && dst->cache_entry.flags.alpha)
228 d = DP; 228 d = DP;
229 return blend_gfx_span_func_cpu(s, m, c, d); 229 return blend_gfx_span_func_cpu(s, m, c, d);
230} 230}
@@ -252,13 +252,13 @@ blend_gfx_pt_func_cpu(int s, int m, int c, int d)
252} 252}
253 253
254static RGBA_Gfx_Pt_Func 254static RGBA_Gfx_Pt_Func
255op_blend_pixel_pt_get(int src_flags, RGBA_Image *dst) 255op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
256{ 256{
257 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; 257 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
258 258
259 if (src_flags & RGBA_IMAGE_HAS_ALPHA) 259 if (src_flags.alpha)
260 s = SP; 260 s = SP;
261 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 261 if (dst && dst->cache_entry.flags.alpha)
262 d = DP; 262 d = DP;
263 return blend_gfx_pt_func_cpu(s, m, c, d); 263 return blend_gfx_pt_func_cpu(s, m, c, d);
264} 264}
@@ -274,17 +274,17 @@ op_blend_color_pt_get(DATA32 col, RGBA_Image *dst)
274 c = SC_AA; 274 c = SC_AA;
275 if (col == 0xffffffff) 275 if (col == 0xffffffff)
276 c = SC_N; 276 c = SC_N;
277 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 277 if (dst && dst->cache_entry.flags.alpha)
278 d = DP; 278 d = DP;
279 return blend_gfx_pt_func_cpu(s, m, c, d); 279 return blend_gfx_pt_func_cpu(s, m, c, d);
280} 280}
281 281
282static RGBA_Gfx_Pt_Func 282static RGBA_Gfx_Pt_Func
283op_blend_pixel_color_pt_get(int src_flags, DATA32 col, RGBA_Image *dst) 283op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
284{ 284{
285 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; 285 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
286 286
287 if (src_flags & RGBA_IMAGE_HAS_ALPHA) 287 if (src_flags.alpha)
288 s = SP; 288 s = SP;
289 if ((col >> 24) < 255) 289 if ((col >> 24) < 255)
290 c = SC; 290 c = SC;
@@ -292,7 +292,7 @@ op_blend_pixel_color_pt_get(int src_flags, DATA32 col, RGBA_Image *dst)
292 c = SC_AA; 292 c = SC_AA;
293 if (col == 0xffffffff) 293 if (col == 0xffffffff)
294 c = SC_N; 294 c = SC_N;
295 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 295 if (dst && dst->cache_entry.flags.alpha)
296 d = DP; 296 d = DP;
297 return blend_gfx_pt_func_cpu(s, m, c, d); 297 return blend_gfx_pt_func_cpu(s, m, c, d);
298} 298}
@@ -308,19 +308,19 @@ op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
308 c = SC_AA; 308 c = SC_AA;
309 if (col == 0xffffffff) 309 if (col == 0xffffffff)
310 c = SC_N; 310 c = SC_N;
311 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 311 if (dst && dst->cache_entry.flags.alpha)
312 d = DP; 312 d = DP;
313 return blend_gfx_pt_func_cpu(s, m, c, d); 313 return blend_gfx_pt_func_cpu(s, m, c, d);
314} 314}
315 315
316static RGBA_Gfx_Pt_Func 316static RGBA_Gfx_Pt_Func
317op_blend_pixel_mask_pt_get(int src_flags, RGBA_Image *dst) 317op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
318{ 318{
319 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; 319 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
320 320
321 if (src_flags & RGBA_IMAGE_HAS_ALPHA) 321 if (src_flags.alpha)
322 s = SP; 322 s = SP;
323 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 323 if (dst && dst->cache_entry.flags.alpha)
324 d = DP; 324 d = DP;
325 return blend_gfx_pt_func_cpu(s, m, c, d); 325 return blend_gfx_pt_func_cpu(s, m, c, d);
326} 326}
@@ -390,13 +390,13 @@ op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
390{ 390{
391 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; 391 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
392 392
393 if (src && (src->flags & RGBA_IMAGE_HAS_ALPHA)) 393 if (src && src->cache_entry.flags.alpha)
394 { 394 {
395 s = SP; 395 s = SP;
396 if (src->flags & RGBA_IMAGE_ALPHA_SPARSE) 396 if (src->cache_entry.flags.alpha_sparse)
397 s = SP_AS; 397 s = SP_AS;
398 } 398 }
399 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 399 if (dst && dst->cache_entry.flags.alpha)
400 d = DP; 400 d = DP;
401 return blend_rel_gfx_span_func_cpu(s, m, c, d); 401 return blend_rel_gfx_span_func_cpu(s, m, c, d);
402} 402}
@@ -412,7 +412,7 @@ op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels)
412 c = SC_AA; 412 c = SC_AA;
413 if (col == 0xffffffff) 413 if (col == 0xffffffff)
414 c = SC_N; 414 c = SC_N;
415 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 415 if (dst && dst->cache_entry.flags.alpha)
416 d = DP; 416 d = DP;
417 return blend_rel_gfx_span_func_cpu(s, m, c, d); 417 return blend_rel_gfx_span_func_cpu(s, m, c, d);
418} 418}
@@ -422,7 +422,7 @@ op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst,
422{ 422{
423 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; 423 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
424 424
425 if (src && (src->flags & RGBA_IMAGE_HAS_ALPHA)) 425 if (src && src->cache_entry.flags.alpha)
426 s = SP; 426 s = SP;
427 if ((col >> 24) < 255) 427 if ((col >> 24) < 255)
428 c = SC; 428 c = SC;
@@ -430,7 +430,7 @@ op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst,
430 c = SC_AA; 430 c = SC_AA;
431 if (col == 0xffffffff) 431 if (col == 0xffffffff)
432 c = SC_N; 432 c = SC_N;
433 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 433 if (dst && dst->cache_entry.flags.alpha)
434 d = DP; 434 d = DP;
435 return blend_rel_gfx_span_func_cpu(s, m, c, d); 435 return blend_rel_gfx_span_func_cpu(s, m, c, d);
436} 436}
@@ -446,7 +446,7 @@ op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels)
446 c = SC_AA; 446 c = SC_AA;
447 if (col == 0xffffffff) 447 if (col == 0xffffffff)
448 c = SC_N; 448 c = SC_N;
449 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 449 if (dst && dst->cache_entry.flags.alpha)
450 d = DP; 450 d = DP;
451 return blend_rel_gfx_span_func_cpu(s, m, c, d); 451 return blend_rel_gfx_span_func_cpu(s, m, c, d);
452} 452}
@@ -456,13 +456,13 @@ op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
456{ 456{
457 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; 457 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
458 458
459 if (src && (src->flags & RGBA_IMAGE_HAS_ALPHA)) 459 if (src && src->cache_entry.flags.alpha)
460 { 460 {
461 s = SP; 461 s = SP;
462 if (src->flags & RGBA_IMAGE_ALPHA_SPARSE) 462 if (src->cache_entry.flags.alpha_sparse)
463 s = SP_AS; 463 s = SP_AS;
464 } 464 }
465 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 465 if (dst && dst->cache_entry.flags.alpha)
466 d = DP; 466 d = DP;
467 return blend_rel_gfx_span_func_cpu(s, m, c, d); 467 return blend_rel_gfx_span_func_cpu(s, m, c, d);
468} 468}
@@ -489,13 +489,13 @@ blend_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
489} 489}
490 490
491static RGBA_Gfx_Pt_Func 491static RGBA_Gfx_Pt_Func
492op_blend_rel_pixel_pt_get(int src_flags, RGBA_Image *dst) 492op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
493{ 493{
494 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; 494 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
495 495
496 if (src_flags & RGBA_IMAGE_HAS_ALPHA) 496 if (src_flags.alpha)
497 s = SP; 497 s = SP;
498 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 498 if (dst && dst->cache_entry.flags.alpha)
499 d = DP; 499 d = DP;
500 return blend_rel_gfx_pt_func_cpu(s, m, c, d); 500 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
501} 501}
@@ -511,17 +511,17 @@ op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst)
511 c = SC_AA; 511 c = SC_AA;
512 if (col == 0xffffffff) 512 if (col == 0xffffffff)
513 c = SC_N; 513 c = SC_N;
514 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 514 if (dst && dst->cache_entry.flags.alpha)
515 d = DP; 515 d = DP;
516 return blend_rel_gfx_pt_func_cpu(s, m, c, d); 516 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
517} 517}
518 518
519static RGBA_Gfx_Pt_Func 519static RGBA_Gfx_Pt_Func
520op_blend_rel_pixel_color_pt_get(int src_flags, DATA32 col, RGBA_Image *dst) 520op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
521{ 521{
522 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; 522 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
523 523
524 if (src_flags & RGBA_IMAGE_HAS_ALPHA) 524 if (src_flags.alpha)
525 s = SP; 525 s = SP;
526 if ((col >> 24) < 255) 526 if ((col >> 24) < 255)
527 c = SC; 527 c = SC;
@@ -529,7 +529,7 @@ op_blend_rel_pixel_color_pt_get(int src_flags, DATA32 col, RGBA_Image *dst)
529 c = SC_AA; 529 c = SC_AA;
530 if (col == 0xffffffff) 530 if (col == 0xffffffff)
531 c = SC_N; 531 c = SC_N;
532 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 532 if (dst && dst->cache_entry.flags.alpha)
533 d = DP; 533 d = DP;
534 return blend_rel_gfx_pt_func_cpu(s, m, c, d); 534 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
535} 535}
@@ -545,19 +545,19 @@ op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
545 c = SC_AA; 545 c = SC_AA;
546 if (col == 0xffffffff) 546 if (col == 0xffffffff)
547 c = SC_N; 547 c = SC_N;
548 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 548 if (dst && dst->cache_entry.flags.alpha)
549 d = DP; 549 d = DP;
550 return blend_rel_gfx_pt_func_cpu(s, m, c, d); 550 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
551} 551}
552 552
553static RGBA_Gfx_Pt_Func 553static RGBA_Gfx_Pt_Func
554op_blend_rel_pixel_mask_pt_get(int src_flags, RGBA_Image *dst) 554op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
555{ 555{
556 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; 556 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
557 557
558 if (src_flags & RGBA_IMAGE_HAS_ALPHA) 558 if (src_flags.alpha)
559 s = SP; 559 s = SP;
560 if (dst && (dst->flags & RGBA_IMAGE_HAS_ALPHA)) 560 if (dst && dst->cache_entry.flags.alpha)
561 d = DP; 561 d = DP;
562 return blend_rel_gfx_pt_func_cpu(s, m, c, d); 562 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
563} 563}