hwc: fix missing setting zpos of target_window 57/253657/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 16 Feb 2021 05:43:10 +0000 (14:43 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Tue, 16 Feb 2021 05:43:10 +0000 (14:43 +0900)
if video is shown and all ui layers are used by device type,
zpos of target_window is not set.
target_window should be displayed in this case
because vc4 using zpos 0 ui layer by video and ui

Change-Id: Ib3bb6aa92ddc209746bb69b16262ccd04087cf33

src/tdm_vc4_hwc.c

index 9ec176a..b753c8c 100644 (file)
@@ -361,6 +361,7 @@ _vc4_hwc_apply_policy(tdm_vc4_hwc_data *hwc_data , tdm_hwc_window **composited_w
                case TDM_HWC_WIN_COMPOSITION_VIDEO:
                        composited_list[i]->validated_type = TDM_HWC_WIN_COMPOSITION_VIDEO;
                        video_count++;
+                       num_ui_layers--;
                        continue;
                case TDM_HWC_WIN_COMPOSITION_CURSOR:
                        if (set_clients_below) break;
@@ -395,7 +396,8 @@ _vc4_hwc_apply_policy(tdm_vc4_hwc_data *hwc_data , tdm_hwc_window **composited_w
                num_ui_layers--;
        }
 
-       if (client_count > 0) {
+       if ((client_count > 0) ||
+               ((video_count > 0) && (device_count == NUM_UI_LAYERS))) {
                ui_lzpos_bottom++;
                num_ui_layers--;
                hwc_data->need_target_window = 1;