From 1919dc1ca82e2ab8bcf80fb07631f0dd814bae56 Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Tue, 14 May 2019 15:44:19 +0900 Subject: [PATCH] video: A composite object for video client has to be punched if it's laid above main client. Otherwise, Video contents which is displayed through underlay would not be displayed on screen, because underlay is possibly covered with contents of primary plane. Change-Id: I31359e93936eb161ee7063fdcac122ed4e5154a9 --- src/bin/video/iface/e_video_hwc.c | 47 ++++++++++++++++--------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/bin/video/iface/e_video_hwc.c b/src/bin/video/iface/e_video_hwc.c index f9df1ecb14..40eaedf3a1 100644 --- a/src/bin/video/iface/e_video_hwc.c +++ b/src/bin/video/iface/e_video_hwc.c @@ -1639,35 +1639,36 @@ e_video_hwc_client_mask_update(E_Video_Hwc *evh) int bw, bh; if (e_video_debug_punch_value_get()) - { - punch = EINA_TRUE; - goto end; - } - - topmost = e_comp_wl_topmost_parent_get(evh->ec); - if (topmost && topmost->argb) - { - /* FIXME: the mask obj can be drawn at the wrong position in the beginnig - * time. It happens caused by window manager policy. - */ - if ((topmost->fullscreen || topmost->maximized) && - (evh->geo.output_r.x == 0 || evh->geo.output_r.y == 0)) + punch = EINA_TRUE; + else if ((topmost = e_comp_wl_topmost_parent_get(evh->ec))) + { + /* if it's laid above main surface */ + if (eina_list_data_find(topmost->comp_data->sub.list, evh->ec)) + punch = EINA_TRUE; + /* if it's laid under main surface and main surface is transparent */ + else if (topmost->argb) { - e_pixmap_size_get(topmost->pixmap, &bw, &bh); - - if (bw > 100 && bh > 100 && - evh->geo.output_r.w < 100 && evh->geo.output_r.h < 100) + /* FIXME: the mask obj can be drawn at the wrong position in the beginnig + * time. It happens caused by window manager policy. + */ + if ((topmost->fullscreen || topmost->maximized) && + (evh->geo.output_r.x == 0 || evh->geo.output_r.y == 0)) { - VIN("don't punch. (%dx%d, %dx%d)", evh->ec, - bw, bh, evh->geo.output_r.w, evh->geo.output_r.h); - return; + e_pixmap_size_get(topmost->pixmap, &bw, &bh); + + if (bw > 100 && bh > 100 && + evh->geo.output_r.w < 100 && evh->geo.output_r.h < 100) + { + VIN("don't punch. (%dx%d, %dx%d)", evh->ec, + bw, bh, evh->geo.output_r.w, evh->geo.output_r.h); + return; + } } - } - punch = EINA_TRUE; + punch = EINA_TRUE; + } } -end: if (punch) { if (!e_comp_object_mask_has(evh->ec->frame)) -- 2.34.1