forked from enlightenment/efl
evas: Fix masks of masks and clippers of clippers in general
The root cause was simple: smart object clipped was not calling efl_super() on clip_set. Fixes T4813 (and probably a whole lot of other bugs)
This commit is contained in:
parent
98fe627ca4
commit
f909a6d6ea
|
@ -2016,6 +2016,8 @@ _efl_canvas_video_efl_canvas_object_clip_set(Evas_Object *obj, Efl_Canvas_Video_
|
||||||
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_CLIP_SET, 0, clip))
|
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_CLIP_SET, 0, clip))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
efl_canvas_object_clip_set(efl_super(obj, MY_CLASS), clip);
|
||||||
|
|
||||||
if (sd->crop.clipper) evas_object_clip_set(sd->crop.clipper, clip);
|
if (sd->crop.clipper) evas_object_clip_set(sd->crop.clipper, clip);
|
||||||
else evas_object_clip_set(sd->obj, clip);
|
else evas_object_clip_set(sd->obj, clip);
|
||||||
evas_object_clip_set(sd->bg, clip);
|
evas_object_clip_set(sd->bg, clip);
|
||||||
|
|
|
@ -2514,7 +2514,6 @@ enum _Evas_Object_Intercept_Cb_Type
|
||||||
EVAS_OBJECT_INTERCEPT_CB_FOCUS_SET,
|
EVAS_OBJECT_INTERCEPT_CB_FOCUS_SET,
|
||||||
EVAS_OBJECT_INTERCEPT_CB_COLOR_SET,
|
EVAS_OBJECT_INTERCEPT_CB_COLOR_SET,
|
||||||
EVAS_OBJECT_INTERCEPT_CB_CLIP_SET,
|
EVAS_OBJECT_INTERCEPT_CB_CLIP_SET,
|
||||||
EVAS_OBJECT_INTERCEPT_CB_CLIP_UNSET,
|
|
||||||
};
|
};
|
||||||
typedef enum _Evas_Object_Intercept_Cb_Type Evas_Object_Intercept_Cb_Type;
|
typedef enum _Evas_Object_Intercept_Cb_Type Evas_Object_Intercept_Cb_Type;
|
||||||
|
|
||||||
|
|
|
@ -433,7 +433,7 @@ static void
|
||||||
_clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj)
|
_clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if (_efl_canvas_object_clip_unset_block(eo_obj, obj)) return;
|
if (_efl_canvas_object_clip_unset_block(eo_obj, obj)) return;
|
||||||
if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_CLIP_UNSET, 1)) return;
|
if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_CLIP_SET, 1, NULL)) return;
|
||||||
if (obj->is_smart && obj->smart.smart && obj->smart.smart->smart_class &&
|
if (obj->is_smart && obj->smart.smart && obj->smart.smart->smart_class &&
|
||||||
obj->smart.smart->smart_class->clip_unset)
|
obj->smart.smart->smart_class->clip_unset)
|
||||||
{
|
{
|
||||||
|
|
|
@ -195,18 +195,17 @@ _evas_object_intercept_call(Evas_Object *eo_obj, Evas_Object_Intercept_Cb_Type c
|
||||||
}
|
}
|
||||||
if (!obj->interceptors) goto end_noblock;
|
if (!obj->interceptors) goto end_noblock;
|
||||||
blocked = evas_object_intercept_call_clip_set(eo_obj, obj, eo_other);
|
blocked = evas_object_intercept_call_clip_set(eo_obj, obj, eo_other);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
// else: fallthrough to unset
|
else
|
||||||
|
|
||||||
case EVAS_OBJECT_INTERCEPT_CB_CLIP_UNSET:
|
|
||||||
if (!internal)
|
|
||||||
{
|
{
|
||||||
if (_efl_canvas_object_clip_unset_block(eo_obj, obj))
|
if (!internal)
|
||||||
goto end_block;
|
{
|
||||||
|
if (_efl_canvas_object_clip_unset_block(eo_obj, obj))
|
||||||
|
goto end_block;
|
||||||
|
}
|
||||||
|
if (!obj->interceptors) goto end_noblock;
|
||||||
|
blocked = evas_object_intercept_call_clip_unset(eo_obj, obj);
|
||||||
}
|
}
|
||||||
if (!obj->interceptors) goto end_noblock;
|
|
||||||
blocked = evas_object_intercept_call_clip_unset(eo_obj, obj);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,18 +166,12 @@ evas_object_smart_clipped_smart_clip_unset(Evas_Object *eo_obj)
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_efl_canvas_group_clipped_efl_canvas_object_clip_set(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, Evas_Object *clip)
|
_efl_canvas_group_clipped_efl_canvas_object_clip_set(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, Evas_Object *clip)
|
||||||
{
|
{
|
||||||
if (clip)
|
if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_CLIP_SET, 0, clip))
|
||||||
{
|
return;
|
||||||
if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_CLIP_SET, 0, clip))
|
|
||||||
return;
|
efl_canvas_object_clip_set(efl_super(eo_obj, MY_CLASS), clip);
|
||||||
evas_object_smart_clipped_smart_clip_set(eo_obj, clip);
|
if (clip) evas_object_smart_clipped_smart_clip_set(eo_obj, clip);
|
||||||
}
|
else evas_object_smart_clipped_smart_clip_unset(eo_obj);
|
||||||
else
|
|
||||||
{
|
|
||||||
if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_CLIP_UNSET, 0))
|
|
||||||
return;
|
|
||||||
evas_object_smart_clipped_smart_clip_unset(eo_obj);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
static int
|
static int
|
||||||
_bgra_compare(unsigned int *data, unsigned int *ref, int w, int h)
|
_bgra_compare(unsigned int *data, unsigned int *ref, int w, int h)
|
||||||
{
|
{
|
||||||
int i,j;
|
int i, j, ret = 0;
|
||||||
for (j = 0; j < h; j++)
|
for (j = 0; j < h; j++)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -50,12 +50,12 @@ _bgra_compare(unsigned int *data, unsigned int *ref, int w, int h)
|
||||||
for (i = 0; i < w; i++)
|
for (i = 0; i < w; i++)
|
||||||
if (data[i+j*w] != ref[i+j*w])
|
if (data[i+j*w] != ref[i+j*w])
|
||||||
{
|
{
|
||||||
printf("Pixel %d differ: %#x vs. %#x\n", i+j*w, data[i+j*w], ref[i+j*w]);
|
printf("Pixel %2dx%-2d differ: %#x vs. %#x\n", i, j, data[i+j*w], ref[i+j*w]);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
return 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The usual useless unit test
|
// The usual useless unit test
|
||||||
|
|
Loading…
Reference in New Issue