1 #include "e_mod_comp_shared_types.h"
2 #include "e_mod_comp.h"
3 #include "e_mod_comp_atoms.h"
4 #include "e_mod_comp_debug.h"
5 #include "e_mod_comp_effect_win_rotation.h"
6 #include <Elementary.h>
9 #include "effect_image_launch.h"
10 #include "effect_win_rotation.h"
12 /* local subsystem functions */
13 static void _on_trans_begin_end(void *data, Elm_Transit *transit __UNUSED__);
14 static void _on_trans_end_end(void *data, Elm_Transit *transit __UNUSED__);
15 static Eina_Bool _angle_get(E_Comp_Win *cw, int *req, int *curr);
16 static Eina_Bool _effect_zone_rot_bd_check(E_Border *bd);
17 static Elm_Transit_Effect *_effect_zone_rot_begin_new(E_Comp_Layer *ly, Eina_Bool xv_use);
18 static Elm_Transit_Effect *_effect_zone_rot_end_new(E_Comp_Layer *ly, E_Zone *zone, Eina_Bool xv_use);
19 static void _effect_zone_rot_begin_free(Elm_Transit_Effect *effect, Elm_Transit *transit);
20 static void _effect_zone_rot_end_free(Elm_Transit_Effect *effect, Elm_Transit *transit);
21 static void _effect_zone_rot_begin_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress);
22 static void _effect_zone_rot_end_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress);
23 static Eina_Bool _effect_zone_rot_clear(E_Comp_Effect_Zone_Rotation *zr);
25 /* externally accessible functions */
27 _effect_mod_win_angle_get(E_Comp_Win *cw)
29 E_Comp_Effect_Style st;
34 E_CHECK_RETURN(cw, 0);
36 win = e_mod_comp_util_client_xid_get(cw);
37 st = _effect_mod_style_get
39 E_COMP_EFFECT_KIND_ROTATION);
41 if (st == E_COMP_EFFECT_STYLE_NONE)
44 res = _angle_get(cw, &req_angle, &cur_angle);
48 cw->angle = cur_angle;
54 E_Comp_Effect_Zone_Rotation *
55 _effect_mod_zone_rotation_new(E_Comp_Canvas *canvas)
57 E_Comp_Effect_Zone_Rotation *zr = NULL;
58 zr = E_NEW(E_Comp_Effect_Zone_Rotation, 1);
59 E_CHECK_RETURN(zr, NULL);
62 memset(canvas->xv_ready, 0, sizeof(canvas->xv_ready));
68 _effect_mod_zone_rotation_free(E_Comp_Effect_Zone_Rotation *zr)
74 _effect_mod_zone_rotation_begin(E_Comp_Effect_Zone_Rotation *zr)
77 E_Comp *c = e_mod_comp_util_get();
79 e_mod_comp_util_rr_prop_set(ATOM_RR_WM_STATE, "wm.zone.rotation.begin");
81 E_CHECK_GOTO(c->animatable, finish);
83 E_Comp_Win *cw = NULL, *nocomp_cw = NULL;
85 E_Comp_Canvas *canvas = NULL;
87 Eina_Bool res = EINA_FALSE;
89 Ecore_X_Window root = c->man->root;
91 unsigned int xv_use = 0;
95 zone = zr->canvas->zone;
96 E_CHECK_GOTO(zone, finish);
98 /* find nocomp window first because nocomp window doesn't have pixmap */
99 nocomp_cw = e_mod_comp_util_win_nocomp_get(c, zone);
101 /* Check whether or not it will do xv rotation effect. */
102 xv_prop_res = ecore_x_window_prop_card32_get(root, ATOM_XV_USE, &xv_use, 1);
103 if ((xv_prop_res == -1 ) || (!xv_use))
105 zr->xv_use = EINA_FALSE;
106 canvas->xv_ready[0] = EINA_FALSE;
110 if (!_comp_mod->conf->xv_rotation_effect)
112 zr->xv_use = EINA_FALSE;
113 canvas->xv_ready[0] = EINA_FALSE;
118 /* if it is first entering to effect begin route and xv is running,
119 * rotation effect is canceled at first and waits until xv pass pixmap0.
121 if ((!zr->xv_use) && (xv_prop_res >= 0) && (xv_use))
123 Ecore_X_Pixmap pix0 = 0, pix1 = 0;
124 zr->xv_use = EINA_TRUE;
125 zr->canvas->xv_ready[0] = EINA_TRUE;
127 pix0 = ecore_x_pixmap_new(root, zone->w, zone->h, 24);
128 ecore_x_window_prop_xid_set(root, ATOM_XV_PIXMAP0, ECORE_X_ATOM_PIXMAP, &pix0, 1);
130 pix1 = ecore_x_pixmap_new(root, zone->w, zone->h, 24);
131 ecore_x_window_prop_xid_set(root, ATOM_XV_PIXMAP1, ECORE_X_ATOM_PIXMAP, &pix1, 1);
133 ecore_x_client_message32_send(root,
134 ATOM_XV_BYPASS_TO_PIXMAP0,
135 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
138 ecore_x_client_message32_send(root,
139 ATOM_XV_BYPASS_TO_PIXMAP1,
140 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
146 if (_effect_mod_image_launch_running_check(c->eff_img))
149 /* look for visible normal window except for given window */
150 EINA_INLIST_REVERSE_FOREACH(c->wins, cw)
152 if ((cw->invalid) || (cw->input_only)) continue;
153 if (!cw->bd) continue;
154 if (!cw->bd->zone) continue;
155 if (cw->bd->zone != zone) continue;
156 if (!E_INTERSECTS(zone->x, zone->y, zone->w, zone->h,
157 cw->x, cw->y, cw->w, cw->h))
160 /* return nocomp window */
161 if ((nocomp_cw) && (nocomp_cw == cw))
163 if (TYPE_LOCKSCREEN_CHECK(cw))
165 ELB(ELBT_COMP, "SKIP LOCKSCREEN", e_mod_comp_util_client_xid_get(cw));
172 res = _effect_zone_rot_bd_check(cw->bd);
173 E_CHECK_GOTO(res, finish);
176 Eina_Bool animatable = EINA_FALSE;
177 animatable = _effect_mod_state_get(cw->eff_type);
178 E_CHECK_GOTO(animatable, finish);
179 break; /* do rotation effect */
183 /* check pixmap and compare size with zone */
184 if (!((cw->pixmap) && (cw->pw > 0) && (cw->ph > 0) &&
185 (cw->dmg_updates >= 1)))
188 if (REGION_EQUAL_TO_ZONE(cw, zone))
192 /* except the lock screen window */
193 if (TYPE_LOCKSCREEN_CHECK(cw))
195 ELB(ELBT_COMP, "SKIP LOCKSCREEN", e_mod_comp_util_client_xid_get(cw));
202 res = _effect_zone_rot_bd_check(cw->bd);
203 E_CHECK_GOTO(res, finish);
213 res = _effect_zone_rot_bd_check(cw->bd);
214 E_CHECK_GOTO(res, finish);
217 Eina_Bool animatable = EINA_FALSE;
218 animatable = _effect_mod_state_get(cw->eff_type);
219 E_CHECK_GOTO(animatable, finish);
220 break; /* do rotation effect */
225 /* block effect of desk layout */
227 (cw->bd->client.e.state.ly.support) &&
228 (cw->bd->client.e.state.ly.curr_ly))
235 ly = e_mod_comp_canvas_layer_get(zr->canvas, "effect");
238 /* TODO: check animation is running */
241 elm_transit_del_cb_set(zr->trans_begin, NULL, NULL);
242 elm_transit_del(zr->trans_begin);
246 elm_transit_del_cb_set(zr->trans_end, NULL, NULL);
247 elm_transit_del(zr->trans_end);
249 zr->trans_begin = NULL;
250 zr->trans_end = NULL;
251 zr->trans_begin = elm_transit_add();
252 elm_transit_del_cb_set(zr->trans_begin, _on_trans_begin_end, zr);
254 zr->effect_begin = _effect_zone_rot_begin_new(ly, zr->xv_use);
255 if (!zr->effect_begin)
259 elm_transit_del_cb_set(zr->trans_begin, NULL, NULL);
260 elm_transit_del(zr->trans_begin);
262 zr->trans_begin = NULL;
263 zr->ready = EINA_FALSE;
264 zr->xv_use = EINA_FALSE;
267 elm_transit_object_add(zr->trans_begin, ly->layout);
268 elm_transit_smooth_set(zr->trans_begin, EINA_FALSE);
269 elm_transit_duration_set(zr->trans_begin, 0.2f);
270 elm_transit_effect_add(zr->trans_begin, _effect_zone_rot_begin_op, zr->effect_begin, _effect_zone_rot_begin_free);
271 elm_transit_tween_mode_set(zr->trans_begin, ELM_TRANSIT_TWEEN_MODE_DECELERATE);
272 elm_transit_objects_final_state_keep_set(zr->trans_begin, EINA_FALSE);
274 e_mod_comp_layer_effect_set(ly, EINA_TRUE);
276 if (_comp_mod->conf->use_hwc)
278 if (canvas->comp->hwcomp_funcs.set_full_composite)
279 canvas->comp->hwcomp_funcs.set_full_composite(canvas->hwcomp);
280 if (canvas->comp->hwcomp_funcs.update_null_set_drawables)
281 canvas->comp->hwcomp_funcs.update_null_set_drawables(canvas->hwcomp);
284 zr->ready = EINA_TRUE;
290 e_mod_comp_util_rr_prop_set(ATOM_RR_WM_STATE, "wm.effect.rotation.cancel");
295 _effect_mod_zone_rotation_end(E_Comp_Effect_Zone_Rotation *zr)
298 E_Comp *c = e_mod_comp_util_get();
299 Eina_Bool xv_use = EINA_FALSE;
301 e_mod_comp_util_rr_prop_set(ATOM_RR_WM_STATE, "wm.zone.rotation.end");
303 E_CHECK_RETURN(c->animatable, EINA_FALSE);
305 if ((!zr->ready) || (!zr->trans_begin))
307 zr->canvas->xv_ready[0] = EINA_FALSE;
311 if ((zr->canvas->xv_ready[0]) && (!((zr->canvas->xv_ready[1]) && (zr->canvas->xv_ready[2]))))
314 zr->ready = EINA_FALSE;
316 zr->xv_use = EINA_FALSE;
317 memset(zr->canvas->xv_ready, 0, sizeof(zr->canvas->xv_ready));
319 ly = e_mod_comp_canvas_layer_get(zr->canvas, "comp");
324 elm_transit_del_cb_set(zr->trans_end, NULL, NULL);
325 elm_transit_del(zr->trans_end);
327 zr->trans_end = NULL;
328 zr->trans_end = elm_transit_add();
329 elm_transit_del_cb_set(zr->trans_end, _on_trans_end_end, zr);
330 zr->effect_end = _effect_zone_rot_end_new(ly, zr->canvas->zone, xv_use);
331 elm_transit_object_add(zr->trans_end, ly->layout);
332 elm_transit_smooth_set(zr->trans_end, EINA_FALSE);
333 elm_transit_duration_set(zr->trans_end, 0.2f);
334 elm_transit_effect_add(zr->trans_end, _effect_zone_rot_end_op, zr->effect_end, _effect_zone_rot_end_free);
335 elm_transit_tween_mode_set(zr->trans_end, ELM_TRANSIT_TWEEN_MODE_DECELERATE);
336 elm_transit_objects_final_state_keep_set(zr->trans_end, EINA_FALSE);
338 e_zone_rotation_block_set(zr->canvas->zone, "comp-tizen", EINA_TRUE);
347 _effect_mod_zone_rotation_cancel(E_Comp_Effect_Zone_Rotation *zr)
349 e_mod_comp_util_rr_prop_set(ATOM_RR_WM_STATE, "wm.zone.rotation.cancel");
350 return _effect_zone_rot_clear(zr);
354 _effect_mod_zone_rotation_do(E_Comp_Effect_Zone_Rotation *zr)
356 E_Comp *c = e_mod_comp_util_get();
357 E_CHECK_RETURN(c->animatable, EINA_FALSE);
359 e_mod_comp_util_rr_prop_set(ATOM_RR_WM_STATE, "wm.effect.rotation.start");
361 elm_transit_go(zr->trans_begin);
362 elm_transit_go(zr->trans_end);
368 _effect_mod_zone_rotation_clear(E_Comp_Effect_Zone_Rotation *zr)
370 e_mod_comp_util_rr_prop_set(ATOM_RR_WM_STATE, "wm.effect.rotation.cancel");
371 return _effect_zone_rot_clear(zr);
375 _effect_zone_rot_clear(E_Comp_Effect_Zone_Rotation *zr)
379 elm_transit_del_cb_set(zr->trans_begin, NULL, NULL);
380 elm_transit_del(zr->trans_begin);
381 zr->trans_begin = NULL;
385 elm_transit_del_cb_set(zr->trans_end, NULL, NULL);
386 elm_transit_del(zr->trans_end);
387 zr->trans_end = NULL;
389 zr->ready = EINA_FALSE;
390 zr->xv_use = EINA_FALSE;
396 _on_trans_begin_end(void *data,
397 Elm_Transit *transit __UNUSED__)
399 E_Comp_Effect_Zone_Rotation *zr = data;
400 zr->trans_begin = NULL;
403 elm_transit_del_cb_set(zr->trans_begin, NULL, NULL);
404 zr->trans_begin = NULL;
409 _on_trans_end_end(void *data,
410 Elm_Transit *transit __UNUSED__)
412 E_Comp_Effect_Zone_Rotation *zr = data;
415 elm_transit_del_cb_set(zr->trans_end, NULL, NULL);
416 zr->trans_end = NULL;
420 /* local subsystem functions */
422 _angle_get(E_Comp_Win *cw,
426 E_CHECK_RETURN(cw->bd, 0);
427 E_CHECK_RETURN(req, 0);
428 E_CHECK_RETURN(curr, 0);
430 *req = e_border_rotation_prev_angle_get(cw->bd);
431 *curr = e_border_rotation_curr_angle_get(cw->bd);
436 /* check before running rotation effect for given normal window.
437 * exceptional windows: lock, setup wizard
438 * otherwise: do rotation effect
441 _effect_zone_rot_bd_check(E_Border *bd)
443 /* except window which does not use the wm rotation */
444 if (!bd->client.e.state.rot.app_set)
446 ELB(ELBT_COMP, "SKIP ROT_EFFECT app_set:0", bd->client.win);
449 /* except window which has the value of preferred rotation */
450 else if (bd->client.e.state.rot.preferred_rot != -1)
452 ELB(ELBT_COMP, "SKIP ROT_EFFECT preferred_rot", bd->client.win);
460 static Elm_Transit_Effect *
461 _effect_zone_rot_begin_new(E_Comp_Layer *ly,
464 E_Comp_Zone_Rotation_Effect_Begin *ctx= E_NEW(E_Comp_Zone_Rotation_Effect_Begin, 1);
465 E_CHECK_RETURN(ctx, NULL);
467 Evas_Native_Surface ns;
469 E_Zone *zone = ly->canvas->zone;
471 /* capture the screen */
472 Ecore_X_Window_Attributes att;
473 Ecore_X_Window root = ecore_x_window_root_first_get();
474 memset((&att), 0, sizeof(Ecore_X_Window_Attributes));
475 if (!ecore_x_window_attributes_get(root, &att))
481 ctx->xim = ecore_x_image_new(zone->w, zone->h, att.visual, att.depth);
488 unsigned int *pix = ecore_x_image_data_get(ctx->xim, NULL, NULL, NULL);;
489 ELBF(ELBT_COMP, 0, 0, "%15.15s|root:0x%08x vis:%p depth:%d xim:%p pix:%p", "ZONE_ROT_B_NEW",
490 root, att.visual, att.depth, ctx->xim, pix);
492 ctx->img = evas_object_image_filled_add(evas_object_evas_get(ly->layout));
493 evas_object_image_colorspace_set(ctx->img, EVAS_COLORSPACE_ARGB8888);
494 evas_object_image_alpha_set(ctx->img, 1);
495 evas_object_render_op_set(ctx->img, EVAS_RENDER_COPY);
496 evas_object_image_size_set(ctx->img, zone->w, zone->h);
497 evas_object_image_smooth_scale_set(ctx->img, EINA_FALSE);
498 evas_object_image_data_set(ctx->img, pix);
499 evas_object_image_data_update_add(ctx->img, 0, 0, zone->w, zone->h);
501 // why do we neeed these 2? this smells wrong
502 if (ecore_x_image_get(ctx->xim, root, 0, 0, 0, 0, zone->w, zone->h))
504 pix = ecore_x_image_data_get(ctx->xim, NULL, NULL, NULL);;
505 evas_object_image_data_set(ctx->img, pix);
506 evas_object_image_data_update_add(ctx->img, 0, 0, zone->w, zone->h);
515 ret = ecore_x_window_prop_xid_get(root, ATOM_XV_PIXMAP0, ECORE_X_ATOM_PIXMAP, &ctx->xv_pix, 1);
518 ctx->xv_pix = ecore_x_pixmap_new(root, zone->w, zone->h, 32);
520 ecore_x_pixmap_geometry_get(ctx->xv_pix, NULL, NULL, &pw, &ph);
522 ns.version = EVAS_NATIVE_SURFACE_VERSION;
523 ns.type = EVAS_NATIVE_SURFACE_X11;
524 ns.data.x11.visual = ecore_x_default_visual_get(ecore_x_display_get(), ecore_x_default_screen_get());
525 ns.data.x11.pixmap = ctx->xv_pix;
527 ctx->xv_img = evas_object_image_filled_add(ly->canvas->evas);
528 evas_object_image_size_set(ctx->xv_img, pw, ph);
529 evas_object_image_smooth_scale_set(ctx->xv_img, EINA_FALSE);
530 evas_object_image_native_surface_set(ctx->xv_img, &ns);
531 evas_object_image_data_update_add(ctx->xv_img, 0, 0, zone->w, zone->h);
533 evas_object_show(ctx->xv_img);
535 e_layout_pack(ly->layout, ctx->xv_img);
536 e_layout_child_move(ctx->xv_img, 0, 0);
537 e_layout_child_resize(ctx->xv_img, zone->w, zone->h);
540 evas_object_show(ctx->img);
542 e_mod_comp_layer_populate(ly, ctx->img);
543 e_layout_child_move(ctx->img, 0, 0);
544 e_layout_child_resize(ctx->img, zone->w, zone->h);
547 ctx->zone = ly->canvas->zone;
550 int diff = zone->rot.prev - zone->rot.curr;
551 if (diff == 270) diff = -90;
552 else if (diff == -270) diff = 90;
555 ELBF(ELBT_COMP, 0, 0, "%15.15s|%d->%d pix:%p", "ZONE_ROT_B_NEW", zone->rot.prev, zone->rot.curr, pix);
559 static Elm_Transit_Effect *
560 _effect_zone_rot_end_new(E_Comp_Layer *ly,
564 E_Comp_Zone_Rotation_Effect_End *ctx= E_NEW(E_Comp_Zone_Rotation_Effect_End, 1);
565 E_CHECK_RETURN(ctx, NULL);
567 Evas_Native_Surface ns;
569 Ecore_X_Window root = ecore_x_window_root_first_get();
576 ret = ecore_x_window_prop_xid_get(root, ATOM_XV_PIXMAP1, ECORE_X_ATOM_PIXMAP, &ctx->xv_pix, 1);
579 ctx->xv_pix = ecore_x_pixmap_new(root, zone->w, zone->h, 24);
581 ns.version = EVAS_NATIVE_SURFACE_VERSION;
582 ns.type = EVAS_NATIVE_SURFACE_X11;
583 ns.data.x11.visual = ecore_x_default_visual_get(ecore_x_display_get(), ecore_x_default_screen_get());
584 ns.data.x11.pixmap = ctx->xv_pix;
586 ctx->xv_img = evas_object_image_filled_add(evas_object_evas_get(ly->layout));
587 evas_object_image_size_set(ctx->xv_img, zone->w, zone->h);
588 evas_object_image_smooth_scale_set(ctx->xv_img, EINA_FALSE);
589 evas_object_image_native_surface_set(ctx->xv_img, &ns);
590 evas_object_image_data_update_add(ctx->xv_img, 0, 0, zone->w, zone->h);
592 // evas_object_show(ctx->xv_img);
594 e_layout_pack(ly->layout, ctx->xv_img);
595 e_layout_child_move(ctx->xv_img, 0, 0);
596 e_layout_child_resize(ctx->xv_img, zone->w, zone->h);
598 ctx->send_msg = EINA_TRUE;
603 int diff = zone->rot.curr - zone->rot.prev;
604 if (diff == 270) diff = -90;
605 else if (diff == -270) diff = 90;
608 ELBF(ELBT_COMP, 0, 0, "%15.15s|%d->%d", "ZONE_ROTATION_EFFECT_END_NEW", zone->rot.prev, zone->rot.curr);
613 _effect_zone_rot_begin_free(Elm_Transit_Effect *effect,
614 Elm_Transit *transit)
616 E_Comp_Zone_Rotation_Effect_Begin *ctx = (E_Comp_Zone_Rotation_Effect_Begin *)effect;
617 if (ctx->xim) ecore_x_image_free(ctx->xim);
620 evas_object_image_native_surface_set(ctx->xv_img, NULL);
621 evas_object_image_size_set(ctx->xv_img, 1, 1);
622 evas_object_image_data_set(ctx->xv_img, NULL);
626 ecore_x_pixmap_free(ctx->xv_pix);
630 evas_object_hide(ctx->xv_img);
631 e_layout_unpack(ctx->xv_img);
632 evas_object_del(ctx->xv_img);
637 evas_object_hide(ctx->img);
638 e_layout_unpack(ctx->img);
639 evas_object_del(ctx->img);
643 //evas_object_color_set(ctx->o, 255, 255, 255, 255);
645 e_mod_comp_layer_effect_set(ctx->ly, EINA_FALSE);
651 _effect_zone_rot_end_free(Elm_Transit_Effect *effect,
652 Elm_Transit *transit)
654 E_Comp_Zone_Rotation_Effect_End *ctx = (E_Comp_Zone_Rotation_Effect_End *)effect;
655 e_zone_rotation_block_set(ctx->zone, "comp-tizen", EINA_FALSE);
656 evas_object_color_set(ctx->o, 255, 255, 255, 255);
660 evas_object_image_native_surface_set(ctx->xv_img, NULL);
661 evas_object_image_size_set(ctx->xv_img, 1, 1);
662 evas_object_image_data_set(ctx->xv_img, NULL);
666 ecore_x_pixmap_free(ctx->xv_pix);
670 evas_object_hide(ctx->xv_img);
671 e_layout_unpack(ctx->xv_img);
672 evas_object_del(ctx->xv_img);
678 ecore_x_client_message32_send(ecore_x_window_root_first_get(),
679 ATOM_XV_ROT_EFFECT_DONE,
680 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
681 ecore_x_window_root_first_get(), 0, 0, 0, 0);
684 e_mod_comp_util_rr_prop_set(ATOM_RR_WM_STATE, "wm.effect.rotation.finish");
686 ELBF(ELBT_COMP, 0, 0, "%15.15s|", "ZONE_ROTATION_EFFECT_END_FREE");
691 _effect_zone_rot_begin_op(Elm_Transit_Effect *effect,
692 Elm_Transit *transit,
695 E_Comp_Zone_Rotation_Effect_Begin *ctx = (E_Comp_Zone_Rotation_Effect_Begin *)effect;
696 if (progress < 0.0) progress = 0.0;
697 double curr = (progress * ctx->target);
698 Evas_Coord x, y, w, h;
700 double col = 255 - (255 * progress);
701 if (col <= 0) col = 0;
703 evas_object_geometry_get(ctx->o, &x, &y, &w, &h);
705 Evas_Map *m = evas_map_new(4);
706 evas_map_util_points_populate_from_object(m, ctx->o);
707 evas_map_util_rotate(m, curr, x + (w/2), y + (h/2));
708 evas_map_alpha_set(m, EINA_TRUE);
709 evas_map_util_points_color_set(m, col, col, col, col);
710 evas_object_map_set(ctx->o, m);
711 evas_object_map_enable_set(ctx->o, EINA_TRUE);
714 /* to notify beginning of xv rotation effect */
715 if ((ctx->xv_img) && (!ctx->init) && (progress >= 0.1))
717 E_Comp *c = e_mod_comp_util_get();
718 ecore_x_client_message32_send(c->man->root,
719 ATOM_XV_ROT_EFFECT_BEGIN,
720 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
721 c->man->root, 0, 0, 0, 0);
722 ctx->init = EINA_TRUE;
729 _effect_zone_rot_end_op(Elm_Transit_Effect *effect,
730 Elm_Transit *transit,
733 E_Comp_Zone_Rotation_Effect_End *ctx = (E_Comp_Zone_Rotation_Effect_End *)effect;
734 if (progress < 0.0) progress = 0.0;
735 double curr = ((-1.0f * progress * ctx->src) + ctx->src);
736 Evas_Coord x, y, w, h;
738 evas_object_geometry_get(ctx->o, &x, &y, &w, &h);
740 Evas_Map *m = evas_map_new(4);
741 evas_map_util_points_populate_from_object(m, ctx->o);
742 evas_map_util_rotate(m, curr, x + (w/2), y + (h/2));
743 evas_object_map_set(ctx->o, m);
744 evas_object_map_enable_set(ctx->o, EINA_TRUE);
747 /* to avoid exposing "comp" layer before rotation effect running */
748 if ((ctx->xv_img) && (!ctx->init) && (progress >= 0.1))
750 evas_object_show(ctx->xv_img);
751 ctx->init = EINA_TRUE;