evas - render - have lock point to allow for async obj walk + update add

this adds a lock for when walking all the objects to generate render
commands for an async render. this allows even the object tree walk
plus update area caluclation to be moved off into async if every oject
that can change canvas state actually does so correctly. this change
adds all those lock block calls to synchronise with an async object
tree walk.
This commit is contained in:
Carsten Haitzler 2015-02-10 20:44:38 +09:00
parent 9b24d378a3
commit 7c5f92d702
26 changed files with 488 additions and 75 deletions

View File

@ -15,6 +15,7 @@ _camera_node_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
EOLIAN static void
_evas_3d_camera_evas_3d_object_change_notify(Eo *obj,Evas_3D_Camera_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->nodes) eina_hash_foreach(pd->nodes, _camera_node_change_notify, obj);
}
@ -74,6 +75,7 @@ EOLIAN static void
_evas_3d_camera_eo_base_destructor(Eo *obj,
Evas_3D_Camera_Data *pd)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
//evas_3d_object_unreference(&pd->base);
if (pd->nodes) eina_hash_free(pd->nodes);
eo_do_super(obj, MY_CLASS, eo_destructor());
@ -93,6 +95,7 @@ EOLIAN static void
_evas_3d_camera_projection_matrix_set(Eo *obj, Evas_3D_Camera_Data *pd,
const Evas_Real *matrix)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_array_set(&pd->projection, matrix);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL));
}
@ -116,6 +119,7 @@ _evas_3d_camera_projection_perspective_set(Eo *obj, Evas_3D_Camera_Data *pd,
ymax = dnear * (Evas_Real)tan((double)fovy * M_PI / 360.0);
xmax = ymax * aspect;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL));
}
@ -126,6 +130,7 @@ _evas_3d_camera_projection_frustum_set(Eo *obj, Evas_3D_Camera_Data *pd,
Evas_Real bottom, Evas_Real top,
Evas_Real dnear, Evas_Real dfar)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL));
}
@ -136,6 +141,7 @@ _evas_3d_camera_projection_ortho_set(Eo *obj, Evas_3D_Camera_Data *pd,
Evas_Real bottom, Evas_Real top,
Evas_Real dnear, Evas_Real dfar)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL));
}

View File

@ -15,6 +15,7 @@ _light_node_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
EOLIAN static void
_evas_3d_light_evas_3d_object_change_notify(Eo *obj, Evas_3D_Light_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->nodes)
eina_hash_foreach(pd->nodes, _light_node_change_notify, obj);
}
@ -97,6 +98,7 @@ _evas_3d_light_eo_base_constructor(Eo *obj, Evas_3D_Light_Data *pd)
EOLIAN static void
_evas_3d_light_eo_base_destructor(Eo *obj, Evas_3D_Light_Data *pd)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->nodes)
eina_hash_free(pd->nodes);
eo_do_super(obj, MY_CLASS, eo_destructor());
@ -106,6 +108,7 @@ _evas_3d_light_eo_base_destructor(Eo *obj, Evas_3D_Light_Data *pd)
EOLIAN static void
_evas_3d_light_directional_set(Eo *obj, Evas_3D_Light_Data *pd, Eina_Bool directional)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->directional != directional)
{
pd->directional = directional;
@ -122,6 +125,7 @@ _evas_3d_light_directional_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd)
EOLIAN static void
_evas_3d_light_ambient_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->ambient.r = r;
pd->ambient.g = g;
pd->ambient.b = b;
@ -142,6 +146,7 @@ _evas_3d_light_ambient_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_Rea
EOLIAN static void
_evas_3d_light_diffuse_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->diffuse.r = r;
pd->diffuse.g = g;
pd->diffuse.b = b;
@ -162,6 +167,7 @@ _evas_3d_light_diffuse_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_Rea
EOLIAN static void
_evas_3d_light_specular_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->specular.r = r;
pd->specular.g = g;
pd->specular.b = b;
@ -182,6 +188,7 @@ _evas_3d_light_specular_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_Re
EOLIAN static void
_evas_3d_light_spot_exponent_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real exponent)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->spot_exp = exponent;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_SPOT_EXP, NULL));
}
@ -195,6 +202,7 @@ _evas_3d_light_spot_exponent_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd)
EOLIAN static void
_evas_3d_light_spot_cutoff_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real cutoff)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->spot_cutoff = cutoff;
pd->spot_cutoff_cos = cos(cutoff * M_PI / 180.0);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_SPOT_CUTOFF, NULL));
@ -209,6 +217,7 @@ _evas_3d_light_spot_cutoff_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd)
EOLIAN static void
_evas_3d_light_attenuation_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real constant, Evas_Real linear, Evas_Real quadratic)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->atten_const = constant;
pd->atten_linear = linear;
pd->atten_quad = quadratic;
@ -226,6 +235,7 @@ _evas_3d_light_attenuation_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas
EOLIAN static void
_evas_3d_light_attenuation_enable_set(Eo *obj, Evas_3D_Light_Data *pd, Eina_Bool enable)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->enable_attenuation != enable)
{
pd->enable_attenuation = enable;
@ -243,6 +253,7 @@ EOLIAN static void
_evas_3d_light_projection_matrix_set(Eo *obj, Evas_3D_Light_Data *pd,
const Evas_Real *matrix)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_array_set(&pd->projection, matrix);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_PROJECTION, NULL));
}
@ -266,6 +277,7 @@ _evas_3d_light_projection_perspective_set(Eo *obj, Evas_3D_Light_Data *pd,
ymax = dnear * (Evas_Real)tan((double)fovy * M_PI / 360.0);
xmax = ymax * aspect;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_PROJECTION, NULL));
}
@ -276,6 +288,7 @@ _evas_3d_light_projection_frustum_set(Eo *obj, Evas_3D_Light_Data *pd,
Evas_Real bottom, Evas_Real top,
Evas_Real dnear, Evas_Real dfar)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_PROJECTION, NULL));
}
@ -286,6 +299,7 @@ _evas_3d_light_projection_ortho_set(Eo *obj, Evas_3D_Light_Data *pd,
Evas_Real bottom, Evas_Real top,
Evas_Real dnear, Evas_Real dfar)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_PROJECTION, NULL));
}

View File

@ -15,14 +15,16 @@ _material_mesh_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
EOLIAN static void
_evas_3d_material_evas_3d_object_change_notify(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->meshes)
eina_hash_foreach(pd->meshes, _material_mesh_change_notify, obj);
}
EOLIAN static void
_evas_3d_material_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd)
_evas_3d_material_evas_3d_object_update_notify(Eo *obj, Evas_3D_Material_Data *pd)
{
int i;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
for (i = 0; i < EVAS_3D_MATERIAL_ATTRIB_COUNT; i++)
{
if (pd->attribs[i].enable)
@ -106,6 +108,7 @@ _evas_3d_material_eo_base_destructor(Eo *obj, Evas_3D_Material_Data *pd)
{
int i;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->meshes)
eina_hash_free(pd->meshes);
@ -121,8 +124,9 @@ _evas_3d_material_eo_base_destructor(Eo *obj, Evas_3D_Material_Data *pd)
}
EOLIAN static void
_evas_3d_material_enable_set(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Eina_Bool enable)
_evas_3d_material_enable_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Eina_Bool enable)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->attribs[attrib].enable = enable;
}
@ -135,6 +139,7 @@ _evas_3d_material_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Eva
EOLIAN static void
_evas_3d_material_color_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_color_set(&pd->attribs[attrib].color, r, g, b, a);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MATERIAL_COLOR, NULL));
}
@ -149,8 +154,9 @@ _evas_3d_material_color_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas
}
EOLIAN static void
_evas_3d_material_shininess_set(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_Real shininess)
_evas_3d_material_shininess_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_Real shininess)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->shininess = shininess;
}
@ -163,6 +169,7 @@ _evas_3d_material_shininess_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd)
EOLIAN static void
_evas_3d_material_texture_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Evas_3D_Texture *texture)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->attribs[attrib].texture != texture)
{
if (pd->attribs[attrib].texture)

View File

@ -182,11 +182,12 @@ _evas_3d_mesh_evas_3d_object_change_notify(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_
}
EOLIAN static void
_evas_3d_mesh_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
_evas_3d_mesh_evas_3d_object_update_notify(Eo *obj, Evas_3D_Mesh_Data *pd)
{
Eina_List *l;
Evas_3D_Mesh_Frame *f;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
EINA_LIST_FOREACH(pd->frames, l, f)
{
if (f->material)
@ -259,14 +260,16 @@ _evas_3d_mesh_eo_base_constructor(Eo *obj, Evas_3D_Mesh_Data *pd)
EOLIAN static void
_evas_3d_mesh_eo_base_destructor(Eo *obj, Evas_3D_Mesh_Data *pd)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
//evas_3d_object_unreference(&pd->base);
_mesh_fini(pd);
eo_do_super(obj, MY_CLASS, eo_destructor());
}
EOLIAN static void
_evas_3d_mesh_shade_mode_set(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, Evas_3D_Shade_Mode mode)
_evas_3d_mesh_shade_mode_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Shade_Mode mode)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->shade_mode != mode)
{
pd->shade_mode = mode;
@ -283,6 +286,7 @@ _evas_3d_mesh_shade_mode_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
EOLIAN static void
_evas_3d_mesh_vertex_count_set(Eo *obj, Evas_3D_Mesh_Data *pd, unsigned int count)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->vertex_count = count;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_VERTEX_COUNT, NULL));
}
@ -304,6 +308,7 @@ _evas_3d_mesh_frame_add(Eo *obj, Evas_3D_Mesh_Data *pd, int frame)
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
f = evas_3d_mesh_frame_new(obj);
if (f == NULL)
@ -325,6 +330,7 @@ _evas_3d_mesh_frame_del(Eo *obj, Evas_3D_Mesh_Data *pd, int frame)
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->frames = eina_list_remove(pd->frames, f);
evas_3d_mesh_frame_free(f);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_FRAME, NULL));
@ -344,6 +350,7 @@ _evas_3d_mesh_frame_material_set(Eo *obj, Evas_3D_Mesh_Data *pd, int frame, Evas
if (f->material == material)
return;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (f->material)
{
evas_3d_material_mesh_del(f->material, obj);
@ -388,6 +395,7 @@ _evas_3d_mesh_frame_vertex_data_set(Eo *obj, Evas_3D_Mesh_Data *pd, int frame, E
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (attrib == EVAS_3D_VERTEX_POSITION)
{
int i = 0, j = 0, size = stride/sizeof(float);
@ -471,6 +479,7 @@ _evas_3d_mesh_frame_vertex_data_copy_set(Eo *obj, Evas_3D_Mesh_Data *pd, int fra
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (attrib == EVAS_3D_VERTEX_POSITION)
{
element_count = 3;
@ -599,6 +608,7 @@ _evas_3d_mesh_frame_vertex_data_map(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd,
return NULL;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
f->vertices[attrib].mapped = EINA_TRUE;
return f->vertices[attrib].data;
}
@ -620,6 +630,7 @@ _evas_3d_mesh_frame_vertex_data_unmap(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
f->vertices[attrib].mapped = EINA_FALSE;
}
@ -640,6 +651,7 @@ _evas_3d_mesh_frame_vertex_stride_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd
EOLIAN static void
_evas_3d_mesh_index_data_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Index_Format format, int count, const void *indices)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->owns_indices && pd->indices)
free(pd->indices);
@ -671,6 +683,7 @@ _evas_3d_mesh_index_data_copy_set(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, Ev
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (!pd->owns_indices || pd->index_size < size)
{
if (pd->owns_indices && pd->indices)
@ -716,6 +729,7 @@ _evas_3d_mesh_index_data_map(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
return NULL;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->index_mapped = EINA_TRUE;
return pd->indices;
}
@ -729,12 +743,14 @@ _evas_3d_mesh_index_data_unmap(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->index_mapped = EINA_FALSE;
}
EOLIAN static void
_evas_3d_mesh_vertex_assembly_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Vertex_Assembly assembly)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->assembly = assembly;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_VERTEX_ASSEMBLY, NULL));
}
@ -742,12 +758,14 @@ _evas_3d_mesh_vertex_assembly_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Vertex
EOLIAN static Evas_3D_Vertex_Assembly
_evas_3d_mesh_vertex_assembly_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
return pd->assembly;
}
EOLIAN static void
_evas_3d_mesh_fog_color_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_color_set(&pd->fog_color, r, g, b, a);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_FOG, NULL));
}
@ -765,6 +783,7 @@ _evas_3d_mesh_fog_color_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd,
EOLIAN static void
_evas_3d_mesh_fog_enable_set(Eo *obj, Evas_3D_Mesh_Data *pd, Eina_Bool enabled)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->fog_enabled = enabled;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_FOG, NULL));
}
@ -778,6 +797,7 @@ _evas_3d_mesh_fog_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
EOLIAN static void
_evas_3d_mesh_blending_enable_set(Eo *obj, Evas_3D_Mesh_Data *pd, Eina_Bool blending)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->blending = blending;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_BLENDING, NULL));
}
@ -791,6 +811,7 @@ _evas_3d_mesh_blending_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
EOLIAN static void
_evas_3d_mesh_blending_func_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Blend_Func sfactor, Evas_3D_Blend_Func dfactor)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->blend_sfactor = sfactor;
pd->blend_dfactor = dfactor;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_BLENDING, NULL));
@ -808,6 +829,7 @@ EOLIAN static void
_evas_3d_mesh_mmap_set(Eo *obj, Evas_3D_Mesh_Data *pd,
Eina_File *file, const char *key EINA_UNUSED)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
_mesh_fini(pd);
_mesh_init(pd);
@ -821,6 +843,7 @@ _evas_3d_mesh_efl_file_file_set(Eo *obj, Evas_3D_Mesh_Data *pd,
const char *file,
const char *key EINA_UNUSED)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
_mesh_fini(pd);
_mesh_init(pd);
@ -838,6 +861,7 @@ _evas_3d_mesh_efl_file_save(Eo *obj, Evas_3D_Mesh_Data *pd,
{
if ((file == NULL) || (obj == NULL) || (pd == NULL)) return EINA_FALSE;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, 0);
if (f == NULL)
@ -974,6 +998,7 @@ _evas_3d_mesh_color_pick_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
EOLIAN static Eina_Bool
_evas_3d_mesh_color_pick_enable_set(Eo *obj, Evas_3D_Mesh_Data *pd, Eina_Bool _enabled)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->color_pick_enabled != _enabled)
pd->color_pick_enabled = _enabled;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_COLOR_PICK, NULL));

View File

@ -85,6 +85,7 @@ _evas_3d_node_evas_3d_object_change_notify(Eo *obj, Evas_3D_Node_Data *pd, Evas_
Eina_Bool scale;
Eina_Bool parent_change;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* Notify all scenes using this node that it has changed. */
if (pd->scenes_root)
eina_hash_foreach(pd->scenes_root, _node_scene_root_change_notify, obj);
@ -457,6 +458,7 @@ _node_update_done(Evas_3D_Node *obj, void *data EINA_UNUSED)
EOLIAN static void
_evas_3d_node_evas_3d_object_update_notify(Eo *obj, Evas_3D_Node_Data *pd EINA_UNUSED)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* Update transform. */
evas_3d_node_tree_traverse(obj, EVAS_3D_TREE_TRAVERSE_LEVEL_ORDER, EINA_FALSE,
_node_transform_update, NULL);
@ -933,6 +935,7 @@ _evas_3d_node_member_add(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node *member)
ERR("Failed to add a member node (adding to itself).");
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
Evas_3D_Node_Data *pdmember = eo_data_scope_get(member, MY_CLASS);
if (pdmember->parent == obj)
return;
@ -973,6 +976,7 @@ _evas_3d_node_member_del(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node *member)
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* Delete the member node. */
pd->members = eina_list_remove(pd->members, member);
pdmember->parent = NULL;
@ -996,12 +1000,14 @@ _evas_3d_node_parent_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd)
EOLIAN static const Eina_List *
_evas_3d_node_member_list_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
return pd->members;
}
EOLIAN static void
_evas_3d_node_position_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->position.x = x;
pd->position.y = y;
pd->position.z = z;
@ -1012,6 +1018,7 @@ _evas_3d_node_position_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Rea
EOLIAN static void
_evas_3d_node_orientation_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z, Evas_Real w)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->orientation.x = x;
pd->orientation.y = y;
pd->orientation.z = z;
@ -1028,6 +1035,7 @@ _evas_3d_node_orientation_angle_axis_set(Eo *obj, Evas_3D_Node_Data *pd,
Evas_Real s = sin(half_angle);
Evas_Vec3 axis;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_vec3_set(&axis, x, y, z);
evas_vec3_normalize(&axis, &axis);
@ -1042,6 +1050,7 @@ _evas_3d_node_orientation_angle_axis_set(Eo *obj, Evas_3D_Node_Data *pd,
EOLIAN static void
_evas_3d_node_scale_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->scale.x = x;
pd->scale.y = y;
pd->scale.z = z;
@ -1134,6 +1143,7 @@ _evas_3d_node_scale_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space space,
EOLIAN static void
_evas_3d_node_position_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->position_inherit = inherit;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM_POSITION, NULL));
}
@ -1141,6 +1151,7 @@ _evas_3d_node_position_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inh
EOLIAN static void
_evas_3d_node_orientation_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->orientation_inherit = inherit;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM_ORIENTATION, NULL));
}
@ -1148,6 +1159,7 @@ _evas_3d_node_orientation_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool
EOLIAN static void
_evas_3d_node_scale_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->scale_inherit = inherit;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM_SCALE, NULL));
}
@ -1179,6 +1191,7 @@ _evas_3d_node_look_at_set(Eo *obj, Evas_3D_Node_Data *pd,
Evas_Vec3 up;
Evas_Vec3 x, y, z;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* Target position in parent space. */
if (target_space == EVAS_3D_SPACE_LOCAL)
{
@ -1292,6 +1305,7 @@ _evas_3d_node_camera_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Camera *camera)
if (pd->data.camera.camera == camera)
return;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->data.camera.camera)
{
/* Detach previous camera object. */
@ -1327,6 +1341,7 @@ _evas_3d_node_light_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Light *light)
if (pd->data.light.light == light)
return;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->data.light.light)
{
/* Detach previous light object. */
@ -1367,6 +1382,7 @@ _evas_3d_node_mesh_add(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh)
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if ((nm = _node_mesh_new(obj, mesh)) == NULL)
{
ERR("Failed to create node mesh.");
@ -1401,6 +1417,7 @@ _evas_3d_node_mesh_del(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh)
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (!eina_hash_del(pd->data.mesh.node_meshes, &mesh, NULL))
{
ERR("The given mesh doesn't belong to this node.");
@ -1418,6 +1435,7 @@ _evas_3d_node_mesh_del(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh)
EOLIAN static const Eina_List *
_evas_3d_node_mesh_list_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
return pd->data.mesh.meshes;
}
@ -1432,6 +1450,7 @@ _evas_3d_node_mesh_frame_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh,
return;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if ((nm = eina_hash_find(pd->data.mesh.node_meshes, &mesh)) == NULL)
{
ERR("The given mesh doesn't belongs to this node.");
@ -1453,6 +1472,7 @@ _evas_3d_node_mesh_frame_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd, Evas_3D
return 0;
}
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if ((nm = eina_hash_find(pd->data.mesh.node_meshes, &mesh)) == NULL)
{
ERR("The given mesh doesn't belongs to this node.");

View File

@ -22,8 +22,9 @@ EOLIAN static Evas *
}
EOLIAN static void
_evas_3d_object_type_set(Eo *obj EINA_UNUSED, Evas_3D_Object_Data *pd, Evas_3D_Object_Type type)
_evas_3d_object_type_set(Eo *obj, Evas_3D_Object_Data *pd, Evas_3D_Object_Type type)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->type = type;
}
@ -46,6 +47,7 @@ _evas_3d_object_change(Eo *obj, Evas_3D_Object_Data *pd, Evas_3D_State state, Ev
if (pd->dirty[state])
return;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->dirty[state] = EINA_TRUE;
pd->dirty[EVAS_3D_STATE_ANY] = EINA_TRUE;
@ -58,6 +60,7 @@ _evas_3d_object_update(Eo *obj, Evas_3D_Object_Data *pd)
if (!pd->dirty[EVAS_3D_STATE_ANY])
return;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
eo_do(obj, evas_3d_object_update_notify());
memset(&pd->dirty[0], 0x00, sizeof(Eina_Bool) * EVAS_3D_STATE_MAX);

View File

@ -24,11 +24,12 @@ evas_3d_scene_data_fini(Evas_3D_Scene_Public_Data *data)
}
EOLIAN static void
_evas_3d_scene_evas_3d_object_change_notify(Eo *eo_obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
_evas_3d_scene_evas_3d_object_change_notify(Eo *eo_obj, Evas_3D_Scene_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
{
Eina_List *l;
Evas_Object *eo;
evas_object_async_block(eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS));
EINA_LIST_FOREACH(pd->images, l, eo)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo, EVAS_OBJECT_CLASS);
@ -37,8 +38,9 @@ _evas_3d_scene_evas_3d_object_change_notify(Eo *eo_obj EINA_UNUSED, Evas_3D_Scen
}
EOLIAN static void
_evas_3d_scene_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd)
_evas_3d_scene_evas_3d_object_update_notify(Eo *obj, Evas_3D_Scene_Data *pd)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->root_node)
{
eo_do(pd->root_node, evas_3d_object_update());
@ -80,6 +82,7 @@ _evas_3d_scene_root_node_set(Eo *obj, Evas_3D_Scene_Data *pd, Evas_3D_Node *node
if (pd->root_node == node)
return;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->root_node)
{
evas_3d_node_scene_root_del(pd->root_node, obj);
@ -109,6 +112,7 @@ _evas_3d_scene_camera_node_set(Eo *obj, Evas_3D_Scene_Data *pd, Evas_3D_Node *no
if (pd->camera_node == node)
return;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->camera_node)
{
evas_3d_node_scene_camera_del(pd->camera_node, obj);
@ -135,6 +139,7 @@ _evas_3d_scene_camera_node_get(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd)
EOLIAN static void
_evas_3d_scene_size_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, int w, int h)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->w = w;
pd->h = h;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_SCENE_SIZE, NULL));
@ -151,6 +156,7 @@ EOLIAN static void
_evas_3d_scene_background_color_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd,
Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_color_set(&pd->bg_color, r, g, b, a);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_SCENE_BACKGROUND_COLOR, NULL));
}
@ -630,12 +636,13 @@ _evas_3d_scene_pick(Eo *obj, Evas_3D_Scene_Data *pd, Evas_Real x, Evas_Real y,
Evas_3D_Camera_Data *pd_camera;
Evas_3D_Object_Data *pd_parent;
Evas_Public_Data *e;
int tex, px, py;;
int tex = 0, px, py;;
double redcomponent;
Eina_Stringshare *tmp;
Eina_Array *arr = NULL;
Eina_Bool update_scene = EINA_FALSE;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd_parent = eo_data_scope_get(obj, EVAS_3D_OBJECT_CLASS);
e = eo_data_scope_get(pd_parent->evas, EVAS_CANVAS_CLASS);
@ -752,6 +759,7 @@ _evas_3d_scene_exist(Eo *obj, Evas_3D_Scene_Data *pd, Evas_Real x, Evas_Real y,
data.s = 0.0;
data.t = 0.0;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* Update the scene graph. */
eo_do(obj, evas_3d_object_update());
pd_camera_node = eo_data_scope_get(pd->camera_node, EVAS_3D_NODE_CLASS);
@ -778,6 +786,7 @@ _evas_3d_scene_pick_member_list_get(Eo *obj, Evas_3D_Scene_Data *pd, Evas_Real x
void *node;
Eina_Bool pick = EINA_FALSE;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* Check pick for given scene. */
pick = eo_do(obj, evas_3d_scene_pick(x, y, NULL, NULL, NULL, NULL));
@ -805,6 +814,7 @@ _evas_3d_scene_shadows_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd)
EOLIAN static void
_evas_3d_scene_shadows_enable_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Eina_Bool _shadows_enabled)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->shadows_enabled = _shadows_enabled;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_SCENE_SHADOWS_ENABLED, NULL));
}
@ -818,6 +828,7 @@ _evas_3d_scene_color_pick_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd
EOLIAN static Eina_Bool
_evas_3d_scene_color_pick_enable_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Eina_Bool _enabled)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->color_pick_enabled != _enabled)
pd->color_pick_enabled = _enabled;

View File

@ -196,6 +196,7 @@ EOLIAN static void
_evas_3d_texture_evas_3d_object_change_notify(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->materials)
eina_hash_foreach(pd->materials, _texture_material_change_notify, obj);
}
@ -203,6 +204,7 @@ _evas_3d_texture_evas_3d_object_change_notify(Eo *obj, Evas_3D_Texture_Data *pd,
EOLIAN static void
_evas_3d_texture_evas_3d_object_update_notify(Eo *obj, Evas_3D_Texture_Data *pd)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->source)
{
Eo *evas = NULL;
@ -311,19 +313,21 @@ _evas_3d_texture_eo_base_constructor(Eo *obj, Evas_3D_Texture_Data *pd EINA_UNUS
EOLIAN static void
_evas_3d_texture_eo_base_destructor(Eo *obj, Evas_3D_Texture_Data *pd EINA_UNUSED)
{
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
//evas_3d_object_unreference(&pd->base);
_texture_fini(obj);
eo_do_super(obj, MY_CLASS, eo_destructor());
}
EOLIAN static void
_evas_3d_texture_data_set(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Evas_3D_Color_Format color_format,
_evas_3d_texture_data_set(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Color_Format color_format,
Evas_3D_Pixel_Format pixel_format, int w, int h, const void *data)
{
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (!pd->engine_data && e->engine.func->texture_new)
pd->engine_data = e->engine.func->texture_new(e->engine.data.output);
@ -341,6 +345,7 @@ _evas_3d_texture_file_set(Eo *obj, Evas_3D_Texture_Data *pd, const char *file, c
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (!pd->engine_data && e->engine.func->texture_new)
pd->engine_data = e->engine.func->texture_new(e->engine.data.output);
@ -361,6 +366,7 @@ _evas_3d_texture_source_set(Eo *obj , Evas_3D_Texture_Data *pd, Evas_Object *sou
if (source == pd->source)
return;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
_texture_fini(obj);
if (source == NULL)
@ -391,7 +397,7 @@ _evas_3d_texture_source_set(Eo *obj , Evas_3D_Texture_Data *pd, Evas_Object *sou
}
EOLIAN static void
_evas_3d_texture_source_visible_set(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Eina_Bool visible)
_evas_3d_texture_source_visible_set(Eo *obj, Evas_3D_Texture_Data *pd, Eina_Bool visible)
{
Evas_Object_Protected_Data *src_obj;
@ -403,6 +409,7 @@ _evas_3d_texture_source_visible_set(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *p
if (src_obj->proxy->src_invisible == !visible)
return;
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, src_obj->proxy, Evas_Object_Proxy_Data, proxy_write)
proxy_write->src_invisible = !visible;
EINA_COW_WRITE_END(evas_object_proxy_cow, src_obj->proxy, proxy_write);
@ -448,6 +455,7 @@ _evas_3d_texture_size_get(Eo *obj, Evas_3D_Texture_Data *pd, int *w, int *h)
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (e->engine.func->texture_size_get)
{
e->engine.func->texture_size_get(e->engine.data.output,
@ -461,6 +469,7 @@ _evas_3d_texture_wrap_set(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Wrap_Mode s
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (e->engine.func->texture_wrap_set)
{
e->engine.func->texture_wrap_set(e->engine.data.output,
@ -475,6 +484,7 @@ _evas_3d_texture_wrap_get(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Wrap_Mode *
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (e->engine.func->texture_wrap_set)
{
e->engine.func->texture_wrap_get(e->engine.data.output,
@ -488,6 +498,7 @@ _evas_3d_texture_filter_set(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Texture_F
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (e->engine.func->texture_filter_set)
{
e->engine.func->texture_filter_set(e->engine.data.output,
@ -502,6 +513,7 @@ _evas_3d_texture_filter_get(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Evas_
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (e->engine.func->texture_filter_get)
{
e->engine.func->texture_filter_get(e->engine.data.output,

View File

@ -230,6 +230,8 @@ _evas_object_clip_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *
return;
MAGIC_CHECK_END();
evas_object_async_block(obj);
clip = eo_data_scope_get(eo_clip, EVAS_OBJECT_CLASS);
if (obj->cur->clipper && obj->cur->clipper->object == eo_clip) return;
if (eo_obj == eo_clip)
@ -264,7 +266,10 @@ _evas_object_clip_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *
return;
}
if (evas_object_intercept_call_clip_set(eo_obj, obj, eo_clip)) return;
if (evas_object_intercept_call_clip_set(eo_obj, obj, eo_clip))
{
return;
}
// illegal to set anything but a rect or an image as a clip
if (clip->type != o_rect_type && clip->type != o_image_type)
{
@ -391,6 +396,7 @@ _evas_object_clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj)
{
if (!obj->cur->clipper) return;
evas_object_async_block(obj);
obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer);
/* unclip */

View File

@ -1326,6 +1326,7 @@ evas_object_text_font_string_parse(char *buffer, char dest[14][256])
EOLIAN void
_evas_canvas_font_path_clear(Eo *eo_e EINA_UNUSED, Evas_Public_Data *evas)
{
evas_canvas_async_block(evas);
while (evas->font_path)
{
eina_stringshare_del(evas->font_path->data);
@ -1337,6 +1338,7 @@ EOLIAN void
_evas_canvas_font_path_append(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *path)
{
if (!path) return;
evas_canvas_async_block(e);
e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path));
evas_font_init();
@ -1346,6 +1348,7 @@ EOLIAN void
_evas_canvas_font_path_prepend(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *path)
{
if (!path) return;
evas_canvas_async_block(e);
e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path));
evas_font_init();
@ -1422,6 +1425,7 @@ _evas_canvas_font_hinting_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Fo
{
Evas_Layer *lay;
evas_canvas_async_block(e);
if (e->hinting == hinting) return;
e->hinting = hinting;
@ -1452,6 +1456,7 @@ _evas_canvas_font_hinting_can_hint(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Ev
EOLIAN void
_evas_canvas_font_cache_flush(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
{
evas_canvas_async_block(e);
evas_render_rendering_wait(e);
e->engine.func->font_cache_flush(e->engine.data.output);
}
@ -1460,6 +1465,7 @@ EOLIAN void
_evas_canvas_font_cache_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int size)
{
if (size < 0) size = 0;
evas_canvas_async_block(e);
evas_render_rendering_wait(e);
e->engine.func->font_cache_set(e->engine.data.output, size);
}

View File

@ -7,10 +7,14 @@ void
evas_object_inject(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas *e)
{
Evas_Layer *lay;
Evas_Public_Data *evas;
if (!obj) return;
if (!e) return;
if (obj->in_layer) return;
evas = eo_data_scope_get(e, EVAS_CANVAS_CLASS);
if (!evas) return;
evas_canvas_async_block(evas);
lay = evas_layer_find(e, obj->cur->layer);
if (!lay)
{
@ -180,6 +184,7 @@ _evas_object_layer_set(Eo *eo_obj, Evas_Object_Protected_Data *obj EINA_UNUSED,
Evas *eo_e;
if (obj->delete_me) return;
evas_object_async_block(obj);
if (evas_object_intercept_call_layer_set(eo_obj, obj, l)) return;
if (obj->smart.parent) return;
if (obj->cur->layer == l)

View File

@ -184,6 +184,7 @@ _evas_canvas_eo_base_constructor(Eo *eo_obj, Evas_Public_Data *e)
EVAS_ARRAY_SET(e, texts_unref_queue);
#undef EVAS_ARRAY_SET
eina_lock_new(&(e->lock_objects));
}
EAPI void
@ -206,9 +207,11 @@ _evas_canvas_eo_base_destructor(Eo *eo_e, Evas_Public_Data *e)
int i;
Eina_Bool del;
evas_canvas_async_block(e);
if (e->walking_list == 0) evas_render_idle_flush(eo_e);
if (e->walking_list > 0) return;
evas_render_idle_flush(eo_e);
_evas_post_event_callback_free(eo_e);
@ -299,6 +302,8 @@ _evas_canvas_eo_base_destructor(Eo *eo_e, Evas_Public_Data *e)
_evas_device_cleanup(eo_e);
eina_lock_free(&(e->lock_objects));
e->magic = 0;
eo_do_super(eo_e, MY_CLASS, eo_destructor());
}
@ -318,6 +323,7 @@ _evas_canvas_output_method_set(Eo *eo_e, Evas_Public_Data *e, int render_method)
if (em->id_engine != render_method) return;
if (!evas_module_load(em)) return;
evas_canvas_async_block(e);
/* set the correct render */
e->output.render_method = render_method;
e->engine.func = (em->functions);
@ -352,11 +358,15 @@ _evas_canvas_engine_info_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
EOLIAN static Eina_Bool
_evas_canvas_engine_info_set(Eo *eo_e, Evas_Public_Data *e, Evas_Engine_Info *info)
{
Eina_Bool res;
if (!info) return EINA_FALSE;
if (info != e->engine.info) return EINA_FALSE;
if (info->magic != e->engine.info_magic) return EINA_FALSE;
return (Eina_Bool)e->engine.func->setup(eo_e, info);
evas_canvas_async_block(e);
res = e->engine.func->setup(eo_e, info);
return res;
}
EOLIAN static void
@ -366,6 +376,7 @@ _evas_canvas_output_size_set(Eo *eo_e, Evas_Public_Data *e, int w, int h)
if (w < 1) w = 1;
if (h < 1) h = 1;
evas_canvas_async_block(e);
e->output.w = w;
e->output.h = h;
e->output.changed = 1;
@ -394,6 +405,7 @@ _evas_canvas_output_viewport_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas
x = 0;
y = 0;
}
evas_canvas_async_block(e);
e->viewport.x = x;
e->viewport.y = y;
e->viewport.w = w;
@ -417,6 +429,7 @@ _evas_canvas_output_framespace_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Ev
{
if ((x == e->framespace.x) && (y == e->framespace.y) &&
(w == e->framespace.w) && (h == e->framespace.h)) return;
evas_canvas_async_block(e);
e->framespace.x = x;
e->framespace.y = y;
e->framespace.w = w;

View File

@ -472,6 +472,7 @@ _evas_object_map_enable_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bo
if (obj->map->cur.usemap == enabled) return;
pchange = obj->changed;
evas_object_async_block(obj);
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
map_write->cur.usemap = enabled;
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
@ -540,6 +541,7 @@ _evas_object_map_enable_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *
EOLIAN void
_evas_object_map_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, const Evas_Map *map)
{
evas_object_async_block(obj);
if ((!map) || (map->count < 4))
{
if (obj->map->surface)
@ -631,6 +633,7 @@ _evas_object_map_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, const Evas_Map
EOLIAN Evas_Map *
_evas_object_map_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
{
evas_object_async_block(obj);
return obj->map->cur.map;
}

View File

@ -557,7 +557,7 @@ _evas_image_mmap_set(Eo *eo_obj, Evas_Image_Data *o, const Eina_File *f, const c
if ((o->cur->key) && (key) && (!strcmp(o->cur->key, key)))
return;
}
evas_object_async_block(obj);
_image_init_set(f, NULL, key, eo_obj, obj, o, &lo);
o->engine_data = ENFN->image_mmap(ENDT, o->cur->u.f, o->cur->key, &o->load_error, &lo);
_image_done_set(eo_obj, obj, o);
@ -590,6 +590,7 @@ _evas_image_efl_file_file_set(Eo *eo_obj, Evas_Image_Data *o, const char *file,
if (!o->engine_data)
ENFN->image_data_preload_cancel(ENDT, o->engine_data, eo_obj);
*/
evas_object_async_block(obj);
_image_init_set(NULL, file, key, eo_obj, obj, o, &lo);
o->engine_data = ENFN->image_load(ENDT, o->cur->u.file, o->cur->key, &o->load_error, &lo);
_image_done_set(eo_obj, obj, o);
@ -645,7 +646,7 @@ _evas_image_source_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Object *eo_src)
}
}
if (o->cur->source == eo_src) return EINA_TRUE;
evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
/* Kill the image if any */
if (o->cur->u.file || o->cur->key)
@ -730,9 +731,11 @@ EOLIAN static void
_evas_image_source_clip_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Eina_Bool source_clip)
{
Evas_Object_Protected_Data *src_obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
source_clip = !!source_clip;
if (o->proxy_src_clip == source_clip) return;
evas_object_async_block(obj);
o->proxy_src_clip = source_clip;
if (!o->cur->source) return;
@ -802,6 +805,7 @@ EOLIAN static void
_evas_image_source_visible_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Eina_Bool visible)
{
Evas_Object_Protected_Data *src_obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (!o->cur->source) return;
@ -809,6 +813,7 @@ _evas_image_source_visible_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Eina_
src_obj = eo_data_scope_get(o->cur->source, EVAS_OBJECT_CLASS);
if (src_obj->proxy->src_invisible == !visible) return;
evas_object_async_block(obj);
EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, src_obj->proxy, Evas_Object_Proxy_Data, proxy_write)
proxy_write->src_invisible = !visible;
EINA_COW_WRITE_END(evas_object_proxy_cow, src_obj->proxy, proxy_write);
@ -844,6 +849,7 @@ _evas_image_scene_set(Eo *eo_obj, Evas_Image_Data *o, Evas_3D_Scene *scene)
if (o->cur->scene == scene) return;
evas_object_async_block(obj);
_image_init_set(NULL, NULL, NULL, eo_obj, obj, o, &lo);
o->engine_data = ENFN->image_load(ENDT, o->cur->u.file, o->cur->key, &o->load_error, &lo);
_image_done_set(eo_obj, obj, o);
@ -872,6 +878,7 @@ _evas_image_border_set(Eo *eo_obj, Evas_Image_Data *o, int l, int r, int t, int
(o->cur->border.t == t) &&
(o->cur->border.b == b)) return;
evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
{
state_write->border.l = l;
@ -896,13 +903,14 @@ _evas_image_border_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *l, int *
EOLIAN static void
_evas_image_border_center_fill_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Border_Fill_Mode fill)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (fill == o->cur->border.fill) return;
evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
state_write->border.fill = fill;
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->changed = EINA_TRUE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -915,9 +923,11 @@ _evas_image_border_center_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
static void
_evas_image_filled_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool setting)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
setting = !!setting;
if (o->filled == setting) return;
evas_object_async_block(obj);
o->filled = setting;
if (!o->filled)
evas_object_event_callback_del(eo_obj, EVAS_CALLBACK_RESIZE,
@ -944,15 +954,15 @@ _evas_image_filled_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
EOLIAN static void
_evas_image_border_scale_set(Eo *eo_obj, Evas_Image_Data *o, double scale)
{
Evas_Object_Protected_Data *obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (scale == o->cur->border.scale) return;
evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
state_write->border.scale = scale;
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->changed = EINA_TRUE;
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -965,7 +975,7 @@ _evas_image_border_scale_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
EOLIAN static void
_evas_image_fill_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
Evas_Object_Protected_Data *obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (w == 0) return;
if (h == 0) return;
@ -977,6 +987,7 @@ _evas_image_fill_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Coord x, Evas_Coord y,
(o->cur->fill.w == w) &&
(o->cur->fill.h == h)) return;
evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
{
state_write->fill.x = x;
@ -988,7 +999,6 @@ _evas_image_fill_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Coord x, Evas_Coord y,
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->changed = EINA_TRUE;
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -1004,16 +1014,16 @@ _evas_image_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Evas_Coord *x,
EOLIAN static void
_evas_image_fill_spread_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Fill_Spread spread)
{
Evas_Object_Protected_Data *obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (spread == (Evas_Fill_Spread)o->cur->spread) return;
evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
state_write->spread = spread;
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->changed = EINA_TRUE;
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -1032,6 +1042,7 @@ _evas_image_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h)
if (o->cur->scene) return;
evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
if (w < 1) w = 1;
if (h < 1) h = 1;
@ -1112,6 +1123,7 @@ _evas_image_data_convert(Eo *eo_obj, Evas_Image_Data *o, Evas_Colorspace to_cspa
DATA32 *data;
void* result = NULL;
evas_object_async_block(obj);
if ((o->preloading) && (o->engine_data))
{
o->preloading = EINA_FALSE;
@ -1140,6 +1152,7 @@ _evas_image_data_set(Eo *eo_obj, Evas_Image_Data *o, void *data)
Eina_Bool resize_call = EINA_FALSE;
evas_object_async_block(obj);
evas_render_rendering_wait(obj->layer->evas);
_evas_object_image_cleanup(eo_obj, obj, o);
@ -1224,6 +1237,7 @@ _evas_image_data_get(Eo *eo_obj, Evas_Image_Data *_pd EINA_UNUSED, Eina_Bool for
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (for_writing) evas_object_async_block(obj);
if (for_writing) evas_render_rendering_wait(obj->layer->evas);
data = NULL;
@ -1309,12 +1323,16 @@ _image_preload_internal(Eo *eo_obj, void *_pd, Eina_Bool cancel)
EOLIAN static void
_evas_image_preload_begin(Eo *eo_obj, Evas_Image_Data *_pd EINA_UNUSED)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_image_preload_internal(eo_obj, _pd, EINA_FALSE);
}
EOLIAN static void
_evas_image_preload_cancel(Eo *eo_obj, Evas_Image_Data *_pd EINA_UNUSED)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_image_preload_internal(eo_obj, _pd, EINA_TRUE);
}
@ -1324,6 +1342,7 @@ _evas_image_data_copy_set(Eo *eo_obj, Evas_Image_Data *o, void *data)
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (!data) return;
evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
if ((o->cur->image.w <= 0) ||
(o->cur->image.h <= 0)) return;
@ -1365,12 +1384,14 @@ _evas_image_data_copy_set(Eo *eo_obj, Evas_Image_Data *o, void *data)
EOLIAN static void
_evas_image_data_update_add(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Eina_Rectangle *r;
int cnt;
RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, o->cur->image.w, o->cur->image.h);
if ((w <= 0) || (h <= 0)) return;
if (!o->written) return;
evas_object_async_block(obj);
cnt = eina_list_count(o->pixels->pixel_updates);
if (cnt == 1)
{ // detect single blob case already there to do a nop
@ -1399,7 +1420,6 @@ _evas_image_data_update_add(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w,
}
o->changed = EINA_TRUE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -1408,6 +1428,7 @@ _evas_image_alpha_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool has_alpha)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if ((o->preloading) && (o->engine_data))
{
o->preloading = EINA_FALSE;
@ -1457,8 +1478,9 @@ _evas_image_alpha_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
EOLIAN static void
_evas_image_efl_image_smooth_scale_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool smooth_scale)
{
Evas_Object_Protected_Data *obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (((smooth_scale) && (o->cur->smooth_scale)) ||
((!smooth_scale) && (!o->cur->smooth_scale)))
return;
@ -1467,7 +1489,6 @@ _evas_image_efl_image_smooth_scale_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->changed = EINA_TRUE;
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -1482,6 +1503,7 @@ _evas_image_reload(Eo *eo_obj, Evas_Image_Data *o)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if ((o->preloading) && (o->engine_data))
{
o->preloading = EINA_FALSE;
@ -1516,6 +1538,7 @@ _evas_image_efl_file_save(Eo *eo_obj, Evas_Image_Data *o, const char *file, cons
RGBA_Image *im;
if (!o->engine_data) return 0;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
o->engine_data = ENFN->image_data_get(ENDT, o->engine_data, 0, &data, &o->load_error);
if (flags)
{
@ -1571,6 +1594,7 @@ _evas_image_pixels_import(Eo *eo_obj, Evas_Image_Data *o, Evas_Pixel_Import_Sour
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
if ((pixels->w != o->cur->image.w) || (pixels->h != o->cur->image.h)) return EINA_FALSE;
@ -1631,6 +1655,8 @@ _evas_image_pixels_import(Eo *eo_obj, Evas_Image_Data *o, Evas_Pixel_Import_Sour
EOLIAN static void
_evas_image_pixels_get_callback_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Evas_Object_Image_Pixels_Get_Cb func, void *data)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
{
pixi_write->func.get_pixels = func;
@ -1643,7 +1669,7 @@ EOLIAN static void
_evas_image_pixels_dirty_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool dirty)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (dirty) o->dirty_pixels = EINA_TRUE;
else o->dirty_pixels = EINA_FALSE;
o->changed = EINA_TRUE;
@ -1659,15 +1685,15 @@ _evas_image_pixels_dirty_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
EOLIAN static void
_evas_image_load_dpi_set(Eo *eo_obj, Evas_Image_Data *o, double dpi)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (dpi == o->load_opts->dpi) return;
evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
low->dpi = dpi;
EINA_COW_LOAD_OPTS_WRITE_END(o, low);
if (o->cur->u.file)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_image_unload(eo_obj, 0);
evas_object_inform_call_image_unloaded(eo_obj);
evas_object_image_load(eo_obj, obj, o);
@ -1685,8 +1711,9 @@ _evas_image_load_dpi_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
EOLIAN static void
_evas_image_efl_image_load_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->load_opts->w == w) && (o->load_opts->h == h)) return;
evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
{
low->w = w;
@ -1696,7 +1723,6 @@ _evas_image_efl_image_load_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h
if (o->cur->u.file)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_image_unload(eo_obj, 0);
evas_object_inform_call_image_unloaded(eo_obj);
evas_object_image_load(eo_obj, obj, o);
@ -1716,14 +1742,15 @@ _evas_image_efl_image_load_size_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o,
EOLIAN static void
_evas_image_load_scale_down_set(Eo *eo_obj, Evas_Image_Data *o, int scale_down)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (o->load_opts->scale_down_by == scale_down) return;
evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
low->scale_down_by = scale_down;
EINA_COW_LOAD_OPTS_WRITE_END(o, low);
if (o->cur->u.file)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_image_unload(eo_obj, 0);
evas_object_inform_call_image_unloaded(eo_obj);
evas_object_image_load(eo_obj, obj, o);
@ -1741,9 +1768,10 @@ _evas_image_load_scale_down_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
EOLIAN static void
_evas_image_load_region_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->load_opts->region.x == x) && (o->load_opts->region.y == y) &&
(o->load_opts->region.w == w) && (o->load_opts->region.h == h)) return;
evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
{
low->region.x = x;
@ -1755,7 +1783,6 @@ _evas_image_load_region_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w,
if (o->cur->u.file)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_image_unload(eo_obj, 0);
evas_object_inform_call_image_unloaded(eo_obj);
evas_object_image_load(eo_obj, obj, o);
@ -1776,7 +1803,9 @@ _evas_image_load_region_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *x,
EOLIAN static void
_evas_image_load_orientation_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Eina_Bool enable)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (o->load_opts->orientation == !!enable) return;
evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
low->orientation = !!enable;
@ -1793,6 +1822,7 @@ EOLIAN static void
_evas_image_colorspace_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Colorspace cspace)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
@ -1814,6 +1844,7 @@ EOLIAN static void
_evas_image_video_surface_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Video_Surface *surf)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
if (o->video_surface)
@ -1877,6 +1908,7 @@ EOLIAN static void
_evas_image_video_surface_caps_set(Eo *eo_obj, Evas_Image_Data *o, unsigned int caps)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
@ -1906,6 +1938,8 @@ evas_object_image_native_surface_set(Evas_Object *eo_obj, Evas_Native_Surface *s
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
evas_object_event_callback_del_full
(eo_obj, EVAS_CALLBACK_DEL, _on_image_native_surface_del, NULL);
if (surf) // We need to unset native surf on del to remove shared hash refs
@ -1918,7 +1952,7 @@ EOLIAN static void
_evas_image_native_surface_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Native_Surface *surf)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
evas_render_rendering_wait(obj->layer->evas);
_evas_object_image_cleanup(eo_obj, obj, o);
@ -1945,6 +1979,7 @@ EOLIAN static void
_evas_image_scale_hint_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Scale_Hint hint)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (o->scale_hint == hint) return;
o->scale_hint = hint;
if (o->engine_data)
@ -1977,6 +2012,7 @@ EOLIAN static void
_evas_image_content_hint_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Content_Hint hint)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (o->content_hint == hint) return;
o->content_hint = hint;
if (o->engine_data)
@ -2005,6 +2041,8 @@ evas_object_image_alpha_mask_set(Evas_Object *eo_obj, Eina_Bool ismask)
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (!ismask) return;
/* Convert to A8 if not already */
@ -2122,7 +2160,7 @@ _evas_image_animated_frame_set(Eo *eo_obj, Evas_Image_Data *o, int frame_index)
if (o->cur->frame == frame_index) return;
if (!evas_object_image_animated_get(eo_obj)) return;
evas_object_async_block(obj);
frame_count = evas_object_image_animated_frame_count_get(eo_obj);
/* limit the size of frame to FRAME_MAX */
@ -2149,6 +2187,7 @@ _evas_image_animated_frame_set(Eo *eo_obj, Evas_Image_Data *o, int frame_index)
EOLIAN void
_evas_canvas_image_cache_flush(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
{
evas_canvas_async_block(e);
evas_render_rendering_wait(e);
e->engine.func->image_cache_flush(e->engine.data.output);
}
@ -2158,6 +2197,7 @@ _evas_canvas_image_cache_reload(Eo *eo_e, Evas_Public_Data *e)
{
Evas_Layer *layer;
evas_canvas_async_block(e);
evas_image_cache_flush(eo_e);
EINA_INLIST_FOREACH(e->layers, layer)
{
@ -2195,6 +2235,7 @@ EOLIAN void
_evas_canvas_image_cache_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int size)
{
if (size < 0) size = 0;
evas_canvas_async_block(e);
evas_render_rendering_wait(e);
e->engine.func->image_cache_set(e->engine.data.output, size);
}
@ -2513,6 +2554,7 @@ evas_object_image_unload(Evas_Object *eo_obj, Eina_Bool dirty)
(o->pixels_checked_out > 0)) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (dirty)
{
if (o->engine_data)
@ -4660,13 +4702,14 @@ _evas_object_image_video_overlay_do(Evas_Object *eo_obj)
EOLIAN static void
_evas_image_filter_program_set(Eo *eo_obj, Evas_Image_Data *o, const char *arg)
{
Evas_Object_Protected_Data *obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Evas_Filter_Program *pgm = NULL;
if (!o) return;
if (o->cur->filter->code == arg) return;
if (o->cur->filter->code && arg && !strcmp(arg, o->cur->filter->code)) return;
evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
EINA_COW_IMAGE_FILTER_WRITE_BEGIN(state_write, fcow)
{
@ -4693,7 +4736,6 @@ _evas_image_filter_program_set(Eo *eo_obj, Evas_Image_Data *o, const char *arg)
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
// Update object
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
o->changed = EINA_TRUE;
evas_object_change(eo_obj, obj);
}
@ -4745,6 +4787,7 @@ _evas_image_filter_source_set(Eo *eo_obj, Evas_Image_Data *o, const char *name,
Eina_Hash *sources = o->cur->filter->sources;
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (eo_source) source = eo_data_scope_get(eo_source, EVAS_OBJECT_CLASS);
if (!name)

View File

@ -118,6 +118,7 @@ _evas_line_xy_set(Eo *eo_obj, Evas_Line_Data *_pd, Evas_Coord x1, Evas_Coord y1,
(y1 == (obj->cur->geometry.y + o->cur.y1)) &&
(x2 == (obj->cur->geometry.x + o->cur.x2)) &&
(y2 == (obj->cur->geometry.y + o->cur.y2))) return;
evas_object_async_block(obj);
if (!(obj->layer->evas->is_frozen))
{

View File

@ -645,6 +645,7 @@ evas_object_del(Evas_Object *eo_obj)
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
if (!obj) return;
evas_object_async_block(obj);
if (obj->delete_me || obj->eo_del_called) return;
if (obj->ref > 0)
{
@ -764,6 +765,7 @@ _evas_object_position_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coor
if (obj->delete_me) return;
if (!obj->layer) return;
evas_object_async_block(obj);
if (evas_object_intercept_call_move(eo_obj, obj, x, y)) return;
if (obj->doing.in_move > 0)
@ -846,6 +848,7 @@ _evas_object_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w,
if (!obj->layer) return;
if (w < 0) w = 0; if (h < 0) h = 0;
evas_object_async_block(obj);
if (evas_object_intercept_call_resize(eo_obj, obj, w, h)) return;
if (obj->doing.in_resize > 0)
@ -978,6 +981,7 @@ _evas_object_size_hint_display_mode_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Prot
{
if (!obj) return;
if (obj->delete_me) return;
evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if (obj->size_hints->dispmode == dispmode) return;
obj->size_hints->dispmode = dispmode;
@ -1002,6 +1006,7 @@ _evas_object_size_hint_min_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas
{
if (obj->delete_me)
return;
evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->min.w == w) && (obj->size_hints->min.h == h)) return;
obj->size_hints->min.w = w;
@ -1027,6 +1032,7 @@ _evas_object_size_hint_max_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas
{
if (obj->delete_me)
return;
evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->max.w == w) && (obj->size_hints->max.h == h)) return;
obj->size_hints->max.w = w;
@ -1052,6 +1058,7 @@ _evas_object_size_hint_request_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
{
if (obj->delete_me)
return;
evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->request.w == w) && (obj->size_hints->request.h == h)) return;
obj->size_hints->request.w = w;
@ -1079,6 +1086,7 @@ _evas_object_size_hint_aspect_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, E
{
if (obj->delete_me)
return;
evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->aspect.mode == aspect) && (obj->size_hints->aspect.size.w == w) && (obj->size_hints->aspect.size.h == h)) return;
obj->size_hints->aspect.mode = aspect;
@ -1105,6 +1113,7 @@ _evas_object_size_hint_align_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, do
{
if (obj->delete_me)
return;
evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->align.x == x) && (obj->size_hints->align.y == y)) return;
obj->size_hints->align.x = x;
@ -1130,6 +1139,7 @@ _evas_object_size_hint_weight_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, d
{
if (obj->delete_me)
return;
evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->weight.x == x) && (obj->size_hints->weight.y == y)) return;
obj->size_hints->weight.x = x;
@ -1158,6 +1168,7 @@ _evas_object_size_hint_padding_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
{
if (obj->delete_me)
return;
evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->padding.l == l) && (obj->size_hints->padding.r == r) && (obj->size_hints->padding.t == t) && (obj->size_hints->padding.b == b)) return;
obj->size_hints->padding.l = l;
@ -1187,6 +1198,7 @@ evas_object_hide(Evas_Object *eo_obj)
static void
_evas_object_visibility_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool visible)
{
evas_object_async_block(obj);
if (visible) _show(eo_obj, obj);
else _hide(eo_obj, obj);
}
@ -1390,6 +1402,7 @@ _evas_object_color_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, int r, int g
ERR("Evas only handles pre multiplied colors!");
}
evas_object_async_block(obj);
if (evas_object_intercept_call_color_set(eo_obj, obj, r, g, b, a)) return;
if (obj->is_smart)
{
@ -1442,6 +1455,7 @@ _evas_object_anti_alias_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bo
anti_alias = !!anti_alias;
if (obj->cur->anti_alias == anti_alias)return;
evas_object_async_block(obj);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->anti_alias = anti_alias;
@ -1464,6 +1478,7 @@ _evas_object_scale_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, double scale
if (obj->delete_me) return;
if (obj->cur->scale == scale) return;
evas_object_async_block(obj);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->scale = scale;
@ -1487,6 +1502,7 @@ _evas_object_render_op_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Ren
if (obj->delete_me) return;
if (obj->cur->render_op == render_op) return;
evas_object_async_block(obj);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->render_op = render_op;
@ -1841,6 +1857,7 @@ _evas_object_type_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, c
EOLIAN static void
_evas_object_precise_is_inside_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Eina_Bool precise)
{
evas_object_async_block(obj);
obj->precise_is_inside = precise;
}
@ -1853,6 +1870,7 @@ _evas_object_precise_is_inside_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected
EOLIAN static void
_evas_object_static_clip_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Eina_Bool is_static_clip)
{
evas_object_async_block(obj);
obj->is_static_clip = is_static_clip;
}
@ -1881,6 +1899,7 @@ _evas_object_is_frame_object_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Ei
{
Evas_Coord x, y;
evas_object_async_block(obj);
evas_object_geometry_get(eo_obj, &x, &y, NULL, NULL);
_is_frame_flag_set(obj, is_frame);

View File

@ -124,7 +124,7 @@ _evas_polygon_point_add(Eo *eo_obj, Evas_Polygon_Data *_pd, Evas_Coord x, Evas_C
Evas_Coord min_x, max_x, min_y, max_y;
int is, was = 0;
evas_object_async_block(obj);
if (!obj->layer->evas->is_frozen)
{
if (!evas_event_passes_through(eo_obj, obj) &&
@ -230,6 +230,7 @@ _evas_polygon_points_clear(Eo *eo_obj, Evas_Polygon_Data *_pd)
void *list_data;
int is, was;
evas_object_async_block(obj);
was = evas_object_is_in_output_rect(eo_obj, obj,
obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y, 1, 1);

View File

@ -237,6 +237,7 @@ _evas_object_smart_member_add(Eo *smart_obj, Evas_Smart_Data *o, Evas_Object *eo
if (obj->smart.parent == smart_obj) return;
evas_object_async_block(obj);
if (obj->smart.parent) evas_object_smart_member_del(eo_obj);
o->member_count++;
@ -283,6 +284,7 @@ _evas_object_smart_member_del(Eo *smart_obj, Evas_Smart_Data *_pd EINA_UNUSED, E
if (!obj->smart.parent) return;
evas_object_async_block(obj);
Evas_Object_Protected_Data *smart = eo_data_scope_get(smart_obj, EVAS_OBJECT_CLASS);
if (smart->smart.smart && smart->smart.smart->smart_class->member_del)
smart->smart.smart->smart_class->member_del(smart_obj, eo_obj);
@ -403,17 +405,19 @@ _evas_object_smart_iterator_free(Evas_Object_Smart_Iterator *it)
// Should we have an eo_children_iterator_new API and just inherit from it ?
EOLIAN static Eina_Iterator*
_evas_object_smart_iterator_new(Eo *o, Evas_Smart_Data *priv)
_evas_object_smart_iterator_new(Eo *eo_obj, Evas_Smart_Data *priv)
{
Evas_Object_Smart_Iterator *it;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (!priv->contained) return NULL;
evas_object_async_block(obj);
it = calloc(1, sizeof(Evas_Object_Smart_Iterator));
if (!it) return NULL;
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
it->parent = eo_ref(o);
it->parent = eo_ref(eo_obj);
it->current = priv->contained;
it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_smart_iterator_next);
@ -424,13 +428,13 @@ _evas_object_smart_iterator_new(Eo *o, Evas_Smart_Data *priv)
}
EOLIAN static Eina_List*
_evas_object_smart_members_get(Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o)
_evas_object_smart_members_get(Eo *eo_obj, Evas_Smart_Data *o)
{
Eina_List *members;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Eina_List *members = NULL;
Eina_Inlist *member;
members = NULL;
evas_object_async_block(obj);
for (member = o->contained; member; member = member->next)
members = eina_list_append(members, ((Evas_Object_Protected_Data *)member)->object);
@ -440,9 +444,11 @@ _evas_object_smart_members_get(Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o)
const Eina_Inlist *
evas_object_smart_members_get_direct(const Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
evas_object_async_block(obj);
if (!eo_isa(eo_obj, MY_CLASS)) return NULL;
Evas_Smart_Data *o = eo_data_scope_get(eo_obj, MY_CLASS);
return o->contained;
@ -858,6 +864,7 @@ _evas_object_smart_need_recalculate_set(Eo *eo_obj, Evas_Smart_Data *o, Eina_Boo
// XXX: do i need this?
if (!obj || !obj->layer || obj->delete_me) return;
evas_object_async_block(obj);
/* remove this entry from calc_list or processed list */
if (eina_clist_element_is_linked(&o->calc_entry))
eina_clist_remove(&o->calc_entry);
@ -893,6 +900,7 @@ _evas_object_smart_calculate(Eo *eo_obj, Evas_Smart_Data *o)
if (!obj->smart.smart || !obj->smart.smart->smart_class->calculate)
return;
evas_object_async_block(obj);
o->need_recalculate = 0;
obj->smart.smart->smart_class->calculate(eo_obj);
}
@ -921,6 +929,7 @@ evas_call_smarts_calculate(Evas *eo_e)
Eina_Clist *elem;
Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
evas_canvas_async_block(e);
evas_event_freeze(eo_e);
e->in_smart_calc++;
@ -963,6 +972,7 @@ EOLIAN static void
_evas_object_smart_changed(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
evas_object_change(eo_obj, obj);
eo_do(eo_obj, evas_obj_smart_need_recalculate_set(1));
}
@ -1297,6 +1307,7 @@ evas_object_smart_need_bounding_box_update(Evas_Object *eo_obj)
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Evas_Smart_Data *o = eo_data_scope_get(eo_obj, MY_CLASS);
evas_object_async_block(obj);
if (o->update_boundingbox_needed) return;
o->update_boundingbox_needed = EINA_TRUE;
@ -1318,6 +1329,7 @@ evas_object_smart_bounding_box_update(Evas_Object *eo_obj, Evas_Object_Protected
return;
MAGIC_CHECK_END();
evas_object_async_block(obj);
os = eo_data_scope_get(eo_obj, MY_CLASS);
if (!os->update_boundingbox_needed) return;

View File

@ -380,11 +380,13 @@ _evas_text_eo_base_constructor(Eo *eo_obj, Evas_Text_Data *o)
}
EOLIAN static void
_evas_text_efl_text_properties_font_source_set(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char *font_source)
_evas_text_efl_text_properties_font_source_set(Eo *eo_obj, Evas_Text_Data *o, const char *font_source)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->cur.source) && (font_source) &&
(!strcmp(o->cur.source, font_source)))
return;
evas_object_async_block(obj);
/*
if (o->cur.source) eina_stringshare_del(o->cur.source);
if (font_source) o->cur.source = eina_stringshare_add(font_source);
@ -415,6 +417,7 @@ _evas_text_filter_changed_set(Evas_Text_Data *o, Eina_Bool val)
EOLIAN static void
_evas_text_efl_text_properties_font_set(Eo *eo_obj, Evas_Text_Data *o, const char *font, Evas_Font_Size size)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Eina_Bool is, was = EINA_FALSE;
Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
Eina_Bool source_invisible = EINA_FALSE;
@ -423,6 +426,7 @@ _evas_text_efl_text_properties_font_set(Eo *eo_obj, Evas_Text_Data *o, const cha
if ((!font) || (size <= 0)) return;
evas_object_async_block(obj);
if (!(o->cur.font && !strcmp(font, o->cur.font)))
{
fdesc = evas_font_desc_new();
@ -447,7 +451,6 @@ _evas_text_efl_text_properties_font_set(Eo *eo_obj, Evas_Text_Data *o, const cha
eina_stringshare_replace(&o->cur.font, font);
o->prev.font = NULL;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (!(obj->layer->evas->is_frozen))
{
pass = evas_event_passes_through(eo_obj, obj);
@ -927,6 +930,7 @@ _evas_text_evas_object_size_set(Eo *eo_obj, Evas_Text_Data *o, Evas_Coord w, Eva
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->geometry.w = w;
@ -944,6 +948,7 @@ _evas_text_ellipsis_set(Eo *eo_obj, Evas_Text_Data *o, double ellipsis)
if (o->cur.ellipsis == ellipsis) return;
evas_object_async_block(obj);
o->cur.ellipsis = ellipsis;
o->changed = 1;
_evas_text_filter_changed_set(o, EINA_TRUE);
@ -979,15 +984,16 @@ _evas_text_eo_base_dbg_info_get(Eo *eo_obj, Evas_Text_Data *o EINA_UNUSED, Eo_Db
EOLIAN static void
_evas_text_efl_text_text_set(Eo *eo_obj, Evas_Text_Data *o, const char *_text)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
int is, was, len;
Eina_Unicode *text;
if ((o->cur.utf8_text) && (_text) && (!strcmp(o->cur.utf8_text, _text)))
return;
evas_object_async_block(obj);
text = eina_unicode_utf8_to_unicode(_text, &len);
if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING);
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
was = evas_object_is_in_output_rect(eo_obj, obj,
obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y, 1, 1);
@ -1020,8 +1026,10 @@ _evas_text_efl_text_text_set(Eo *eo_obj, Evas_Text_Data *o, const char *_text)
}
EOLIAN static void
_evas_text_bidi_delimiters_set(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char *delim)
_evas_text_bidi_delimiters_set(Eo *eo_obj, Evas_Text_Data *o, const char *delim)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
eina_stringshare_replace(&o->bidi_delimiters, delim);
}
@ -1212,11 +1220,12 @@ _evas_text_char_coords_get(Eo *eo_obj, Evas_Text_Data *o, Evas_Coord x, Evas_Coo
EOLIAN static void
_evas_text_style_set(Eo *eo_obj, Evas_Text_Data *o, Evas_Text_Style_Type style)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
int pl = 0, pr = 0, pt = 0, pb = 0, l = 0, r = 0, t = 0, b = 0;
int w = 0, h = 0;
if (o->cur.style == style) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
evas_text_style_pad_get(o->cur.style, &pl, &pr, &pt, &pb);
o->cur.style = style;
@ -1239,15 +1248,16 @@ _evas_text_style_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o)
EOLIAN static void
_evas_text_shadow_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->cur.shadow.r == r) && (o->cur.shadow.g == g) &&
(o->cur.shadow.b == b) && (o->cur.shadow.a == a))
return;
evas_object_async_block(obj);
o->cur.shadow.r = r;
o->cur.shadow.g = g;
o->cur.shadow.b = b;
o->cur.shadow.a = a;
o->changed = 1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -1263,15 +1273,16 @@ _evas_text_shadow_color_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, int *r, i
EOLIAN static void
_evas_text_glow_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->cur.glow.r == r) && (o->cur.glow.g == g) &&
(o->cur.glow.b == b) && (o->cur.glow.a == a))
return;
evas_object_async_block(obj);
o->cur.glow.r = r;
o->cur.glow.g = g;
o->cur.glow.b = b;
o->cur.glow.a = a;
o->changed = 1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -1287,15 +1298,16 @@ _evas_text_glow_color_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, int *r, int
EOLIAN static void
_evas_text_glow2_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->cur.glow2.r == r) && (o->cur.glow2.g == g) &&
(o->cur.glow2.b == b) && (o->cur.glow2.a == a))
return;
evas_object_async_block(obj);
o->cur.glow2.r = r;
o->cur.glow2.g = g;
o->cur.glow2.b = b;
o->cur.glow2.a = a;
o->changed = 1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -1311,15 +1323,16 @@ _evas_text_glow2_color_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, int *r, in
EOLIAN static void
_evas_text_outline_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->cur.outline.r == r) && (o->cur.outline.g == g) &&
(o->cur.outline.b == b) && (o->cur.outline.a == a))
return;
evas_object_async_block(obj);
o->cur.outline.r = r;
o->cur.outline.g = g;
o->cur.outline.b = b;
o->cur.outline.a = a;
o->changed = 1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -2357,13 +2370,15 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
EOLIAN static void
_evas_text_filter_program_set(Eo *eo_obj, Evas_Text_Data *o, const char *arg)
{
Evas_Object_Protected_Data *obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Evas_Filter_Program *pgm = NULL;
if (!o) return;
if (o->cur.filter->code == arg) return;
if (o->cur.filter->code && arg && !strcmp(arg, o->cur.filter->code)) return;
evas_object_async_block(obj);
EINA_COW_WRITE_BEGIN(evas_object_filter_cow, o->cur.filter, Evas_Object_Filter_Data, fcow)
{
// Parse filter program
@ -2387,7 +2402,6 @@ _evas_text_filter_program_set(Eo *eo_obj, Evas_Text_Data *o, const char *arg)
EINA_COW_WRITE_END(evas_object_filter_cow, o->cur.filter, fcow);
// Update object
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
_evas_object_text_items_clear(o);
o->changed = 1;
_evas_object_text_recalc(eo_obj, o->cur.text);
@ -2435,14 +2449,14 @@ _filter_source_hash_free_cb(void *data)
EOLIAN static void
_evas_text_filter_source_set(Eo *eo_obj, Evas_Text_Data *o, const char *name, Evas_Object *eo_source)
{
Evas_Object_Protected_Data *obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Evas_Filter_Proxy_Binding *pb, *pb_old = NULL;
Evas_Object_Protected_Data *source = NULL;
Evas_Object_Filter_Data *fcow = NULL;
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (eo_source) source = eo_data_scope_get(eo_source, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (!name)
{
if (!eo_source || !o->cur.filter->sources) return;

View File

@ -5842,6 +5842,8 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
EINA_LIST_FOREACH(ts->objects, l, eo_obj)
{
Evas_Textblock_Data *o = eo_data_scope_get(eo_obj, MY_CLASS);
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_evas_textblock_invalidate_all(o);
_evas_textblock_changed(o, eo_obj);
}
@ -6060,6 +6062,8 @@ _textblock_style_generic_set(Evas_Object *eo_obj, Evas_Textblock_Style *ts,
EOLIAN static void
_evas_textblock_style_set(Eo *eo_obj, Evas_Textblock_Data *o, const Evas_Textblock_Style *ts)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_textblock_style_generic_set(eo_obj, (Evas_Textblock_Style *) ts, &(o->style));
}
@ -6072,6 +6076,8 @@ _evas_textblock_style_get(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o)
EOLIAN static void
_evas_textblock_style_user_push(Eo *eo_obj, Evas_Textblock_Data *o, Evas_Textblock_Style *ts)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_textblock_style_generic_set(eo_obj, ts, &(o->style_user));
}
@ -6084,12 +6090,16 @@ _evas_textblock_style_user_peek(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o)
EOLIAN static void
_evas_textblock_style_user_pop(Eo *eo_obj, Evas_Textblock_Data *o)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_textblock_style_generic_set(eo_obj, NULL, &(o->style_user));
}
EOLIAN static void
_evas_textblock_replace_char_set(Eo *eo_obj, Evas_Textblock_Data *o, const char *ch)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (o->repch) eina_stringshare_del(o->repch);
if (ch) o->repch = eina_stringshare_add(ch);
else o->repch = NULL;
@ -6100,6 +6110,8 @@ _evas_textblock_replace_char_set(Eo *eo_obj, Evas_Textblock_Data *o, const char
EOLIAN static void
_evas_textblock_legacy_newline_set(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o, Eina_Bool mode)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (o->legacy_newline == mode)
return;
@ -6117,6 +6129,8 @@ _evas_textblock_legacy_newline_get(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *
EOLIAN static void
_evas_textblock_valign_set(Eo *eo_obj, Evas_Textblock_Data *o, double align)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (align < 0.0) align = 0.0;
else if (align > 1.0) align = 1.0;
if (o->valign == align) return;
@ -6133,6 +6147,8 @@ _evas_textblock_valign_get(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o)
EOLIAN static void
_evas_textblock_bidi_delimiters_set(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o, const char *delim)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
eina_stringshare_replace(&o->bidi_delimiters, delim);
}
@ -6350,6 +6366,8 @@ _prepend_escaped_char(Evas_Textblock_Cursor *cur, const char *s,
EOLIAN static void
_evas_textblock_text_markup_set(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o, const char *text)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if ((text != o->markup_text) && (o->markup_text))
{
free(o->markup_text);
@ -6391,6 +6409,8 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char
{
if (!cur) return;
Evas_Object *eo_obj = cur->obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_HEAD();
if (text)
{
@ -6595,6 +6615,8 @@ _evas_textblock_text_markup_get(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o)
Evas_Object_Textblock_Node_Text *n;
Eina_Strbuf *txt = NULL;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
const char *markup;
if (o->markup_text)
{
@ -7112,14 +7134,15 @@ EOLIAN static Evas_Textblock_Cursor*
_evas_textblock_cursor_new(Eo *eo_obj, Evas_Textblock_Data *o)
{
Evas_Textblock_Cursor *cur;
{
cur = calloc(1, sizeof(Evas_Textblock_Cursor));
(cur)->obj = (Evas_Object *) eo_obj;
(cur)->node = o->text_nodes;
(cur)->pos = 0;
o->cursors = eina_list_append(o->cursors, cur);
}
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
cur = calloc(1, sizeof(Evas_Textblock_Cursor));
if (!cur) return NULL;
cur->obj = (Evas_Object *) eo_obj;
cur->node = o->text_nodes;
cur->pos = 0;
o->cursors = eina_list_append(o->cursors, cur);
return cur;
}
@ -7127,6 +7150,8 @@ EAPI void
evas_textblock_cursor_free(Evas_Textblock_Cursor *cur)
{
if (!cur) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
if (cur == o->cursor) return;
o->cursors = eina_list_remove(o->cursors, cur);
@ -7136,14 +7161,18 @@ evas_textblock_cursor_free(Evas_Textblock_Cursor *cur)
EAPI Eina_Bool
evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (!cur || !cur->node) return EINA_FALSE;
return (_evas_textblock_cursor_node_format_at_pos_get(cur)) ?
EINA_TRUE : EINA_FALSE;
}
EOLIAN static const Eina_List *
_evas_textblock_node_format_list_get(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o, const char *anchor)
_evas_textblock_node_format_list_get(Eo *eo_obj, Evas_Textblock_Data *o, const char *anchor)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (!strcmp(anchor, "a"))
return o->anchors_a;
else if (!strcmp(anchor, "item"))
@ -7152,14 +7181,18 @@ _evas_textblock_node_format_list_get(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data
}
EOLIAN static const Evas_Object_Textblock_Node_Format*
_evas_textblock_node_format_first_get(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o)
_evas_textblock_node_format_first_get(Eo *eo_obj, Evas_Textblock_Data *o)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
return o->format_nodes;
}
EOLIAN static const Evas_Object_Textblock_Node_Format*
_evas_textblock_node_format_last_get(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o)
_evas_textblock_node_format_last_get(Eo *eo_obj, Evas_Textblock_Data *o)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
return o->format_nodes ? _NODE_FORMAT(EINA_INLIST_GET(o->format_nodes)->last) : NULL;
}
@ -7188,6 +7221,8 @@ _evas_textblock_node_format_remove_pair(Eo *eo_obj, Evas_Textblock_Data *o, Evas
fmt = n;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
do
{
const char *fstr = fmt->orig_format;
@ -7287,6 +7322,8 @@ EAPI void
evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur)
{
if (!cur) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
cur->node = o->text_nodes;
cur->pos = 0;
@ -7299,6 +7336,8 @@ evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur)
Evas_Object_Textblock_Node_Text *node;
if (!cur) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
node = o->text_nodes;
if (node)
@ -7321,6 +7360,8 @@ EAPI Eina_Bool
evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur)
{
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
/* If there is a current text node, return the next text node (if exists)
* otherwise, just return False. */
@ -7344,6 +7385,8 @@ evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur)
{
Evas_Object_Textblock_Node_Text *node;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
/* If the current node is a text node, just get the prev if any,
* if it's a format, get the current text node out of the format and return
@ -7377,6 +7420,8 @@ evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur)
Evas_Object_Textblock_Node_Format *node;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
/* If the current node is a format node, just get the next if any,
* if it's a text, get the current format node out of the text and return
@ -7413,6 +7458,8 @@ evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur)
{
const Evas_Object_Textblock_Node_Format *node;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
node = evas_textblock_cursor_format_get(cur);
if (!node)
@ -7456,6 +7503,8 @@ evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur)
char *breaks;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
size_t len = eina_ustrbuf_length_get(cur->node->unicode);
@ -7514,6 +7563,8 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
char *breaks;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
size_t len = eina_ustrbuf_length_get(cur->node->unicode);
@ -7565,6 +7616,8 @@ evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur)
const Eina_Unicode *text;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
ind = cur->pos;
@ -7600,6 +7653,8 @@ EAPI Eina_Bool
evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur)
{
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
if (cur->pos != 0)
@ -7614,6 +7669,8 @@ EAPI void
evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur)
{
if (!cur) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
cur->pos = 0;
}
@ -7624,6 +7681,8 @@ evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur)
int ind;
if (!cur) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node);
ind = eina_ustrbuf_length_get(cur->node->unicode);
/* If it's not the last paragraph, go back one, because we want to point
@ -7645,6 +7704,8 @@ evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur)
Evas_Object_Textblock_Item *it = NULL;
if (!cur) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
@ -7679,6 +7740,8 @@ evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur)
Evas_Object_Textblock_Item *it = NULL;
if (!cur) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
@ -8150,6 +8213,8 @@ evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur)
size_t npos = 0;
if (!cur) return -1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, 0);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
n = o->text_nodes;
@ -8168,6 +8233,8 @@ evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int _pos)
size_t pos;
if (!cur) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
if (_pos < 0)
@ -8213,6 +8280,8 @@ evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line)
Evas_Object_Textblock_Item *it;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
@ -8242,6 +8311,8 @@ evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Text
if (!cur1) return 0;
if (!cur2) return 0;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (cur1->obj != cur2->obj) return 0;
if ((!cur1->node) || (!cur2->node)) return 0;
if (cur1->node == cur2->node)
@ -8269,6 +8340,8 @@ evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Curs
if (!cur) return;
if (!cur_dest) return;
if (cur->obj != cur_dest->obj) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
cur_dest->pos = cur->pos;
cur_dest->node = cur->node;
@ -8521,6 +8594,8 @@ evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *_text)
int len = 0;
if (!cur) return 0;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
text = eina_unicode_utf8_to_unicode(_text, &len);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
@ -8589,6 +8664,9 @@ evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *_text
{
int len;
/*append is essentially prepend without advancing */
if (!cur) return 0;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
len = evas_textblock_cursor_text_append(cur, _text);
if (len == 0) return 0;
cur->pos += len; /*Advance */
@ -8768,6 +8846,8 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
Eina_Bool is_visible;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if ((!format) || (format[0] == 0)) return EINA_FALSE;
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
/* We should always have at least one text node */
@ -8898,6 +8978,10 @@ EAPI Eina_Bool
evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format)
{
Eina_Bool is_visible;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
/* append is essentially prepend without advancing */
is_visible = evas_textblock_cursor_format_append(cur, format);
if (is_visible)
@ -8917,6 +9001,8 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
int chr, ind, ppos;
if (!cur || !cur->node) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
n = cur->node;
@ -8994,6 +9080,8 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
if (!cur1 || !cur1->node) return;
if (!cur2 || !cur2->node) return;
if (cur1->obj != cur2->obj) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur1->obj, MY_CLASS);
if (evas_textblock_cursor_compare(cur1, cur2) > 0)
{
@ -9092,6 +9180,8 @@ EAPI char *
evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur)
{
if (!cur || !cur->node) return NULL;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (evas_textblock_cursor_format_is_visible_get(cur))
{
Eina_Strbuf *buf;
@ -9304,6 +9394,8 @@ evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const
if (!cur2 || !cur2->node) return NULL;
if (cur1->obj != cur2->obj) return NULL;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
eo_obj = cur1->obj;
TB_HEAD_RETURN(NULL);
@ -9365,6 +9457,8 @@ evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const
EAPI char *
evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (format == EVAS_TEXTBLOCK_TEXT_MARKUP)
return _evas_textblock_cursor_range_text_markup_get(cur1, cur2);
else if (format == EVAS_TEXTBLOCK_TEXT_PLAIN)
@ -9378,6 +9472,8 @@ evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur)
{
Evas_Textblock_Cursor cur1, cur2;
if (!cur) return NULL;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, NULL);
if (cur->node->utf8)
{
@ -9398,6 +9494,8 @@ evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur
{
int len;
if (!cur) return -1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, -1);
len = eina_ustrbuf_length_get(cur->node->unicode);
@ -9411,6 +9509,8 @@ EAPI const Evas_Object_Textblock_Node_Format *
evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur)
{
if (!cur) return NULL;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, NULL);
return _evas_textblock_cursor_node_format_at_pos_get(cur);
}
@ -9459,6 +9559,8 @@ EAPI void
evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt)
{
if (!fmt || !cur) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
cur->node = fmt->text_node;
cur->pos = _evas_textblock_node_format_pos_get(fmt);
}
@ -9469,6 +9571,8 @@ evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur)
const Eina_Unicode *text;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
if (!evas_textblock_cursor_is_format(cur)) return EINA_FALSE;
text = eina_ustrbuf_string_get(cur->node->unicode);
@ -9499,6 +9603,8 @@ EAPI Eina_Bool
evas_textblock_cursor_geometry_bidi_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_Coord *cx2, Evas_Coord *cy2, Evas_Coord *cw2, Evas_Coord *ch2, Evas_Textblock_Cursor_Type ctype)
{
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
@ -9681,6 +9787,8 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord
{
int ret = -1;
if (!cur) return -1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
@ -9869,6 +9977,7 @@ evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
{
if (!cur) return -1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
return _evas_textblock_cursor_char_pen_geometry_common_get(
ENFN->font_char_coords_get, cur, cx, cy, cw, ch);
}
@ -9878,6 +9987,7 @@ evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Co
{
if (!cur) return -1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
return _evas_textblock_cursor_char_pen_geometry_common_get(
ENFN->font_pen_coords_get, cur, cx, cy, cw, ch);
}
@ -9890,6 +10000,8 @@ evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
int x, y, w, h;
if (!cur) return -1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
@ -9921,6 +10033,7 @@ evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textb
Evas_Coord cy, ch;
Evas_Object *eo_obj = start->obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_HEAD_RETURN(EINA_FALSE);
eo_e = evas_object_evas_get(eo_obj);
Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
@ -9941,6 +10054,8 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
Evas_Object_Textblock_Item *it = NULL;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
@ -10055,6 +10170,8 @@ evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
Evas_Object_Textblock_Line *ln;
if (!cur) return -1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
@ -10446,6 +10563,8 @@ evas_textblock_cursor_range_simple_geometry_get(const Evas_Textblock_Cursor *cur
if (!cur1 || !cur1->node) return NULL;
if (!cur2 || !cur2->node) return NULL;
if (cur1->obj != cur2->obj) return NULL;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur1->obj, MY_CLASS);
_relayout_if_needed(cur1->obj, o);
@ -10539,6 +10658,8 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
if (!cur1 || !cur1->node) return NULL;
if (!cur2 || !cur2->node) return NULL;
if (cur1->obj != cur2->obj) return NULL;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur1->obj, MY_CLASS);
_relayout_if_needed(cur1->obj, o);
@ -10611,6 +10732,8 @@ evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur,
Evas_Coord x, y, w, h;
if (!cur || !evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
@ -10637,6 +10760,8 @@ evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur)
Eina_Bool ret = EINA_FALSE;
Evas_Textblock_Cursor cur2;
if (!cur) return EINA_FALSE;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
cur2.obj = cur->obj;
evas_textblock_cursor_copy(cur, &cur2);
@ -10655,6 +10780,8 @@ _evas_textblock_line_number_geometry_get(Eo *eo_obj, Evas_Textblock_Data *o, int
Evas_Object_Textblock_Line *ln;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_relayout_if_needed(eo_obj, o);
ln = _find_layout_line_num(eo_obj, line);
@ -10678,6 +10805,8 @@ _evas_textblock_clear(Eo *eo_obj, Evas_Textblock_Data *o)
Eina_List *l;
Evas_Textblock_Cursor *cur;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (o->paragraphs)
{
_paragraphs_free(eo_obj, o->paragraphs);
@ -10712,6 +10841,8 @@ evas_object_textblock_clear(Evas_Object *eo_obj)
EOLIAN static void
_evas_textblock_size_formatted_get(Eo *eo_obj, Evas_Textblock_Data *o, Evas_Coord *w, Evas_Coord *h)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_relayout_if_needed(eo_obj, o);
if (w) *w = o->formatted.w;
@ -10949,6 +11080,8 @@ _size_native_calc_paragraph_size(const Evas_Object *eo_obj,
EOLIAN static void
_evas_textblock_size_native_get(Eo *eo_obj, Evas_Textblock_Data *o, Evas_Coord *w, Evas_Coord *h)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (!o->native.valid)
{
Evas_Coord wmax = 0, hmax = 0;
@ -10981,6 +11114,8 @@ _evas_textblock_size_native_get(Eo *eo_obj, Evas_Textblock_Data *o, Evas_Coord *
EOLIAN static void
_evas_textblock_style_insets_get(Eo *eo_obj, Evas_Textblock_Data *o, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_relayout_if_needed(eo_obj, o);
if (l) *l = o->style_pad.l;

View File

@ -1079,11 +1079,13 @@ EOLIAN static void
_evas_textgrid_size_set(Eo *eo_obj, Evas_Textgrid_Data *o, int w, int h)
{
int i;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((h <= 0) || (w <= 0)) return;
if ((o->cur.w == w) && (o->cur.h == h)) return;
evas_object_async_block(obj);
evas_object_textgrid_rows_clear(eo_obj);
if (o->cur.rows)
{
@ -1113,7 +1115,6 @@ _evas_textgrid_size_set(Eo *eo_obj, Evas_Textgrid_Data *o, int w, int h)
o->cur.h = h;
o->changed = 1;
o->core_change = 1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -1127,6 +1128,7 @@ _evas_textgrid_size_get(Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o, int *w, i
EOLIAN static void
_evas_textgrid_efl_text_properties_font_source_set(Eo *eo_obj, Evas_Textgrid_Data *o, const char *font_source)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((!font_source) || (!*font_source))
return;
@ -1134,10 +1136,10 @@ _evas_textgrid_efl_text_properties_font_source_set(Eo *eo_obj, Evas_Textgrid_Dat
if ((o->cur.font_source) && (font_source) &&
(!strcmp(o->cur.font_source, font_source))) return;
evas_object_async_block(obj);
eina_stringshare_replace(&o->cur.font_source, font_source);
o->changed = 1;
o->core_change = 1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -1159,6 +1161,7 @@ _evas_textgrid_efl_text_properties_font_set(Eo *eo_obj, Evas_Textgrid_Data *o, c
if ((!font_name) || (!*font_name) || (font_size <= 0))
return;
evas_object_async_block(obj);
font_description = evas_font_desc_new();
evas_font_name_parse(font_description, font_name);
if (o->cur.font_description &&
@ -1303,6 +1306,7 @@ _evas_textgrid_palette_set(Eo *eo_obj, Evas_Textgrid_Data *o, Evas_Textgrid_Pale
Eina_Array *palette;
Evas_Object_Textgrid_Color *color, *c;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
int count, i;
if ((idx < 0) || (idx > 255)) return;
@ -1327,6 +1331,7 @@ _evas_textgrid_palette_set(Eo *eo_obj, Evas_Textgrid_Data *o, Evas_Textgrid_Pale
ERR("Evas only handles pre multiplied colors!");
}
evas_object_async_block(obj);
switch (pal)
{
case EVAS_TEXTGRID_PALETTE_STANDARD:
@ -1380,7 +1385,6 @@ _evas_textgrid_palette_set(Eo *eo_obj, Evas_Textgrid_Data *o, Evas_Textgrid_Pale
o->changed = 1;
o->pal_change = 1;
evas_object_textgrid_rows_clear(eo_obj);
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
@ -1445,6 +1449,8 @@ EOLIAN static Evas_Textgrid_Cell*
_evas_textgrid_cellrow_get(Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o, int y)
{
Evas_Textgrid_Cell *ret;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if ((y < 0) || (y >= o->cur.h)) ret = NULL;
ret = o->cur.cells + (y * o->cur.w);
@ -1455,11 +1461,13 @@ _evas_textgrid_cellrow_get(Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o, int y)
EOLIAN static void
_evas_textgrid_update_add(Eo *eo_obj, Evas_Textgrid_Data *o, int x, int y, int w, int h)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
int i, x2;
RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, o->cur.w, o->cur.h);
if ((w <= 0) || (h <= 0)) return;
evas_object_async_block(obj);
x2 = x + w - 1;
for (i = 0; i < h; i++)
{
@ -1479,7 +1487,6 @@ _evas_textgrid_update_add(Eo *eo_obj, Evas_Textgrid_Data *o, int x, int y, int w
}
o->row_change = 1;
o->changed = 1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}

View File

@ -31,6 +31,7 @@ _evas_out_eo_base_constructor(Eo *eo_obj, Evas_Out_Data *eo_dat)
eo_do(eo_obj, eo_parent = eo_parent_get());
e = eo_data_scope_get(eo_parent, EVAS_CANVAS_CLASS);
evas_canvas_async_block(e);
eo_do_super(eo_obj, MY_CLASS, eo_constructor());
@ -56,7 +57,8 @@ _evas_out_eo_base_destructor(Eo *eo_obj, Evas_Out_Data *eo_dat)
eo_do(eo_obj, eo_parent = eo_parent_get());
e = eo_data_scope_get(eo_parent, EVAS_CANVAS_CLASS);
if (!e) return ;
evas_canvas_async_block(e);
if (!e) return;
// XXX: need to free output and context one they get allocated one day
// e->engine.func->context_free(eo_dat->output, eo_dat->context);
// e->engine.func->output_free(eo_dat->output);
@ -66,8 +68,13 @@ _evas_out_eo_base_destructor(Eo *eo_obj, Evas_Out_Data *eo_dat)
}
EOLIAN static void
_evas_out_view_set(Eo *eo_e EINA_UNUSED, Evas_Out_Data *eo_dat, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
_evas_out_view_set(Eo *eo_e, Evas_Out_Data *eo_dat, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
Eo *eo_parent = NULL;
Evas_Public_Data *e;
eo_do(eo_e, eo_parent = eo_parent_get());
e = eo_data_scope_get(eo_parent, EVAS_CANVAS_CLASS);
evas_canvas_async_block(e);
eo_dat->x = x;
eo_dat->y = y;
eo_dat->w = w;
@ -86,8 +93,13 @@ _evas_out_view_get(Eo *eo_e EINA_UNUSED, Evas_Out_Data *eo_dat, Evas_Coord *x, E
}
EOLIAN static Eina_Bool
_evas_out_engine_info_set(Eo *eo_e EINA_UNUSED, Evas_Out_Data *eo_dat, Evas_Engine_Info *info)
_evas_out_engine_info_set(Eo *eo_e, Evas_Out_Data *eo_dat, Evas_Engine_Info *info)
{
Eo *eo_parent = NULL;
Evas_Public_Data *e;
eo_do(eo_e, eo_parent = eo_parent_get());
e = eo_data_scope_get(eo_parent, EVAS_CANVAS_CLASS);
evas_canvas_async_block(e);
if (eo_dat->info != info) return EINA_FALSE;
// XXX: handle setting of engine info here

View File

@ -159,6 +159,7 @@ _evas_canvas_damage_rectangle_add(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int
{
Eina_Rectangle *r;
evas_canvas_async_block(e);
NEW_RECT(r, x, y, w, h);
if (!r) return;
e->damages = eina_list_append(e->damages, r);
@ -170,6 +171,7 @@ _evas_canvas_obscured_rectangle_add(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, i
{
Eina_Rectangle *r;
evas_canvas_async_block(e);
NEW_RECT(r, x, y, w, h);
if (!r) return;
e->obscures = eina_list_append(e->obscures, r);
@ -180,6 +182,7 @@ _evas_canvas_obscured_clear(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
{
Eina_Rectangle *r;
evas_canvas_async_block(e);
EINA_LIST_FREE(e->obscures, r)
{
eina_rectangle_free(r);
@ -2716,6 +2719,7 @@ _evas_canvas_render_async(Eo *eo_e, Evas_Public_Data *e)
{
static int render_2 = -1;
evas_canvas_async_block(e);
if (render_2 == -1)
{
if (getenv("EVAS_RENDER2")) render_2 = 1;
@ -2759,10 +2763,12 @@ evas_render_updates_internal_wait(Evas *eo_e,
return ret;
}
EOLIAN Eina_List*
_evas_canvas_render_updates(Eo *eo_e, Evas_Public_Data *e)
{
if (!e->changed) return NULL;
evas_canvas_async_block(e);
return evas_render_updates_internal_wait(eo_e, 1, 1);
}
@ -2770,12 +2776,14 @@ EOLIAN void
_evas_canvas_render(Eo *eo_e, Evas_Public_Data *e)
{
if (!e->changed) return;
evas_canvas_async_block(e);
evas_render_updates_internal_wait(eo_e, 0, 1);
}
EOLIAN void
_evas_canvas_norender(Eo *eo_e, Evas_Public_Data *_pd EINA_UNUSED)
_evas_canvas_norender(Eo *eo_e, Evas_Public_Data *e)
{
evas_canvas_async_block(e);
// if (!e->changed) return;
evas_render_updates_internal_wait(eo_e, 0, 0);
}
@ -2785,6 +2793,7 @@ _evas_canvas_render_idle_flush(Eo *eo_e, Evas_Public_Data *e)
{
static int render_2 = -1;
evas_canvas_async_block(e);
if (render_2 == -1)
{
if (getenv("EVAS_RENDER2")) render_2 = 1;
@ -2823,6 +2832,7 @@ _evas_canvas_sync(Eo *eo_e, Evas_Public_Data *e)
{
static int render_2 = -1;
evas_canvas_async_block(e);
if (render_2 == -1)
{
if (getenv("EVAS_RENDER2")) render_2 = 1;
@ -2861,6 +2871,7 @@ _evas_canvas_render_dump(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
{
static int render_2 = -1;
evas_canvas_async_block(e);
if (render_2 == -1)
{
if (getenv("EVAS_RENDER2")) render_2 = 1;

View File

@ -40,6 +40,7 @@ evas_object_below_get_internal(const Evas_Object_Protected_Data *obj)
EOLIAN void
_evas_object_raise(Eo *eo_obj, Evas_Object_Protected_Data *obj)
{
evas_object_async_block(obj);
if (evas_object_intercept_call_raise(eo_obj, obj)) return;
if (!((EINA_INLIST_GET(obj))->next))
@ -86,6 +87,7 @@ _evas_object_raise(Eo *eo_obj, Evas_Object_Protected_Data *obj)
EOLIAN void
_evas_object_lower(Eo *eo_obj, Evas_Object_Protected_Data *obj)
{
evas_object_async_block(obj);
if (evas_object_intercept_call_lower(eo_obj, obj)) return;
if (!((EINA_INLIST_GET(obj))->prev))
@ -133,6 +135,7 @@ _evas_object_lower(Eo *eo_obj, Evas_Object_Protected_Data *obj)
EOLIAN void
_evas_object_stack_above(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *eo_above)
{
evas_object_async_block(obj);
if (!eo_above)
{
evas_object_raise(eo_obj);
@ -208,6 +211,7 @@ _evas_object_stack_above(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Objec
EOLIAN void
_evas_object_stack_below(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *eo_below)
{
evas_object_async_block(obj);
if (!eo_below)
{
evas_object_lower(eo_obj);

View File

@ -367,4 +367,24 @@ evas_object_clip_recalc(Evas_Object_Protected_Data *obj)
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
}
static inline void
evas_object_async_block(Evas_Object_Protected_Data *obj)
{
if ((obj) && (obj->layer))
{
eina_lock_take(&(obj->layer->evas->lock_objects));
eina_lock_release(&(obj->layer->evas->lock_objects));
}
}
static inline void
evas_canvas_async_block(Evas_Public_Data *e)
{
if (e)
{
eina_lock_take(&(e->lock_objects));
eina_lock_release(&(e->lock_objects));
}
}
#endif

View File

@ -719,6 +719,9 @@ struct _Evas_Public_Data
Eina_Hash *name_hash;
// locking so we can implement async rendering threads
Eina_Lock lock_objects;
int output_validity;
int walking_list;