forked from enlightenment/efl
evas map: remove unnecessary count comparison.
Our map points is fixed to 4. And no plans to support other cases yet.
This commit is contained in:
parent
46cca0febf
commit
74a695ecf1
|
@ -287,13 +287,10 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Map_Data *p
|
|||
{
|
||||
Gfx_Map_Point *ps = calloc(1, count * sizeof(Gfx_Map_Point));
|
||||
if (!ps) return m;
|
||||
if (count == 4)
|
||||
{
|
||||
ps[0].u = 0.0; ps[0].v = 0.0;
|
||||
ps[1].u = 1.0; ps[1].v = 0.0;
|
||||
ps[2].u = 1.0; ps[2].v = 1.0;
|
||||
ps[3].u = 0.0; ps[3].v = 1.0;
|
||||
}
|
||||
MAPCOW_WRITE(pd, points, ps);
|
||||
}
|
||||
|
||||
|
|
|
@ -252,8 +252,7 @@ _evas_event_object_list_raw_in_get_single(Evas *eo_e, Evas_Object_Protected_Data
|
|||
if (!evas_object_is_inside(clip->object, clip, x, y))
|
||||
return in;
|
||||
|
||||
if ((obj->map->cur.usemap) && (obj->map->cur.map) &&
|
||||
(obj->map->cur.map->count == 4))
|
||||
if ((obj->map->cur.usemap) && (obj->map->cur.map))
|
||||
{
|
||||
inside = evas_object_is_in_output_rect(eo_obj, obj, x, y, 1, 1);
|
||||
if (inside)
|
||||
|
@ -335,8 +334,7 @@ _evas_event_object_list_raw_in_get_single(Evas *eo_e, Evas_Object_Protected_Data
|
|||
|
||||
if (inside)
|
||||
{
|
||||
if ((obj->map->cur.usemap) && (obj->map->cur.map) &&
|
||||
(obj->map->cur.map->count == 4))
|
||||
if ((obj->map->cur.usemap) && (obj->map->cur.map))
|
||||
{
|
||||
if (!evas_map_coords_get(obj->map->cur.map, x, y,
|
||||
&(obj->map->cur.map->mx),
|
||||
|
|
|
@ -2033,7 +2033,7 @@ _hide(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
|||
(!evas_object_is_source_invisible(eo_obj, obj)))
|
||||
{
|
||||
if ((!obj->is_smart) ||
|
||||
((obj->map->cur.map) && (obj->map->cur.map->count == 4) && (obj->map->cur.usemap)))
|
||||
((obj->map->cur.map) && (obj->map->cur.usemap)))
|
||||
{
|
||||
Evas_Object_Pointer_Data *obj_pdata;
|
||||
Eina_Bool mouse_grabbed = EINA_FALSE;
|
||||
|
|
Loading…
Reference in New Issue