/* If it's NOT a rectangle set the mask bits too */
/* FIXME: Optmz ths chck */
- if (clip->type == o_rect_type)
- obj->cur.mask = NULL;
- else
+ if (clip->type != o_rect_type)
{
- void *engdata;
- obj->cur.mask = eo_clip;
- engdata = clip->func->engine_data_get(eo_clip);
- /* FIXME: Images only */
- clip->layer->evas->engine.func->image_mask_create(
- clip->layer->evas->engine.data.output,
- engdata);
+ ERR("Not supported clipping to type '%s', just rectangles.",
+ clip->type);
}
evas_object_change(eo_clip, clip);
evas_object_change(eo_obj, obj);
obj->cur.cache.clip.w,
obj->cur.cache.clip.h);
}
- if (obj->cur.mask)
- {
- Evas_Object_Protected_Data *cur_mask = eo_data_get(obj->cur.mask, EVAS_OBJ_CLASS);
- e->engine.func->context_mask_set(e->engine.data.output,
- e->engine.data.context,
- cur_mask->func->engine_data_get(obj->cur.mask),
- cur_mask->cur.geometry.x + off_x,
- cur_mask->cur.geometry.y + off_y,
- cur_mask->cur.geometry.w,
- cur_mask->cur.geometry.h);
- }
- else
- e->engine.func->context_mask_unset(e->engine.data.output,
- e->engine.data.context);
+
e->engine.func->context_clip_set(e->engine.data.output,
e->engine.data.context,
x, y, w, h);
EAPI void evas_common_draw_context_set_color (RGBA_Draw_Context *dc, int r, int g, int b, int a);
EAPI void evas_common_draw_context_set_multiplier (RGBA_Draw_Context *dc, int r, int g, int b, int a);
EAPI void evas_common_draw_context_unset_multiplier (RGBA_Draw_Context *dc);
-EAPI void evas_common_draw_context_set_mask (RGBA_Draw_Context *dc, RGBA_Image *im, int x, int y, int w, int h);
-EAPI void evas_common_draw_context_unset_mask (RGBA_Draw_Context *dc);
EAPI Cutout_Rects *evas_common_draw_context_cutouts_new (void);
EAPI void evas_common_draw_context_cutouts_free (Cutout_Rects* rects);
EAPI void evas_common_draw_context_cutouts_del (Cutout_Rects* rects, int idx);
dc->mul.use = 0;
}
-EAPI void
-evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x, int y, int w, int h)
-{
- dc->mask.mask = mask;
- dc->mask.x = x;
- dc->mask.y = y;
- dc->mask.w = w;
- dc->mask.h = h;
-
-#ifdef HAVE_PIXMAN
- if (mask->pixman.im)
- pixman_image_unref(mask->pixman.im);
-
- if (mask->cache_entry.flags.alpha)
- {
- mask->pixman.im = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h,
- (uint32_t *)mask->mask.mask,
- w * 4);
- }
- else
- {
- mask->pixman.im = pixman_image_create_bits(PIXMAN_x8r8g8b8, w, h,
- (uint32_t *)mask->mask.mask,
- w * 4);
- }
-#endif
-
-}
-
-EAPI void
-evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc)
-{
- dc->mask.mask = NULL;
-
-#ifdef HAVE_PIXMAN
- RGBA_Image *mask;
- mask = (RGBA_Image *)dc->mask.mask;
-
- if (mask && mask->pixman.im)
- {
- pixman_image_unref(mask->pixman.im);
- mask->pixman.im = NULL;
- }
-#endif
-}
-
-
-
-
EAPI void
evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w, int h)
p = dst->image.data + (dstw * y0) + x0;
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
- if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (!dc->mask.mask))
+ if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
x0, y0, 0, 0, x0, y0, len, 1);
- else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (dc->mask.mask))
- pixman_image_composite(op, dc->col.pixman_color_image,
- dc->mask.mask->pixman.im,
- dst->pixman.im,
- x0, y0, 0, 0, x0, y0, len, 1);
else
# endif
#endif
p = dst->image.data + (dstw * y0) + x0;
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
- if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (!dc->mask.mask))
+ if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
x0, y0, 0, 0, x0, y0, 1, len);
- else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (dc->mask.mask))
- pixman_image_composite(op, dc->col.pixman_color_image,
- dc->mask.mask->pixman.im, dst->pixman.im,
- x0, y0, 0, 0, x0, y0, 1, len);
else
# endif
#endif
{
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
- if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (!dc->mask.mask))
+ if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
pixman_x_position,
pixman_y_position,
0, 0, pixman_x_position,
pixman_y_position, 1, 1);
- else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (dc->mask.mask))
- pixman_image_composite(op, dc->col.pixman_color_image,
- dc->mask.mask->pixman.im,
- dst->pixman.im,
- pixman_x_position,
- pixman_y_position, 0, 0,
- pixman_x_position,
- pixman_y_position, 1, 1);
else
# endif
#endif
{
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
- if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (!dc->mask.mask))
+ if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
- else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (dc->mask.mask))
- pixman_image_composite(op, dc->col.pixman_color_image,
- dc->mask.mask->pixman.im,
- dst->pixman.im,
- pix_x, pix_y, 0, 0,
- pix_x, pix_y, 1, 1);
else
# endif
#endif
{
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
- if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (!dc->mask.mask))
+ if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
- else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (dc->mask.mask))
- pixman_image_composite(op, dc->col.pixman_color_image,
- dc->mask.mask->pixman.im,
- dst->pixman.im,
- pix_x, pix_y, 0, 0,
- pix_x, pix_y, 1, 1);
else
# endif
#endif
aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
(uint32_t *)&alpha_data_buffer, 4);
- if ((dst->pixman.im) && (dc->col.pixman_color_image ) &&
- (!dc->mask.mask))
+ if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(PIXMAN_OP_OVER,
dc->col.pixman_color_image,
aa_mask_image, dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
- else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (dc->mask.mask) )
- pixman_image_composite(op, dc->col.pixman_color_image,
- dc->mask.mask->pixman.im,
- dst->pixman.im,
- pix_x, pix_y, 0, 0,
- pix_x, pix_y, 1, 1);
else
# endif
#endif
aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
(uint32_t *)&alpha_data_buffer, 4);
- if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (!dc->mask.mask))
+ if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(PIXMAN_OP_OVER,
dc->col.pixman_color_image,
aa_mask_image, dst->pixman.im,
pix_x, pix_y + 1, 0, 0,
pix_x, pix_y + 1, 1, 1);
- else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (dc->mask.mask))
- pixman_image_composite(op, dc->col.pixman_color_image,
- dc->mask.mask->pixman.im,
- dst->pixman.im,
- pix_x, pix_y + 1, 0, 0,
- pix_x, pix_y + 1, 1, 1);
else
# endif
#endif
alpha_data_buffer = 255 - aa;
aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, (uint32_t *)&alpha_data_buffer, 4);
- if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (!dc->mask.mask))
+ if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(PIXMAN_OP_OVER,
dc->col.pixman_color_image,
aa_mask_image, dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
- else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (dc->mask.mask))
- pixman_image_composite(op, dc->col.pixman_color_image,
- dc->mask.mask->pixman.im,
- dst->pixman.im,
- pix_x, pix_y, 0, 0,
- pix_x, pix_y, 1, 1);
else
# endif
#endif
aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
(uint32_t *)&alpha_data_buffer, 4);
- if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (!dc->mask.mask))
+ if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(PIXMAN_OP_OVER,
dc->col.pixman_color_image,
aa_mask_image, dst->pixman.im,
pix_x + 1, pix_y, 0, 0,
pix_x + 1, pix_y, 1, 1);
- else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (dc->mask.mask))
- pixman_image_composite(op, dc->col.pixman_color_image,
- dc->mask.mask->pixman.im,
- dst->pixman.im,
- pix_x + 1, pix_y, 0, 0,
- pix_x + 1, pix_y, 1, 1);
else
# endif
#endif
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_POLY
- if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (!dc->mask.mask))
+ if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
span->x, span->y, 0, 0,
span->x, span->y, span->w, 1);
- else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
- (dc->mask.mask))
- pixman_image_composite(op, dc->col.pixman_color_image,
- dc->mask.mask->pixman.im,
- dst->pixman.im,
- span->x, span->y, 0, 0,
- span->x, span->y, span->w, 1);
else
# endif
#endif
DATA32 **row_ptr;
DATA32 *ptr, *dst_ptr, *src_data, *dst_data;
int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h;
- int m_clip_x = 0, m_clip_y = 0, m_clip_w = 0, m_clip_h = 0, mdx = 0, mdy = 0;
int src_w, src_h, dst_w, dst_h;
RGBA_Gfx_Func func;
- RGBA_Image *maskobj = NULL;
- DATA8 *mask = NULL;
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;
dst_clip_h = dst_h;
}
- if (dc->mask.mask)
- {
- m_clip_x = dc->mask.x;
- m_clip_y = dc->mask.y;
- m_clip_w = dc->mask.mask->cache_entry.w;
- m_clip_h = dc->mask.mask->cache_entry.h;
- RECTS_CLIP_TO_RECT(m_clip_x, m_clip_y, m_clip_w, m_clip_h,
- dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h);
- if ((m_clip_w <= 0) || (m_clip_h <= 0)) return;
- dst_clip_x = m_clip_x;
- dst_clip_y = m_clip_y;
- dst_clip_w = m_clip_w;
- dst_clip_h = m_clip_h;
- }
-
if (dst_clip_x < dst_region_x)
{
dst_clip_w += dst_clip_x - dst_region_x;
/* figure out dest start ptr */
dst_ptr = dst_data + dst_clip_x + (dst_clip_y * dst_w);
- if (dc->mask.mask)
- {
- func = evas_common_gfx_func_composite_pixel_mask_span_get(src, dst, dst_clip_w, dc->render_op);
- maskobj = dc->mask.mask;
- mask = maskobj->mask.mask;
-/*
- if (1 || dst_region_w > src_region_w || dst_region_h > src_region_h){
- printf("Mask w/h: %d/%d\n",maskobj->cache_entry.w,
- maskobj->cache_entry.h);
- printf("Warning: Unscaled mask (%d/%d) // (%d/%d)\n",
- dst_region_w,src_region_w,
- dst_region_h,src_region_h);
- }
- */
- }
- else if (dc->mul.use)
+ 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);
else
func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
{
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_IMAGE_SCALE_SAMPLE
- if ((src->pixman.im) && (dst->pixman.im) && (!dc->mask.mask) &&
- ((!dc->mul.use) ||
+ if ((src->pixman.im) && (dst->pixman.im) && ((!dc->mul.use) ||
((dc->mul.use) && (dc->mul.col == 0xffffffff))) &&
((dc->render_op == _EVAS_RENDER_COPY) ||
(dc->render_op == _EVAS_RENDER_BLEND)))
dst_clip_x, dst_clip_y,
dst_clip_w, dst_clip_h);
}
- else if ((src->pixman.im) && (dst->pixman.im) &&
- (dc->mask.mask) && (dc->mask.mask->pixman.im) &&
- ((dc->render_op == _EVAS_RENDER_COPY) ||
- (dc->render_op == _EVAS_RENDER_BLEND)))
- {
- // In case of pixel and color operation.
- pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
- if (dc->render_op == _EVAS_RENDER_BLEND)
- op = PIXMAN_OP_OVER;
-
- pixman_image_composite(op,
- src->pixman.im, dc->mask.mask->pixman.im,
- dst->pixman.im,
- (dst_clip_x - dst_region_x) + src_region_x,
- (dst_clip_y - dst_region_y) + src_region_y,
- 0, 0,
- dst_clip_x, dst_clip_y,
- dst_clip_w, dst_clip_h);
- }
else
# endif
#endif
{
ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
- if (mask)
- {
- mdx = (m_clip_x - dc->mask.x) + (m_clip_x - dst_clip_x);
- mdy = (m_clip_y - dc->mask.y) + (m_clip_y - dst_clip_y);
- mask += mdx + (mdy * maskobj->cache_entry.w);
- }
for (y = 0; y < dst_clip_h; y++)
{
/* * blend here [clip_w *] ptr -> dst_ptr * */
- func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
+ func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
ptr += src_w;
dst_ptr += dst_w;
- if (mask) mask += maskobj->cache_entry.w;
}
}
}
{
DATA32 *ptr;
RGBA_Gfx_Func func;
- RGBA_Image *maskobj;
- DATA8 *mask = NULL;
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->mask.mask)
- {
- func = evas_common_gfx_func_composite_pixel_mask_span_get(NULL, NULL, dst_clip_w, dc->render_op);
- maskobj = dc->mask.mask;
- mask = maskobj->mask.mask;
- }
- else if (dc->mul.use)
+ 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);
else
func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
- if (mask)
- {
- // mask += dst_clip_x - dc->mask.x;
- // mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
- while (dst_clip_h--)
- {
- func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
-
- ptr += src_w;
- dst_ptr += dst_w;
- mask += maskobj->cache_entry.w;
- }
- }
- else
+ while (dst_clip_h--)
{
- while (dst_clip_h--)
- {
- func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
+ func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
- ptr += src_w;
- dst_ptr += dst_w;
- }
+ ptr += src_w;
+ dst_ptr += dst_w;
}
}
int x, y, w, h;
Eina_Bool use : 1;
} clip;
- struct {
- int x, y, w, h;
- RGBA_Image *mask;
- } mask;
Cutout_Rects cutout;
struct {
struct {
Eina_Bool no_free : 1;
} image;
- struct {
- DATA8 *mask;
- Eina_Bool dirty: 1;
- } mask;
-
struct {
LK(lock);
Eina_List *list;
{
if (obj->is_smart) return 0;
/* If a mask: Assume alpha */
- if (obj->cur.mask) return 0;
if (obj->cur.cache.clip.a == 255)
{
if (obj->func->is_opaque)
Evas_Map *map;
Evas_Object_Protected_Data *clipper;
Evas_Object *eo_clipper;
- Evas_Object *mask;
Evas_Object *map_parent;
double scale;
Evas_Coord_Rectangle geometry;
void (*context_clip_clip) (void *data, void *context, int x, int y, int w, int h);
void (*context_clip_unset) (void *data, void *context);
int (*context_clip_get) (void *data, void *context, int *x, int *y, int *w, int *h);
- void (*context_mask_set) (void *data, void *context, void *mask, int x, int y, int w, int h);
- void (*context_mask_unset) (void *data, void *context);
void (*context_color_set) (void *data, void *context, int r, int g, int b, int a);
int (*context_color_get) (void *data, void *context, int *r, int *g, int *b, int *a);
void (*context_multiplier_set) (void *data, void *context, int r, int g, int b, int a);
void (*image_colorspace_set) (void *data, void *image, int cspace);
int (*image_colorspace_get) (void *data, void *image);
Eina_Bool (*image_can_region_get) (void *data, void *image);
- void (*image_mask_create) (void *data, void *image);
void *(*image_native_set) (void *data, void *image, void *native);
void *(*image_native_get) (void *data, void *image);
GLuint prog = gc->shared->shader[SHADER_RECT].prog;
int pn = 0;
- if (gc->dc->mask.mask)
- {
- RGBA_Draw_Context *dc;
- dc = gc->dc;
- Evas_GL_Image *im;
- im = (void *)dc->mask.mask;
- evas_gl_common_context_font_push(gc, im->tex,
- x - dc->mask.x,
- y - dc->mask.y,
- dc->mask.w, dc->mask.h,
- x, y, w, h,
- r, g, b, a);
- return;
- }
-
if (a < 255) blend = 1;
if (gc->dc->render_op == EVAS_RENDER_COPY) blend = 0;
{
static Cutout_Rects *rects = NULL;
RGBA_Draw_Context *dc;
- Evas_GL_Image *imm;
int r, g, b, a;
double ssx, ssy, ssw, ssh;
- double mssx, mssy, mssw, mssh;
Cutout_Rect *rct;
int c, cx, cy, cw, ch;
int i;
if (sw < 1) sw = 1;
if (sh < 1) sh = 1;
dc = gc->dc;
- imm = (Evas_GL_Image *)dc->mask.mask;
if (dc->mul.use)
{
a = (dc->mul.col >> 24) & 0xff;
evas_gl_common_rect_draw(gc, dx, dy, dw, dh);
return;
}
- if (imm)
- {
- evas_gl_common_image_update(gc, imm);
- if (!imm->tex) imm = NULL; /* Turn of mask on error */
- }
if ((im->cs.space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
(im->cs.space == EVAS_COLORSPACE_YCBCR422P709_PL))
nv12 = 1;
im->tex->im = im;
- if (imm) imm->tex->im = imm;
if ((!gc->dc->cutout.rects) ||
((gc->shared->info.tune.cutout.max > 0) &&
(gc->dc->cutout.active > gc->shared->info.tune.cutout.max)))
if (gc->dc->clip.use)
{
int nx, ny, nw, nh;
- double scalex,scaley;
nx = dx; ny = dy; nw = dw; nh = dh;
RECTS_CLIP_TO_RECT(nx, ny, nw, nh,
gc->dc->clip.x, gc->dc->clip.y,
gc->dc->clip.w, gc->dc->clip.h);
if ((nw < 1) || (nh < 1)) return;
- if ((!imm) && (nx == dx) && (ny == dy) && (nw == dw) && (nh == dh))
+ if ((nx == dx) && (ny == dy) && (nw == dw) && (nh == dh))
{
if (yuv)
evas_gl_common_context_yuv_push(gc,
ssy = (double)sy + ((double)(sh * (ny - dy)) / (double)(dh));
ssw = ((double)sw * (double)(nw)) / (double)(dw);
ssh = ((double)sh * (double)(nh)) / (double)(dh);
- if (imm)
- {
- /* Correct ones here */
- scalex = imm->w / (double)dc->mask.w;
- scaley = imm->h / (double)dc->mask.h;
- mssx = scalex * (nx - dc->mask.x);
- mssy = scaley * (ny - dc->mask.y);
- mssw = scalex * nw;
- mssh = scaley * nh;
-
- /* No yuv + imm I'm afraid */
- evas_gl_common_context_image_mask_push(gc,
- im->tex,
- imm->tex,
- ssx, ssy, ssw, ssh,
- mssx, mssy, mssw, mssh,
- //dc->mask.x, dc->mask.y, dc->mask.w, dc->mask.h,
- nx, ny, nw, nh,
- r, g, b, a,
- smooth);
- }
- else if (yuv)
+
+ if (yuv)
evas_gl_common_context_yuv_push(gc,
im->tex,
ssx, ssy, ssw, ssh,
return im->cs.space;
}
-static void
-eng_image_mask_create(void *data EINA_UNUSED, void *image)
-{
- Evas_GL_Image *im;
-
- if (!image) return;
- im = image;
- if (!im->im->image.data)
- evas_cache_image_load_data(&im->im->cache_entry);
- if (!im->tex)
- im->tex = evas_gl_common_texture_new(im->gc, im->im);
-}
-
-
static void *
eng_image_alpha_set(void *data, void *image, int has_alpha)
{
ORD(image_colorspace_set);
ORD(image_colorspace_get);
ORD(image_can_region_get);
- ORD(image_mask_create);
ORD(image_native_set);
ORD(image_native_get);
return ((RGBA_Draw_Context *)context)->mul.use;
}
-static void
-eng_context_mask_set(void *data EINA_UNUSED, void *context, void *mask, int x, int y, int w, int h)
-{
- evas_common_draw_context_set_mask(context, mask, x, y, w, h);
-}
-
-static void
-eng_context_mask_unset(void *data EINA_UNUSED, void *context)
-{
- evas_common_draw_context_unset_mask(context);
-}
-/*
-static void *
-eng_context_mask_get(void *data EINA_UNUSED, void *context)
-{
- return ((RGBA_Draw_Context *)context)->mask.mask;
-}
-*/
-
static void
eng_context_cutout_add(void *data EINA_UNUSED, void *context, int x, int y, int w, int h)
{
return ((Evas_Image_Load_Func*) im->info.loader)->do_region;
}
-static void
-eng_image_mask_create(void *data EINA_UNUSED, void *image)
-{
- RGBA_Image *im;
- int sz;
- uint8_t *dst,*end;
- uint32_t *src;
-
- if (!image) return;
- im = image;
- if (im->mask.mask && !im->mask.dirty) return;
-
- if (im->mask.mask) free(im->mask.mask);
- sz = im->cache_entry.w * im->cache_entry.h;
- im->mask.mask = malloc(sz);
- dst = im->mask.mask;
- if (!im->image.data)
- evas_cache_image_load_data(&im->cache_entry);
- src = (void*) im->image.data;
- if (!src) return;
- for (end = dst + sz ; dst < end ; dst ++, src ++)
- *dst = *src >> 24;
- im->mask.dirty = 0;
-}
-
-
static void *
eng_image_alpha_set(void *data EINA_UNUSED, void *image, int has_alpha)
{
eng_context_clip_clip,
eng_context_clip_unset,
eng_context_clip_get,
- eng_context_mask_set,
- eng_context_mask_unset,
eng_context_color_set,
eng_context_color_get,
eng_context_multiplier_set,
eng_image_colorspace_set,
eng_image_colorspace_get,
eng_image_can_region_get,
- eng_image_mask_create,
eng_image_native_set,
eng_image_native_get,
/* image cache funcs */