Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2021-03-22 10:42:35 +09:00
commit e6019ce6d9
5 changed files with 91 additions and 18 deletions

View File

@ -94,6 +94,7 @@ _efl_net_dialer_unix_connected(void *data, const struct sockaddr *addr, socklen_
{
Eo *o = data;
Efl_Net_Dialer_Unix_Data *pd = efl_data_scope_get(o, MY_CLASS);
if (!pd) return;
pd->connect.thread = NULL;

View File

@ -106,6 +106,10 @@ _ector_renderer_software_image_ector_renderer_draw(Eo *obj EINA_UNUSED,
double im11, im12, im21, im22, im31, im32;
uint32_t *dst_buf, *src_buf;
int image_w, image_h;
int dst_buf_width = MIN(pd->boundary.x2, (int)pd->surface->rasterizer->fill_data.raster_buffer->generic->w);
int dst_buf_height = MIN(pd->boundary.y2, (int)pd->surface->rasterizer->fill_data.raster_buffer->generic->h);
ector_buffer_size_get(pd->image->buffer, &image_w, &image_h);
dst_buf = pd->surface->rasterizer->fill_data.raster_buffer->pixels.u32;
@ -116,9 +120,9 @@ _ector_renderer_software_image_ector_renderer_draw(Eo *obj EINA_UNUSED,
&im31, &im32, NULL);
//Draw
for (int local_y = pd->boundary.y1; local_y < pd->boundary.y2; local_y++)
for (int local_y = pd->boundary.y1; local_y < dst_buf_height; local_y++)
{
for (int local_x = pd->boundary.x1; local_x < pd->boundary.x2; local_x++)
for (int local_x = pd->boundary.x1; local_x < dst_buf_width; local_x++)
{
uint32_t *dst = dst_buf + ((int)local_x + ((int)local_y * pix_stride));
int rx, ry;

View File

@ -40,7 +40,7 @@ EAPI const char *
eeze_udev_walk_get_sysattr(const char *syspath,
const char *sysattr)
{
_udev_device *device, *child, *parent;
_udev_device *device, *parent;
const char *test = NULL;
if (!syspath)
@ -49,18 +49,12 @@ eeze_udev_walk_get_sysattr(const char *syspath,
if (!(device = _new_device(syspath)))
return NULL;
for (parent = device; parent;)
for (parent = device; parent && !test;)
{
if ((test = udev_device_get_sysattr_value(parent, sysattr)))
{
test = eina_stringshare_add(test);
udev_device_unref(parent);
return test;
}
child = parent;
parent = udev_device_get_parent(child);
udev_device_unref(child);
test = udev_device_get_sysattr_value(parent, sysattr);
parent = udev_device_get_parent(parent);
}
return NULL;
udev_device_unref(device);
return eina_stringshare_add(test);
}

View File

@ -14,8 +14,71 @@ typedef struct {
int freeze_want;
Eina_Bool scroll_count : 1;
Eina_Bool need_scroll : 1;
Eina_Bool show_up : 1;
Eina_Bool show_down : 1;
Eina_Bool show_left: 1;
Eina_Bool show_right : 1;
} Scroll_Connector_Context;
static void
_scroll_connector_bar_direction_show_update(Scroll_Connector_Context *ctx)
{
ELM_WIDGET_DATA_GET_OR_RETURN(ctx->obj, wd);
Eina_Bool hbar_visible = EINA_FALSE, vbar_visible = EINA_FALSE;
Eina_Bool show_up = EINA_FALSE, show_down = EINA_FALSE, show_left = EINA_FALSE, show_right = EINA_FALSE;
double vx = 0.0, vy = 0.0;
edje_object_part_drag_value_get
(wd->resize_obj, "efl.draggable.vertical_bar", NULL, &vy);
edje_object_part_drag_value_get
(wd->resize_obj, "efl.draggable.horizontal_bar", &vx, NULL);
efl_ui_scrollbar_bar_visibility_get(ctx->smanager, &hbar_visible, &vbar_visible);
if (hbar_visible)
{
if (vx < 1.0) show_right = EINA_TRUE;
if (vx > 0.0) show_left = EINA_TRUE;
}
if (vbar_visible)
{
if (vy < 1.0) show_down = EINA_TRUE;
if (vy > 0.0) show_up = EINA_TRUE;
}
if (show_right != ctx->show_right)
{
if (show_right)
efl_layout_signal_emit(wd->resize_obj, "efl,action,show,right", "efl");
else
efl_layout_signal_emit(wd->resize_obj, "efl,action,hide,right", "efl");
ctx->show_right = show_right;
}
if (show_left != ctx->show_left)
{
if (show_left)
efl_layout_signal_emit(wd->resize_obj, "efl,action,show,left", "efl");
else
efl_layout_signal_emit(wd->resize_obj, "efl,action,hide,left", "efl");
ctx->show_left = show_left;
}
if (show_up != ctx->show_up)
{
if (show_up)
efl_layout_signal_emit(wd->resize_obj, "efl,action,show,up", "efl");
else
efl_layout_signal_emit(wd->resize_obj, "efl,action,hide,up", "efl");
ctx->show_up = show_up;
}
if (show_down != ctx->show_down)
{
if (show_down)
efl_layout_signal_emit(wd->resize_obj, "efl,action,show,down", "efl");
else
efl_layout_signal_emit(wd->resize_obj, "efl,action,hide,down", "efl");
ctx->show_down = show_down;
}
}
static void
_scroll_connector_bar_read_and_update(Scroll_Connector_Context *ctx)
{
@ -29,6 +92,7 @@ _scroll_connector_bar_read_and_update(Scroll_Connector_Context *ctx)
(wd->resize_obj, "efl.draggable.horizontal_bar", &vx, NULL);
efl_ui_scrollbar_bar_position_set(ctx->smanager, vx, vy);
_scroll_connector_bar_direction_show_update(ctx);
}
static void
@ -54,6 +118,7 @@ _scroll_connector_reload_cb(void *data,
efl_layout_signal_emit(wd->resize_obj, "efl,vertical_bar,visible,off", "efl");
efl_ui_scrollbar_bar_visibility_update(ctx->smanager);
_scroll_connector_bar_direction_show_update(ctx);
}
@ -244,6 +309,7 @@ _scroll_connector_bar_show_cb(void *data, const Efl_Event *event)
efl_layout_signal_emit(wd->resize_obj, "efl,horizontal_bar,visible,on", "efl");
else if (type == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
efl_layout_signal_emit(wd->resize_obj, "efl,vertical_bar,visible,on", "efl");
_scroll_connector_bar_direction_show_update(ctx);
}
static void
@ -257,6 +323,7 @@ _scroll_connector_bar_hide_cb(void *data, const Efl_Event *event)
efl_layout_signal_emit(wd->resize_obj, "efl,horizontal_bar,visible,off", "efl");
else if (type == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
efl_layout_signal_emit(wd->resize_obj, "efl,vertical_bar,visible,off", "efl");
_scroll_connector_bar_direction_show_update(ctx);
}
void

View File

@ -69,10 +69,17 @@ _evas_gl_image_cache_add(Evas_GL_Image *im)
{
if (im->references == 0)
{
im->csize = im->w * im->h * 4;
im->gc->shared->images_size += im->csize;
_evas_gl_image_cache_trim(im->gc);
return EINA_TRUE;
if (im->cached)
{
im->csize = im->w * im->h * 4;
im->gc->shared->images_size += im->csize;
_evas_gl_image_cache_trim(im->gc);
if (!eina_list_data_find(im->gc->shared->images, im))
{ // FIXME for a messed up caching system... this used to be simple
im->gc->shared->images = eina_list_prepend(im->gc->shared->images, im);
}
return EINA_TRUE;
}
}
else
{