summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2021-03-22 10:42:35 +0900
committerHermet Park <chuneon.park@samsung.com>2021-03-22 10:42:35 +0900
commite6019ce6d9ff637add3c8cde2f70e859920bb417 (patch)
tree9895a311978d53b6ad8ea3feefadb30a0c1df4cd /src
parentb4460591b4295cbe629ee545b29336c81b03df3b (diff)
parent5f4524295a623117c58955c839c34462197b1197 (diff)
Merge branch 'master' into devs/hermet/lottie
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_con/efl_net_dialer_unix.c1
-rw-r--r--src/lib/ector/software/ector_renderer_software_image.c8
-rw-r--r--src/lib/eeze/eeze_udev_walk.c18
-rw-r--r--src/lib/elementary/efl_ui_scroll_util.c67
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_image.c15
5 files changed, 91 insertions, 18 deletions
diff --git a/src/lib/ecore_con/efl_net_dialer_unix.c b/src/lib/ecore_con/efl_net_dialer_unix.c
index b2d3dfce39..000ba66013 100644
--- a/src/lib/ecore_con/efl_net_dialer_unix.c
+++ b/src/lib/ecore_con/efl_net_dialer_unix.c
@@ -94,6 +94,7 @@ _efl_net_dialer_unix_connected(void *data, const struct sockaddr *addr, socklen_
94{ 94{
95 Eo *o = data; 95 Eo *o = data;
96 Efl_Net_Dialer_Unix_Data *pd = efl_data_scope_get(o, MY_CLASS); 96 Efl_Net_Dialer_Unix_Data *pd = efl_data_scope_get(o, MY_CLASS);
97 if (!pd) return;
97 98
98 pd->connect.thread = NULL; 99 pd->connect.thread = NULL;
99 100
diff --git a/src/lib/ector/software/ector_renderer_software_image.c b/src/lib/ector/software/ector_renderer_software_image.c
index f933bd6a00..d7807ed518 100644
--- a/src/lib/ector/software/ector_renderer_software_image.c
+++ b/src/lib/ector/software/ector_renderer_software_image.c
@@ -106,6 +106,10 @@ _ector_renderer_software_image_ector_renderer_draw(Eo *obj EINA_UNUSED,
106 double im11, im12, im21, im22, im31, im32; 106 double im11, im12, im21, im22, im31, im32;
107 uint32_t *dst_buf, *src_buf; 107 uint32_t *dst_buf, *src_buf;
108 int image_w, image_h; 108 int image_w, image_h;
109
110 int dst_buf_width = MIN(pd->boundary.x2, (int)pd->surface->rasterizer->fill_data.raster_buffer->generic->w);
111 int dst_buf_height = MIN(pd->boundary.y2, (int)pd->surface->rasterizer->fill_data.raster_buffer->generic->h);
112
109 ector_buffer_size_get(pd->image->buffer, &image_w, &image_h); 113 ector_buffer_size_get(pd->image->buffer, &image_w, &image_h);
110 114
111 dst_buf = pd->surface->rasterizer->fill_data.raster_buffer->pixels.u32; 115 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,
116 &im31, &im32, NULL); 120 &im31, &im32, NULL);
117 121
118 //Draw 122 //Draw
119 for (int local_y = pd->boundary.y1; local_y < pd->boundary.y2; local_y++) 123 for (int local_y = pd->boundary.y1; local_y < dst_buf_height; local_y++)
120 { 124 {
121 for (int local_x = pd->boundary.x1; local_x < pd->boundary.x2; local_x++) 125 for (int local_x = pd->boundary.x1; local_x < dst_buf_width; local_x++)
122 { 126 {
123 uint32_t *dst = dst_buf + ((int)local_x + ((int)local_y * pix_stride)); 127 uint32_t *dst = dst_buf + ((int)local_x + ((int)local_y * pix_stride));
124 int rx, ry; 128 int rx, ry;
diff --git a/src/lib/eeze/eeze_udev_walk.c b/src/lib/eeze/eeze_udev_walk.c
index 4cd661b184..5df34178a8 100644
--- a/src/lib/eeze/eeze_udev_walk.c
+++ b/src/lib/eeze/eeze_udev_walk.c
@@ -40,7 +40,7 @@ EAPI const char *
40eeze_udev_walk_get_sysattr(const char *syspath, 40eeze_udev_walk_get_sysattr(const char *syspath,
41 const char *sysattr) 41 const char *sysattr)
42{ 42{
43 _udev_device *device, *child, *parent; 43 _udev_device *device, *parent;
44 const char *test = NULL; 44 const char *test = NULL;
45 45
46 if (!syspath) 46 if (!syspath)
@@ -49,18 +49,12 @@ eeze_udev_walk_get_sysattr(const char *syspath,
49 if (!(device = _new_device(syspath))) 49 if (!(device = _new_device(syspath)))
50 return NULL; 50 return NULL;
51 51
52 for (parent = device; parent;) 52 for (parent = device; parent && !test;)
53 { 53 {
54 if ((test = udev_device_get_sysattr_value(parent, sysattr))) 54 test = udev_device_get_sysattr_value(parent, sysattr);
55 { 55 parent = udev_device_get_parent(parent);
56 test = eina_stringshare_add(test);
57 udev_device_unref(parent);
58 return test;
59 }
60 child = parent;
61 parent = udev_device_get_parent(child);
62 udev_device_unref(child);
63 } 56 }
64 57
65 return NULL; 58 udev_device_unref(device);
59 return eina_stringshare_add(test);
66} 60}
diff --git a/src/lib/elementary/efl_ui_scroll_util.c b/src/lib/elementary/efl_ui_scroll_util.c
index 6a7378e3b4..47d50165cd 100644
--- a/src/lib/elementary/efl_ui_scroll_util.c
+++ b/src/lib/elementary/efl_ui_scroll_util.c
@@ -14,9 +14,72 @@ typedef struct {
14 int freeze_want; 14 int freeze_want;
15 Eina_Bool scroll_count : 1; 15 Eina_Bool scroll_count : 1;
16 Eina_Bool need_scroll : 1; 16 Eina_Bool need_scroll : 1;
17 Eina_Bool show_up : 1;
18 Eina_Bool show_down : 1;
19 Eina_Bool show_left: 1;
20 Eina_Bool show_right : 1;
17} Scroll_Connector_Context; 21} Scroll_Connector_Context;
18 22
19static void 23static void
24_scroll_connector_bar_direction_show_update(Scroll_Connector_Context *ctx)
25{
26 ELM_WIDGET_DATA_GET_OR_RETURN(ctx->obj, wd);
27 Eina_Bool hbar_visible = EINA_FALSE, vbar_visible = EINA_FALSE;
28 Eina_Bool show_up = EINA_FALSE, show_down = EINA_FALSE, show_left = EINA_FALSE, show_right = EINA_FALSE;
29 double vx = 0.0, vy = 0.0;
30
31 edje_object_part_drag_value_get
32 (wd->resize_obj, "efl.draggable.vertical_bar", NULL, &vy);
33
34 edje_object_part_drag_value_get
35 (wd->resize_obj, "efl.draggable.horizontal_bar", &vx, NULL);
36
37 efl_ui_scrollbar_bar_visibility_get(ctx->smanager, &hbar_visible, &vbar_visible);
38 if (hbar_visible)
39 {
40 if (vx < 1.0) show_right = EINA_TRUE;
41 if (vx > 0.0) show_left = EINA_TRUE;
42 }
43 if (vbar_visible)
44 {
45 if (vy < 1.0) show_down = EINA_TRUE;
46 if (vy > 0.0) show_up = EINA_TRUE;
47 }
48 if (show_right != ctx->show_right)
49 {
50 if (show_right)
51 efl_layout_signal_emit(wd->resize_obj, "efl,action,show,right", "efl");
52 else
53 efl_layout_signal_emit(wd->resize_obj, "efl,action,hide,right", "efl");
54 ctx->show_right = show_right;
55 }
56 if (show_left != ctx->show_left)
57 {
58 if (show_left)
59 efl_layout_signal_emit(wd->resize_obj, "efl,action,show,left", "efl");
60 else
61 efl_layout_signal_emit(wd->resize_obj, "efl,action,hide,left", "efl");
62 ctx->show_left = show_left;
63 }
64 if (show_up != ctx->show_up)
65 {
66 if (show_up)
67 efl_layout_signal_emit(wd->resize_obj, "efl,action,show,up", "efl");
68 else
69 efl_layout_signal_emit(wd->resize_obj, "efl,action,hide,up", "efl");
70 ctx->show_up = show_up;
71 }
72 if (show_down != ctx->show_down)
73 {
74 if (show_down)
75 efl_layout_signal_emit(wd->resize_obj, "efl,action,show,down", "efl");
76 else
77 efl_layout_signal_emit(wd->resize_obj, "efl,action,hide,down", "efl");
78 ctx->show_down = show_down;
79 }
80}
81
82static void
20_scroll_connector_bar_read_and_update(Scroll_Connector_Context *ctx) 83_scroll_connector_bar_read_and_update(Scroll_Connector_Context *ctx)
21{ 84{
22 ELM_WIDGET_DATA_GET_OR_RETURN(ctx->obj, wd); 85 ELM_WIDGET_DATA_GET_OR_RETURN(ctx->obj, wd);
@@ -29,6 +92,7 @@ _scroll_connector_bar_read_and_update(Scroll_Connector_Context *ctx)
29 (wd->resize_obj, "efl.draggable.horizontal_bar", &vx, NULL); 92 (wd->resize_obj, "efl.draggable.horizontal_bar", &vx, NULL);
30 93
31 efl_ui_scrollbar_bar_position_set(ctx->smanager, vx, vy); 94 efl_ui_scrollbar_bar_position_set(ctx->smanager, vx, vy);
95 _scroll_connector_bar_direction_show_update(ctx);
32} 96}
33 97
34static void 98static void
@@ -54,6 +118,7 @@ _scroll_connector_reload_cb(void *data,
54 efl_layout_signal_emit(wd->resize_obj, "efl,vertical_bar,visible,off", "efl"); 118 efl_layout_signal_emit(wd->resize_obj, "efl,vertical_bar,visible,off", "efl");
55 119
56 efl_ui_scrollbar_bar_visibility_update(ctx->smanager); 120 efl_ui_scrollbar_bar_visibility_update(ctx->smanager);
121 _scroll_connector_bar_direction_show_update(ctx);
57} 122}
58 123
59 124
@@ -244,6 +309,7 @@ _scroll_connector_bar_show_cb(void *data, const Efl_Event *event)
244 efl_layout_signal_emit(wd->resize_obj, "efl,horizontal_bar,visible,on", "efl"); 309 efl_layout_signal_emit(wd->resize_obj, "efl,horizontal_bar,visible,on", "efl");
245 else if (type == EFL_UI_LAYOUT_ORIENTATION_VERTICAL) 310 else if (type == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
246 efl_layout_signal_emit(wd->resize_obj, "efl,vertical_bar,visible,on", "efl"); 311 efl_layout_signal_emit(wd->resize_obj, "efl,vertical_bar,visible,on", "efl");
312 _scroll_connector_bar_direction_show_update(ctx);
247} 313}
248 314
249static void 315static void
@@ -257,6 +323,7 @@ _scroll_connector_bar_hide_cb(void *data, const Efl_Event *event)
257 efl_layout_signal_emit(wd->resize_obj, "efl,horizontal_bar,visible,off", "efl"); 323 efl_layout_signal_emit(wd->resize_obj, "efl,horizontal_bar,visible,off", "efl");
258 else if (type == EFL_UI_LAYOUT_ORIENTATION_VERTICAL) 324 else if (type == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
259 efl_layout_signal_emit(wd->resize_obj, "efl,vertical_bar,visible,off", "efl"); 325 efl_layout_signal_emit(wd->resize_obj, "efl,vertical_bar,visible,off", "efl");
326 _scroll_connector_bar_direction_show_update(ctx);
260} 327}
261 328
262void 329void
diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c
index 7d05cab15d..3a75852ed0 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_image.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_image.c
@@ -69,10 +69,17 @@ _evas_gl_image_cache_add(Evas_GL_Image *im)
69{ 69{
70 if (im->references == 0) 70 if (im->references == 0)
71 { 71 {
72 im->csize = im->w * im->h * 4; 72 if (im->cached)
73 im->gc->shared->images_size += im->csize; 73 {
74 _evas_gl_image_cache_trim(im->gc); 74 im->csize = im->w * im->h * 4;
75 return EINA_TRUE; 75 im->gc->shared->images_size += im->csize;
76 _evas_gl_image_cache_trim(im->gc);
77 if (!eina_list_data_find(im->gc->shared->images, im))
78 { // FIXME for a messed up caching system... this used to be simple
79 im->gc->shared->images = eina_list_prepend(im->gc->shared->images, im);
80 }
81 return EINA_TRUE;
82 }
76 } 83 }
77 else 84 else
78 { 85 {