e_hwc_windows: calculate pp source rectangle in e_hwc_window_mirror_set 44/272844/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 16 Mar 2022 07:16:01 +0000 (16:16 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 25 Mar 2022 10:56:38 +0000 (19:56 +0900)
pp source rectangle should be set to geometry of source hwc
in mirror mode.

Change-Id: I4ee743922d55580172d316c542a2abd61957cc0c

src/bin/e_hwc_windows.c
src/bin/e_hwc_windows.h
src/bin/e_output.c

index 781bf11..02e502b 100644 (file)
@@ -4302,19 +4302,22 @@ e_hwc_windows_debug_info_get(Eldbus_Message_Iter *iter, E_Hwc_Wins_Debug_Cmd cmd
 }
 
 EINTERN Eina_Bool
-e_hwc_windows_mirror_set(E_Hwc *hwc, E_Hwc *src_hwc, Eina_Rectangle *rect)
+e_hwc_windows_mirror_set(E_Hwc *hwc, E_Hwc *src_hwc)
 {
+   Eina_Rectangle rect;
+
    EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(src_hwc, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(rect, EINA_FALSE);
 
-   EHWSINF("e_hwc_windows_mirror_set. rect(%d,%d)(%d,%d)",
-           NULL, hwc, rect->x, rect->y, rect->w, rect->h);
+   EHWSINF("e_hwc_windows_mirror_set src_hwc:%p", NULL, hwc, src_hwc);
 
-   hwc->mirror_src_tsurface = NULL;
+   rect.x = hwc->output->config.geom.x;
+   rect.y = hwc->output->config.geom.y;
+   rect.w = hwc->output->config.geom.w;
+   rect.h = hwc->output->config.geom.h;
 
    /* set the zoom to the hwc. */
-   if (!e_hwc_windows_zoom_set(hwc, rect))
+   if (!e_hwc_windows_zoom_set(hwc, &rect))
      {
         EHWSERR("e_hwc_windows_zoom_set failed.", hwc);
         return EINA_FALSE;
@@ -4324,6 +4327,7 @@ e_hwc_windows_mirror_set(E_Hwc *hwc, E_Hwc *src_hwc, Eina_Rectangle *rect)
 
    /* add mirror_src to the hwc*/
    hwc->mirror_src_hwc = src_hwc;
+   hwc->mirror_src_tsurface = NULL;
 
    /* add mirror_dst list to the src_hwc */
    src_hwc->mirror_dst_hwc = eina_list_append(src_hwc->mirror_dst_hwc, hwc);
index d76315d..99e5953 100644 (file)
@@ -52,7 +52,7 @@ EINTERN void                 e_hwc_windows_debug_info_get(Eldbus_Message_Iter *i
 E_API   void                 e_hwc_windows_debug_dump_start(void);
 E_API   void                 e_hwc_windows_debug_dump_stop(void);
 
-EINTERN Eina_Bool            e_hwc_windows_mirror_set(E_Hwc *hwc, E_Hwc *src_hwc, Eina_Rectangle *rect);
+EINTERN Eina_Bool            e_hwc_windows_mirror_set(E_Hwc *hwc, E_Hwc *src_hwc);
 EINTERN void                 e_hwc_windows_mirror_unset(E_Hwc *hwc);
 
 EINTERN Eina_Bool            e_hwc_windows_present_sync(E_Hwc *hwc);
index 966c70d..5f920f3 100644 (file)
@@ -4009,8 +4009,7 @@ e_output_mirror_set(E_Output *output, E_Output *src_output)
           }
         else
           {
-             /* set the target_buffer of the src_hwc to the target_buffer of the dst_hwc with zoom rect */
-             if (!e_hwc_windows_mirror_set(output->hwc, src_output->hwc, &output->zoom_conf.rect))
+             if (!e_hwc_windows_mirror_set(output->hwc, src_output->hwc))
                {
                   EOERR("e_hwc_windows_mirror_set failed.", output);
                   return EINA_FALSE;