video: Fix double cropping source/output region of tdm 10/252610/1 accepted/tizen/unified/20210201.055415 submit/tizen/20210130.024922
authorSeunghun Lee <shiin.lee@samsung.com>
Sat, 30 Jan 2021 01:33:10 +0000 (10:33 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Sat, 30 Jan 2021 02:07:00 +0000 (11:07 +0900)
Cropping an already cropped source/output region is an error.
So, this change makes updating tdm config happen once during render job.

So far this has been no problem since wl_client didn't try to set its
output region beyond the screen. However, once wl_client tried to do
that, the problem came out because of the double cropping.

More specifically, source region was a problem. source region was
cropped and updated once during applying viewport, but it was cropped
and updated again with already cropped source region during applying
map.

Change-Id: Ia8efb27a3af66eda5564f166a9ea734d21a93cf1

src/bin/video/iface/e_video_hwc.c

index 78d53fd..8864ccf 100644 (file)
@@ -1158,8 +1158,6 @@ _e_video_hwc_geometry_map_apply(E_Client *ec, E_Video_Hwc_Geometry *out)
    out->output_r = output_r;
    out->transform = transform;
 
-   _e_video_hwc_geometry_tdm_config_update(ec, out);
-
    return EINA_TRUE;
 }
 
@@ -1467,8 +1465,6 @@ _e_video_hwc_geometry_viewport_apply(E_Client *ec, E_Video_Hwc_Geometry *out)
    _e_video_hwc_geometry_output_rect_get(ec, &out->output_r);
    out->transform = vp->buffer.transform;
 
-   _e_video_hwc_geometry_tdm_config_update(ec, out);
-
    VDB("geometry(%d,%d %dx%d  %d,%d %dx%d  %d)", ec,
        EINA_RECTANGLE_ARGS(&out->input_r),EINA_RECTANGLE_ARGS(&out->output_r),
        out->transform);
@@ -1487,6 +1483,8 @@ _e_video_hwc_geometry_get(E_Client *ec, E_Video_Hwc_Geometry *out)
 
    _e_video_hwc_geometry_map_apply(ec, out);
 
+   _e_video_hwc_geometry_tdm_config_update(ec, out);
+
    e_comp_wl_video_buffer_size_get(ec, &input_r.w, &input_r.h);
    // when topmost is not mapped, input size can be abnormal.
    // in this case, it will be render by topmost showing.