forked from enlightenment/efl
evas/common: Prepare soil to land scaling code for threaded render
SVN revision: 81188
This commit is contained in:
parent
6ea2723322
commit
b4ceb3f2ba
|
@ -13,7 +13,8 @@ EAPI void evas_common_rgba_image_scalecache_dump(void);
|
|||
|
||||
EAPI void evas_common_scale_rgba_in_to_out_clip_sample_do (const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_do (const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
EAPI void evas_common_scale_rgba_sample_draw (RGBA_Image *src, RGBA_Image *dst, int dst_clip_x, int dst_clip_y, int dst_clip_w, int dst_clip_h, DATA32 mul_col, int render_op, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
EAPI void evas_common_scale_rgba_smooth_draw (RGBA_Image *src, RGBA_Image *dst, int dst_clip_x, int dst_clip_y, int dst_clip_w, int dst_clip_h, DATA32 mul_col, int render_op, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_prepare (Cutout_Rects *reuse, const RGBA_Image *src, const RGBA_Image *dst, RGBA_Draw_Context *dc, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
|
||||
|
||||
|
||||
#endif /* _EVAS_SCALE_MAIN_H */
|
||||
|
|
|
@ -58,13 +58,197 @@ evas_common_scale_rgba_in_to_out_clip_sample_do(const Cutout_Rects *reuse,
|
|||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_scale_rgba_sample_draw(RGBA_Image *src, RGBA_Image *dst, int dst_clip_x, int dst_clip_y, int dst_clip_w, int dst_clip_h, DATA32 mul_col, int render_op, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h)
|
||||
{
|
||||
int x, y;
|
||||
int *lin_ptr;
|
||||
DATA32 *buf, *dptr;
|
||||
DATA32 **row_ptr;
|
||||
DATA32 *ptr, *dst_ptr, *src_data, *dst_data;
|
||||
int src_w, src_h, dst_w, dst_h;
|
||||
RGBA_Gfx_Func func;
|
||||
|
||||
if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h,
|
||||
0, 0, dst->cache_entry.w, dst->cache_entry.h))) return;
|
||||
if (!(RECTS_INTERSECT(src_region_x, src_region_y, src_region_w, src_region_h,
|
||||
0, 0, src->cache_entry.w, src->cache_entry.h))) return;
|
||||
|
||||
src_w = src->cache_entry.w;
|
||||
src_h = src->cache_entry.h;
|
||||
dst_w = dst->cache_entry.w;
|
||||
dst_h = dst->cache_entry.h;
|
||||
|
||||
src_data = src->image.data;
|
||||
dst_data = dst->image.data;
|
||||
|
||||
if (dst_clip_x < 0)
|
||||
{
|
||||
dst_clip_w += dst_clip_x;
|
||||
dst_clip_x = 0;
|
||||
}
|
||||
if (dst_clip_y < 0)
|
||||
{
|
||||
dst_clip_h += dst_clip_y;
|
||||
dst_clip_y = 0;
|
||||
}
|
||||
if ((dst_clip_x + dst_clip_w) > dst_w)
|
||||
dst_clip_w = dst_w - dst_clip_x;
|
||||
if ((dst_clip_y + dst_clip_h) > dst_h)
|
||||
dst_clip_h = dst_h - dst_clip_y;
|
||||
|
||||
if (dst_clip_x < dst_region_x)
|
||||
{
|
||||
dst_clip_w += dst_clip_x - dst_region_x;
|
||||
dst_clip_x = dst_region_x;
|
||||
}
|
||||
if ((dst_clip_x + dst_clip_w) > (dst_region_x + dst_region_w))
|
||||
dst_clip_w = dst_region_x + dst_region_w - dst_clip_x;
|
||||
if (dst_clip_y < dst_region_y)
|
||||
{
|
||||
dst_clip_h += dst_clip_y - dst_region_y;
|
||||
dst_clip_y = dst_region_y;
|
||||
}
|
||||
if ((dst_clip_y + dst_clip_h) > (dst_region_y + dst_region_h))
|
||||
dst_clip_h = dst_region_y + dst_region_h - dst_clip_y;
|
||||
|
||||
if ((src_region_w <= 0) || (src_region_h <= 0) ||
|
||||
(dst_region_w <= 0) || (dst_region_h <= 0) ||
|
||||
(dst_clip_w <= 0) || (dst_clip_h <= 0))
|
||||
return;
|
||||
|
||||
/* sanitise x */
|
||||
if (src_region_x < 0)
|
||||
{
|
||||
dst_region_x -= (src_region_x * dst_region_w) / src_region_w;
|
||||
dst_region_w += (src_region_x * dst_region_w) / src_region_w;
|
||||
src_region_w += src_region_x;
|
||||
src_region_x = 0;
|
||||
}
|
||||
if (src_region_x >= src_w) return;
|
||||
if ((src_region_x + src_region_w) > src_w)
|
||||
{
|
||||
dst_region_w = (dst_region_w * (src_w - src_region_x)) / (src_region_w);
|
||||
src_region_w = src_w - src_region_x;
|
||||
}
|
||||
if (dst_region_w <= 0) return;
|
||||
if (src_region_w <= 0) return;
|
||||
if (dst_clip_x < 0)
|
||||
{
|
||||
dst_clip_w += dst_clip_x;
|
||||
dst_clip_x = 0;
|
||||
}
|
||||
if (dst_clip_w <= 0) return;
|
||||
if (dst_clip_x >= dst_w) return;
|
||||
if (dst_clip_x < dst_region_x)
|
||||
{
|
||||
dst_clip_w += (dst_clip_x - dst_region_x);
|
||||
dst_clip_x = dst_region_x;
|
||||
}
|
||||
if ((dst_clip_x + dst_clip_w) > dst_w)
|
||||
{
|
||||
dst_clip_w = dst_w - dst_clip_x;
|
||||
}
|
||||
if (dst_clip_w <= 0) return;
|
||||
|
||||
/* sanitise y */
|
||||
if (src_region_y < 0)
|
||||
{
|
||||
dst_region_y -= (src_region_y * dst_region_h) / src_region_h;
|
||||
dst_region_h += (src_region_y * dst_region_h) / src_region_h;
|
||||
src_region_h += src_region_y;
|
||||
src_region_y = 0;
|
||||
}
|
||||
if (src_region_y >= src_h) return;
|
||||
if ((src_region_y + src_region_h) > src_h)
|
||||
{
|
||||
dst_region_h = (dst_region_h * (src_h - src_region_y)) / (src_region_h);
|
||||
src_region_h = src_h - src_region_y;
|
||||
}
|
||||
if (dst_region_h <= 0) return;
|
||||
if (src_region_h <= 0) return;
|
||||
if (dst_clip_y < 0)
|
||||
{
|
||||
dst_clip_h += dst_clip_y;
|
||||
dst_clip_y = 0;
|
||||
}
|
||||
if (dst_clip_h <= 0) return;
|
||||
if (dst_clip_y >= dst_h) return;
|
||||
if (dst_clip_y < dst_region_y)
|
||||
{
|
||||
dst_clip_h += (dst_clip_y - dst_region_y);
|
||||
dst_clip_y = dst_region_y;
|
||||
}
|
||||
if ((dst_clip_y + dst_clip_h) > dst_h)
|
||||
{
|
||||
dst_clip_h = dst_h - dst_clip_y;
|
||||
}
|
||||
if (dst_clip_h <= 0) return;
|
||||
|
||||
/* allocate scale lookup tables */
|
||||
lin_ptr = alloca(dst_clip_w * sizeof(int));
|
||||
row_ptr = alloca(dst_clip_h * sizeof(DATA32 *));
|
||||
|
||||
/* figure out dst jump */
|
||||
//dst_jump = dst_w - dst_clip_w;
|
||||
|
||||
/* figure out dest start ptr */
|
||||
dst_ptr = dst_data + dst_clip_x + (dst_clip_y * dst_w);
|
||||
|
||||
if (mul_col != 0xffffffff)
|
||||
func = evas_common_gfx_func_composite_pixel_color_span_get(src, mul_col, dst, dst_clip_w, render_op);
|
||||
else
|
||||
func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, render_op);
|
||||
|
||||
if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h))
|
||||
{
|
||||
ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
|
||||
for (y = 0; y < dst_clip_h; y++)
|
||||
{
|
||||
/* * blend here [clip_w *] ptr -> dst_ptr * */
|
||||
func(ptr, NULL, mul_col, dst_ptr, dst_clip_w);
|
||||
|
||||
ptr += src_w;
|
||||
dst_ptr += dst_w;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* fill scale tables */
|
||||
for (x = 0; x < dst_clip_w; x++)
|
||||
lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x;
|
||||
for (y = 0; y < dst_clip_h; y++)
|
||||
row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h)
|
||||
+ src_region_y) * src_w);
|
||||
/* scale to dst */
|
||||
dptr = dst_ptr;
|
||||
|
||||
/* a scanline buffer */
|
||||
buf = alloca(dst_clip_w * sizeof(DATA32));
|
||||
for (y = 0; y < dst_clip_h; y++)
|
||||
{
|
||||
dst_ptr = buf;
|
||||
for (x = 0; x < dst_clip_w; x++)
|
||||
{
|
||||
ptr = row_ptr[y] + lin_ptr[x];
|
||||
*dst_ptr = *ptr;
|
||||
dst_ptr++;
|
||||
}
|
||||
/* * blend here [clip_w *] buf -> dptr * */
|
||||
func(buf, NULL, mul_col, dptr, dst_clip_w);
|
||||
|
||||
dptr += dst_w;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
|
||||
RGBA_Draw_Context *dc,
|
||||
int src_region_x, int src_region_y,
|
||||
int src_region_w, int src_region_h,
|
||||
int dst_region_x, int dst_region_y,
|
||||
int dst_region_w, int dst_region_h)
|
||||
RGBA_Draw_Context *dc,
|
||||
int src_region_x, int src_region_y,
|
||||
int src_region_w, int src_region_h,
|
||||
int dst_region_x, int dst_region_y,
|
||||
int dst_region_w, int dst_region_h)
|
||||
{
|
||||
int x, y;
|
||||
int *lin_ptr;
|
||||
|
|
|
@ -91,17 +91,91 @@ scale_calc_a_points(int *p, int s, int d, int c, int cc)
|
|||
|
||||
#ifdef BUILD_MMX
|
||||
# undef SCALE_FUNC
|
||||
# define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_mmx
|
||||
# define SCALE_FUNC _evas_common_scale_rgba_in_to_out_clip_smooth_mmx
|
||||
# undef SCALE_USING_MMX
|
||||
# define SCALE_USING_MMX
|
||||
# include "evas_scale_smooth_scaler.c"
|
||||
#endif
|
||||
|
||||
#undef SCALE_FUNC
|
||||
#define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_c
|
||||
#define SCALE_FUNC _evas_common_scale_rgba_in_to_out_clip_smooth_c
|
||||
#undef SCALE_USING_MMX
|
||||
#include "evas_scale_smooth_scaler.c"
|
||||
|
||||
#ifdef BUILD_MMX
|
||||
void
|
||||
evas_common_scale_rgba_in_to_out_clip_smooth_mmx(RGBA_Image *src, RGBA_Image *dst,
|
||||
RGBA_Draw_Context *dc,
|
||||
int src_region_x, int src_region_y,
|
||||
int src_region_w, int src_region_h,
|
||||
int dst_region_x, int dst_region_y,
|
||||
int dst_region_w, int dst_region_h)
|
||||
{
|
||||
int clip_x, clip_y, clip_w, clip_h;
|
||||
DATA32 mul_col;
|
||||
|
||||
if (dc->clip.use)
|
||||
{
|
||||
clip_x = dc->clip.x;
|
||||
clip_y = dc->clip.y;
|
||||
clip_w = dc->clip.w;
|
||||
clip_h = dc->clip.h;
|
||||
}
|
||||
else
|
||||
{
|
||||
clip_x = 0;
|
||||
clip_y = 0;
|
||||
clip_w = dst->cache_entry.w;
|
||||
clip_h = dst->cache_entry.h;
|
||||
}
|
||||
|
||||
mul_col = dc->mul.use ? dc->mul.col : 0xffffffff;
|
||||
|
||||
_evas_common_scale_rgba_in_to_out_clip_smooth_mmx
|
||||
(src, dst,
|
||||
clip_x, clip_y, clip_w, clip_h,
|
||||
mul_col, dc->render_op,
|
||||
src_region_x, src_region_y, src_region_w, src_region_h,
|
||||
dst_region_x, dst_region_y, dst_region_w, dst_region_h);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
evas_common_scale_rgba_in_to_out_clip_smooth_c(RGBA_Image *src, RGBA_Image *dst,
|
||||
RGBA_Draw_Context *dc,
|
||||
int src_region_x, int src_region_y,
|
||||
int src_region_w, int src_region_h,
|
||||
int dst_region_x, int dst_region_y,
|
||||
int dst_region_w, int dst_region_h)
|
||||
{
|
||||
int clip_x, clip_y, clip_w, clip_h;
|
||||
DATA32 mul_col;
|
||||
|
||||
if (dc->clip.use)
|
||||
{
|
||||
clip_x = dc->clip.x;
|
||||
clip_y = dc->clip.y;
|
||||
clip_w = dc->clip.w;
|
||||
clip_h = dc->clip.h;
|
||||
}
|
||||
else
|
||||
{
|
||||
clip_x = 0;
|
||||
clip_y = 0;
|
||||
clip_w = dst->cache_entry.w;
|
||||
clip_h = dst->cache_entry.h;
|
||||
}
|
||||
|
||||
mul_col = dc->mul.use ? dc->mul.col : 0xffffffff;
|
||||
|
||||
_evas_common_scale_rgba_in_to_out_clip_smooth_mmx
|
||||
(src, dst,
|
||||
clip_x, clip_y, clip_w, clip_h,
|
||||
mul_col, dc->render_op,
|
||||
src_region_x, src_region_y, src_region_w, src_region_h,
|
||||
dst_region_x, dst_region_y, dst_region_w, dst_region_h);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
|
||||
RGBA_Draw_Context *dc,
|
||||
|
@ -129,6 +203,30 @@ evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
|
|||
cb);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_scale_rgba_smooth_draw(RGBA_Image *src, RGBA_Image *dst, int dst_clip_x, int dst_clip_y, int dst_clip_w, int dst_clip_h, DATA32 mul_col, int render_op, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h)
|
||||
{
|
||||
#ifdef BUILD_MMX
|
||||
int mmx, sse, sse2;
|
||||
|
||||
evas_common_cpu_can_do(&mmx, &sse, &sse2);
|
||||
if (mmx)
|
||||
_evas_common_scale_rgba_in_to_out_clip_smooth_mmx
|
||||
(src, dst,
|
||||
dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h,
|
||||
mul_col, render_op,
|
||||
src_region_x, src_region_y, src_region_w, src_region_h,
|
||||
dst_region_x, dst_region_y, dst_region_w, dst_region_h);
|
||||
else
|
||||
#endif
|
||||
_evas_common_scale_rgba_in_to_out_clip_smooth_c
|
||||
(src, dst,
|
||||
dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h,
|
||||
mul_col, render_op,
|
||||
src_region_x, src_region_y, src_region_w, src_region_h,
|
||||
dst_region_x, dst_region_y, dst_region_w, dst_region_h);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_scale_rgba_in_to_out_clip_smooth_do(const Cutout_Rects *reuse,
|
||||
const Eina_Rectangle *clip,
|
||||
|
|
|
@ -1,53 +1,34 @@
|
|||
void
|
||||
SCALE_FUNC(RGBA_Image *src, RGBA_Image *dst,
|
||||
RGBA_Draw_Context *dc,
|
||||
int src_region_x, int src_region_y,
|
||||
int src_region_w, int src_region_h,
|
||||
int dst_region_x, int dst_region_y,
|
||||
int dst_region_w, int dst_region_h)
|
||||
SCALE_FUNC(RGBA_Image *src, RGBA_Image *dst, int dst_clip_x, int dst_clip_y, int dst_clip_w, int dst_clip_h, DATA32 mul_col, int render_op, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h)
|
||||
{
|
||||
DATA32 *dst_ptr;
|
||||
int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h;
|
||||
int src_w, src_h, dst_w, dst_h;
|
||||
|
||||
if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
|
||||
return;
|
||||
if (!(RECTS_INTERSECT(src_region_x, src_region_y, src_region_w, src_region_h, 0, 0, src->cache_entry.w, src->cache_entry.h)))
|
||||
return;
|
||||
if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h,
|
||||
0, 0, dst->cache_entry.w, dst->cache_entry.h))) return;
|
||||
if (!(RECTS_INTERSECT(src_region_x, src_region_y, src_region_w, src_region_h,
|
||||
0, 0, src->cache_entry.w, src->cache_entry.h))) return;
|
||||
|
||||
src_w = src->cache_entry.w;
|
||||
src_h = src->cache_entry.h;
|
||||
dst_w = dst->cache_entry.w;
|
||||
dst_h = dst->cache_entry.h;
|
||||
|
||||
if (dc->clip.use)
|
||||
if (dst_clip_x < 0)
|
||||
{
|
||||
dst_clip_x = dc->clip.x;
|
||||
dst_clip_y = dc->clip.y;
|
||||
dst_clip_w = dc->clip.w;
|
||||
dst_clip_h = dc->clip.h;
|
||||
if (dst_clip_x < 0)
|
||||
{
|
||||
dst_clip_w += dst_clip_x;
|
||||
dst_clip_x = 0;
|
||||
}
|
||||
if (dst_clip_y < 0)
|
||||
{
|
||||
dst_clip_h += dst_clip_y;
|
||||
dst_clip_y = 0;
|
||||
}
|
||||
if ((dst_clip_w <= 0) || (dst_clip_h <= 0)) return;
|
||||
if ((dst_clip_x + dst_clip_w) > dst_w) dst_clip_w = dst_w - dst_clip_x;
|
||||
if ((dst_clip_y + dst_clip_h) > dst_h) dst_clip_h = dst_h - dst_clip_y;
|
||||
dst_clip_w += dst_clip_x;
|
||||
dst_clip_x = 0;
|
||||
}
|
||||
else
|
||||
if (dst_clip_y < 0)
|
||||
{
|
||||
dst_clip_x = 0;
|
||||
dst_clip_y = 0;
|
||||
dst_clip_w = dst_w;
|
||||
dst_clip_h = dst_h;
|
||||
dst_clip_h += dst_clip_y;
|
||||
dst_clip_y = 0;
|
||||
}
|
||||
|
||||
if ((dst_clip_w <= 0) || (dst_clip_h <= 0)) return;
|
||||
if ((dst_clip_x + dst_clip_w) > dst_w) dst_clip_w = dst_w - dst_clip_x;
|
||||
if ((dst_clip_y + dst_clip_h) > dst_h) dst_clip_h = dst_h - dst_clip_y;
|
||||
|
||||
if (dst_clip_x < dst_region_x)
|
||||
{
|
||||
dst_clip_w += dst_clip_x - dst_region_x;
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
/* a scanline buffer */
|
||||
buf = alloca(dst_clip_w * sizeof(DATA32));
|
||||
|
||||
if (dc->mul.use)
|
||||
func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
|
||||
if (mul_col != 0xffffffff)
|
||||
func = evas_common_gfx_func_composite_pixel_color_span_get(src, mul_col, dst, dst_clip_w, render_op);
|
||||
else
|
||||
func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
|
||||
func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, render_op);
|
||||
/* scaling down vertically */
|
||||
if ((dst_region_w >= src_region_w) &&
|
||||
(dst_region_h < src_region_h))
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
xp++; xapp++;
|
||||
}
|
||||
|
||||
func(buf, NULL, dc->mul.col, dptr, w);
|
||||
func(buf, NULL, mul_col, dptr, w);
|
||||
|
||||
pbuf = buf;
|
||||
dptr += dst_w; dst_clip_w = w;
|
||||
|
@ -96,7 +96,7 @@
|
|||
#ifdef DIRECT_SCALE
|
||||
if ((!src->cache_entry.flags.alpha) &&
|
||||
(!dst->cache_entry.flags.alpha) &&
|
||||
(!dc->mul.use))
|
||||
(mul_col == 0xffffffff))
|
||||
{
|
||||
while (dst_clip_h--)
|
||||
{
|
||||
|
@ -221,7 +221,7 @@
|
|||
xp++; xapp++;
|
||||
}
|
||||
|
||||
func(buf, NULL, dc->mul.col, dptr, w);
|
||||
func(buf, NULL, mul_col, dptr, w);
|
||||
|
||||
pbuf = buf;
|
||||
dptr += dst_w; dst_clip_w = w;
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
xp++; xapp++;
|
||||
}
|
||||
|
||||
func(buf, NULL, dc->mul.col, dptr, w);
|
||||
func(buf, NULL, mul_col, dptr, w);
|
||||
|
||||
pbuf = buf;
|
||||
dptr += dst_w; dst_clip_w = w;
|
||||
|
@ -145,7 +145,7 @@
|
|||
#ifdef DIRECT_SCALE
|
||||
if ((!src->cache_entry.flags.alpha) &&
|
||||
(!dst->cache_entry.flags.alpha) &&
|
||||
(!dc->mul.use))
|
||||
(mul_col == 0xffffffff))
|
||||
{
|
||||
while (dst_clip_h--)
|
||||
{
|
||||
|
@ -347,7 +347,7 @@
|
|||
xp++; xapp++;
|
||||
}
|
||||
|
||||
func(buf, NULL, dc->mul.col, dptr, w);
|
||||
func(buf, NULL, mul_col, dptr, w);
|
||||
|
||||
pbuf = buf;
|
||||
dptr += dst_w; dst_clip_w = w;
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
xp++; xapp++;
|
||||
}
|
||||
|
||||
func(buf, NULL, dc->mul.col, dptr, w);
|
||||
func(buf, NULL, mul_col, dptr, w);
|
||||
|
||||
pbuf = buf;
|
||||
dptr += dst_w; dst_clip_w = w;
|
||||
|
@ -97,7 +97,7 @@
|
|||
#ifdef DIRECT_SCALE
|
||||
if ((!src->cache_entry.flags.alpha) &&
|
||||
(!dst->cache_entry.flags.alpha) &&
|
||||
(!dc->mul.use))
|
||||
(mul_col == 0xffffffff))
|
||||
{
|
||||
while (dst_clip_h--)
|
||||
{
|
||||
|
@ -223,7 +223,7 @@
|
|||
xp++; xapp++;
|
||||
}
|
||||
|
||||
func(buf, NULL, dc->mul.col, dptr, w);
|
||||
func(buf, NULL, mul_col, dptr, w);
|
||||
|
||||
pbuf = buf;
|
||||
dptr += dst_w; dst_clip_w = w;
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
RGBA_Gfx_Func func;
|
||||
|
||||
ptr = src->image.data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
|
||||
if (dc->mul.use)
|
||||
func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
|
||||
if (mul_col != 0xffffffff)
|
||||
func = evas_common_gfx_func_composite_pixel_color_span_get(src, mul_col, dst, dst_clip_w, render_op);
|
||||
else
|
||||
func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
|
||||
func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, render_op);
|
||||
|
||||
while (dst_clip_h--)
|
||||
{
|
||||
func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
|
||||
func(ptr, NULL, mul_col, dst_ptr, dst_clip_w);
|
||||
|
||||
ptr += src_w;
|
||||
dst_ptr += dst_w;
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
/* a scanline buffer */
|
||||
pdst = dst_ptr; // it's been set at (dst_clip_x, dst_clip_y)
|
||||
pdst_end = pdst + (dst_clip_h * dst_w);
|
||||
if (!dc->mul.use)
|
||||
if (mul_col == 0xffffffff)
|
||||
{
|
||||
if ((dc->render_op == _EVAS_RENDER_BLEND) && !src->cache_entry.flags.alpha)
|
||||
if ((render_op == _EVAS_RENDER_BLEND) && !src->cache_entry.flags.alpha)
|
||||
{ direct_scale = 1; buf_step = dst->cache_entry.w; }
|
||||
else if (dc->render_op == _EVAS_RENDER_COPY)
|
||||
else if (render_op == _EVAS_RENDER_COPY)
|
||||
{
|
||||
direct_scale = 1; buf_step = dst->cache_entry.w;
|
||||
if (src->cache_entry.flags.alpha)
|
||||
|
@ -33,10 +33,10 @@
|
|||
if (!direct_scale)
|
||||
{
|
||||
buf = alloca(dst_clip_w * sizeof(DATA32));
|
||||
if (dc->mul.use)
|
||||
func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
|
||||
if (mul_col != 0xffffffff)
|
||||
func = evas_common_gfx_func_composite_pixel_color_span_get(src, mul_col, dst, dst_clip_w, render_op);
|
||||
else
|
||||
func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
|
||||
func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, render_op);
|
||||
}
|
||||
else
|
||||
buf = pdst;
|
||||
|
@ -99,7 +99,7 @@
|
|||
}
|
||||
/* * blend here [clip_w *] buf -> dptr * */
|
||||
if (!direct_scale)
|
||||
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
|
||||
func(buf, NULL, mul_col, pdst, dst_clip_w);
|
||||
|
||||
pdst += dst_w;
|
||||
psrc += src_w;
|
||||
|
@ -149,7 +149,7 @@
|
|||
}
|
||||
/* * blend here [clip_w *] buf -> dptr * */
|
||||
if (!direct_scale)
|
||||
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
|
||||
func(buf, NULL, mul_col, pdst, dst_clip_w);
|
||||
pdst += dst_w;
|
||||
syy += dsyy;
|
||||
buf += buf_step;
|
||||
|
@ -223,7 +223,7 @@
|
|||
}
|
||||
/* * blend here [clip_w *] buf -> dptr * */
|
||||
if (!direct_scale)
|
||||
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
|
||||
func(buf, NULL, mul_col, pdst, dst_clip_w);
|
||||
|
||||
pdst += dst_w;
|
||||
syy += dsyy;
|
||||
|
|
Loading…
Reference in New Issue