Eina_Bool enabled;
- char program[256];
-
Eina_List *blur_rectangles;
};
}
static void
+_e_blur_rectangle_filter_set(E_Blur_Rectangle *blur_rectangle)
+{
+ char program[256];
+
+ if ((blur_rectangle->rx != 0) && (blur_rectangle->ry != 0))
+ {
+ snprintf(program, sizeof(program),
+ "a = buffer { 'rgba' } blur { %d, dst = a } rounded_corner { src = a, rx = %d, ry = %d}",
+ blur_rectangle->blur->radius, blur_rectangle->rx, blur_rectangle->ry);
+ }
+ else
+ {
+ snprintf(program, sizeof(program),
+ "blur (%d) padding_set (0)",
+ blur_rectangle->blur->radius);
+ }
+
+ efl_gfx_filter_program_set(blur_rectangle->obj, program, "image_filter");
+}
+
+static void
_e_blur_cb_ds_tizen_blur_commit(struct wl_listener *listener, void *data)
{
E_Blur *blur;
if (blur->radius)
{
- snprintf(blur->program, sizeof(blur->program), "blur (%d) padding_set (0)", blur->radius);
-
EINA_LIST_FOREACH(blur->blur_rectangles, l, blur_rectangle)
{
- efl_gfx_filter_program_set(blur_rectangle->obj, blur->program, "image_filter");
+ _e_blur_rectangle_filter_set(blur_rectangle);
if (!evas_object_visible_get(blur->ec->frame)) continue;
evas_object_show(blur_rectangle->obj);
}
blur_rectangle->blur = blur;
blur->blur_rectangles = eina_list_append(blur->blur_rectangles, blur_rectangle);
- if (*blur->program != 0)
- efl_gfx_filter_program_set(blur_rectangle->obj, blur->program, "image_filter");
-
+ _e_blur_rectangle_filter_set(blur_rectangle);
_e_blur_rectangle_geometry_set(blur_rectangle, blur->ec);
evas_object_layer_set(blur_rectangle->obj, evas_object_layer_get(blur->ec->frame));
evas_object_stack_below(blur_rectangle->obj, blur->ec->frame);
}
EINTERN void
+e_blur_rectangle_corner_radius_get(E_Blur_Rectangle *blur_rectangle, int *rx, int *ry)
+{
+ EINA_SAFETY_ON_NULL_RETURN(blur_rectangle);
+
+ if (rx) *rx = blur_rectangle->rx;
+ if (ry) *ry = blur_rectangle->ry;
+}
+
+EINTERN void
e_blur_trace_debug(Eina_Bool onoff)
{
if (onoff == blur_trace) return;
E_Blur_Video_Capture_Object *object;
int x, y, w, h;
Eina_List *l;
+ unsigned int *pixels;
+ char program[256];
+ int rx = 0, ry = 0;
if (!blur_rectangle) return NULL;
object = E_NEW(E_Blur_Video_Capture_Object, 1);
EINA_SAFETY_ON_NULL_RETURN_VAL(object, NULL);
- object->blur_clip_obj = evas_object_rectangle_add(e_comp->evas);
+ object->blur_clip_obj = evas_object_image_filled_add(e_comp->evas);
EINA_SAFETY_ON_NULL_GOTO(object->blur_clip_obj, fail);
+ evas_object_image_size_set(object->blur_clip_obj, 1, 1);
+ pixels = evas_object_image_data_get(object->blur_clip_obj, EINA_TRUE);
+ EINA_SAFETY_ON_NULL_GOTO(pixels, fail);
+ *pixels = 0xffffffff;
+ evas_object_image_data_set(object->blur_clip_obj, pixels);
+ evas_object_image_data_update_add(object->blur_clip_obj, 0, 0, 1, 1);
+ e_blur_rectangle_corner_radius_get(blur_rectangle, &rx, &ry);
+ if ((rx != 0) && (ry != 0))
+ {
+ snprintf(program, sizeof(program), "rounded_corner { rx = %d, ry = %d}", rx, ry);
+ efl_gfx_filter_program_set(object->blur_clip_obj, program, "rounded_corner");
+ }
evas_object_name_set(object->blur_clip_obj, "blur_video_capture_blur_clip_obj");
evas_object_pass_events_set(object->blur_clip_obj, EINA_TRUE);