video_shell: Remove redundant implementation 21/316221/1
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 9 Aug 2024 07:43:56 +0000 (16:43 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 16 Aug 2024 04:45:16 +0000 (13:45 +0900)
This removes obsolete implementation.

Change-Id: Ifea44c37a0175b1daf7b529bcf96de355423ff62

src/bin/server/e_video_shell.c

index 2ea6522..be9e8d3 100644 (file)
@@ -925,24 +925,6 @@ _letter_box_geometry_calc(Eina_Rectangle *in_out, double ratio_width, double rat
 }
 
 static void
-_source_view_move(E_Video_Viewport_Source *source, int x, int y)
-{
-   E_Client *ec = e_surface_ec_get(source->surface->surface);
-
-   evas_object_move(ec->frame, x, y);
-   e_client_transform_core_update(ec);
-}
-
-static void
-_source_view_reposition(E_Video_Viewport_Source *source)
-{
-   int x, y;
-
-   e_comp_wl_subsurface_data_coord_get(&source->base, &x, &y);
-   _source_view_move(source, x, y);
-}
-
-static void
 _source_viewport_destination_update(E_Video_Viewport_Source *source)
 {
    E_Video_Viewport *viewport = source->viewport;
@@ -972,8 +954,6 @@ _source_viewport_destination_update(E_Video_Viewport_Source *source)
 
 end:
    e_comp_wl_subsurface_data_position_set(&source->base, dest_rect.x, dest_rect.y);
-   _source_view_reposition(source);
-
    e_surface_viewport_destination_set(source->surface->surface, dest_rect.w, dest_rect.h);
 }
 
@@ -1065,56 +1045,19 @@ end:
 static void
 _source_viewport_apply(E_Video_Viewport_Source *source)
 {
-   E_Client *ec;
+   E_Client *ec = e_surface_ec_get(source->surface->surface);
    E_Comp_Wl_Buffer_Viewport *vp;
-   E_Comp_Wl_Subsurf_Data *sdata;
    E_Comp_Wl_Client_Data *cdata;
    int x1, y1, x2, y2, x, y;
-   int dx = 0, dy = 0;
    Eina_Bool zoom_animating = EINA_FALSE;
 
-   ec = e_surface_ec_get(source->surface->surface);
    e_comp_wl_map_size_cal_from_viewport(ec);
 
    // FIXME: This code is copied from e_comp_wl_map_apply()
    e_view_client_map_update(e_client_view_get(ec));
 
-   if (e_comp_wl_subsurface_check(ec))
-     {
-        e_comp_wl_subsurface_data_coord_get(&source->base, &dx, &dy);
-
-        sdata = ec->comp_data->sub.data;
-        if (sdata->remote_surface.offscreen_parent)
-          {
-             E_Client *offscreen_parent = sdata->remote_surface.offscreen_parent;
-             Eina_Rectangle *rect;
-             Eina_List *l;
-
-             EINA_LIST_FOREACH(offscreen_parent->comp_data->remote_surface.regions, l, rect)
-               {
-                  /* TODO: If there are one more regions, it means that provider's offscreen
-                   * is displayed by one more remote_surfaces. Have to consider it later. At
-                   * this time, just consider only one remote_surface.
-                   */
-                  dx += rect->x;
-                  dy += rect->y;
-                  break;
-               }
-          }
-
-        e_view_client_geometry_get(e_client_view_get(ec), &x, &y, NULL, NULL);
-        if (x != dx || y != dy)
-          _source_view_move(source, dx, dy);
-     }
-   else
-     {
-        dx = ec->x;
-        dy = ec->y;
-
-        e_view_client_geometry_get(e_client_view_get(ec), &x, &y, NULL, NULL);
-        if (x != dx || y != dy)
-          e_view_position_set(e_view_client_view_get(e_client_view_get(ec)), dx, dy);
-     }
+   e_comp_wl_subsurface_data_coord_get(&source->base, &x, &y);
+   e_view_position_set(e_view_client_view_get(e_client_view_get(ec)), x, y);
 
    cdata = ec->comp_data;
    if (!cdata->viewport_transform)
@@ -1124,7 +1067,7 @@ _source_viewport_apply(E_Video_Viewport_Source *source)
         e_client_transform_core_add(ec, cdata->viewport_transform);
      }
 
-   e_util_transform_viewport_set(cdata->viewport_transform, dx, dy,
+   e_util_transform_viewport_set(cdata->viewport_transform, x, y,
                                  ec->comp_data->width_from_viewport,
                                  ec->comp_data->height_from_viewport);