e_comp_wl: Drop e_comp_wl_output_pending_buffer_transform_get 42/321342/1
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 14 Mar 2025 07:46:06 +0000 (16:46 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 19 Mar 2025 05:47:24 +0000 (14:47 +0900)
The pending state of surface should not be exposed to outer modules.
This function is no longer needed since the commit:

compositor: Centralize scaler viewport update
Change-Id: I2c17a8369a1c29c53dd92f19cab42e5926f94073

src/bin/server/e_comp_wl.c
src/bin/server/e_comp_wl_intern.h
src/bin/server/e_comp_wl_rsm.c

index 8e1eb62777c882a77cc1c7248ef462522387a47e..5764843718a12094e3f087c39e3be3b60e76a1ce 100644 (file)
@@ -420,42 +420,6 @@ e_comp_wl_output_buffer_transform_get(E_Client *ec)
    return e_surface_buffer_transform_get(surface);
 }
 
-EINTERN enum wl_output_transform
-e_comp_wl_output_pending_buffer_transform_get(E_Client *ec)
-{
-   E_Comp_Wl_Buffer_Viewport *vp;
-   E_Comp_Wl_Buffer *buffer;
-   enum wl_output_transform transform, rotation;
-
-   if (!ec) return WL_OUTPUT_TRANSFORM_NORMAL;
-   if (e_object_is_del(E_OBJECT(ec))) return WL_OUTPUT_TRANSFORM_NORMAL;
-   if (!ec->comp_data) return WL_OUTPUT_TRANSFORM_NORMAL;
-
-   vp = &ec->comp_data->pending.buffer_viewport;
-   if (e_comp_wl_subsurface_check(ec))
-     return vp->buffer.transform;
-
-   buffer = ec->comp_data->pending.buffer;
-
-   if (!buffer ||
-       (buffer->type != E_COMP_WL_BUFFER_TYPE_NATIVE && buffer->type != E_COMP_WL_BUFFER_TYPE_TBM))
-     return vp->buffer.transform;
-
-   rotation = buffer->transform;
-   if (rotation == 0)
-     return vp->buffer.transform;
-
-   /* ignore the flip value when calculating transform because the screen rotation
-    * functionality doesn't consider the flip output transform currently
-    */
-   transform = (4 + (vp->buffer.transform & 0x3) - rotation) & 0x3;
-
-   DBG("ec(%p) window rotation(%d) buffer_transform(%d) : transform(%d)",
-       ec, rotation, vp->buffer.transform, transform);
-
-   return transform;
-}
-
 E_API void
 e_comp_wl_map_size_cal_from_buffer(E_Client *ec)
 {
index ba6be0dc696cac433d04d75de9717a3323602daf..2df0bb7fd853b50352855aec9b4be81d343c550c 100644 (file)
@@ -19,7 +19,6 @@ EINTERN void      e_comp_wl_surface_commit(E_Client *ec);
 
 EINTERN Eina_Bool                 e_comp_wl_output_init(const char *id, const char *make, const char *model, int x, int y, int w, int h, int pw, int ph, unsigned int refresh, unsigned int subpixel, unsigned int transform);
 EINTERN void                      e_comp_wl_output_remove(const char *id);
-EINTERN enum wl_output_transform  e_comp_wl_output_pending_buffer_transform_get(E_Client *ec);
 EINTERN E_Comp_Wl_Output         *e_comp_wl_output_find(E_Client *ec);
 EINTERN Eina_Array               *e_comp_wl_output_find_all(E_Client *ec);
 EINTERN Eina_Bool                 e_comp_wl_pid_output_configured_resolution_send(pid_t pid, int w, int h);
index c22428213d74ead61c72c3ca6887ca297097bea5..b84608d54290d52ee44f02d17f61ffea9edad34f 100644 (file)
@@ -589,8 +589,7 @@ _remote_surface_changed_buff_protocol_send(E_Comp_Wl_Remote_Surface *rs,
                                            unsigned int img_file_size,
                                            Eina_Bool ref_set,
                                            E_Comp_Wl_Buffer *buff,
-                                           tbm_surface_h tbm_surface,
-                                           Eina_Bool pending)
+                                           tbm_surface_h tbm_surface)
 {
    E_Client *src_ec = NULL;
    struct wl_resource *tbm = NULL;
@@ -622,11 +621,7 @@ _remote_surface_changed_buff_protocol_send(E_Comp_Wl_Remote_Surface *rs,
    /* if unbinded, buffer_transform should be 0 for consumer to composite buffers.
     * Otherwise, we skip sending a change_buffer event because buffer is not ready.
     */
-   if (pending)
-     output_transform = e_comp_wl_output_pending_buffer_transform_get(src_ec);
-   else
-     output_transform = e_surface_buffer_transform_get(e_surface_from_ec(src_ec));
-
+   output_transform = e_surface_buffer_transform_get(e_surface_from_ec(src_ec));
    if (!rs->bind_ec && output_transform)
      {
         RSMINF("CHANGED_BUFF skiped: buffer not ready", rs->ec, "SURFACE", rs);
@@ -768,7 +763,7 @@ _remote_surface_buff_send(E_Comp_Wl_Remote_Surface *rs)
                                                          _rsm->dummy_fd,
                                                          (unsigned int)img_size,
                                                          EINA_FALSE,
-                                                         buff, tbm_surface, EINA_FALSE);
+                                                         buff, tbm_surface);
      }
    else
      {
@@ -792,7 +787,7 @@ _remote_surface_buff_send(E_Comp_Wl_Remote_Surface *rs)
                                                          fd,
                                                          (unsigned int)img_size,
                                                          EINA_FALSE,
-                                                         NULL, NULL, EINA_FALSE);
+                                                         NULL, NULL);
         close(fd);
      }
 
@@ -974,7 +969,7 @@ _remote_surface_bind_client(E_Comp_Wl_Remote_Surface *remote_surface, E_Client *
                                                         _rsm->dummy_fd,
                                                         0,
                                                         EINA_TRUE,
-                                                        buffer, NULL, EINA_FALSE);
+                                                        buffer, NULL);
           }
      }
 
@@ -1141,7 +1136,7 @@ _remote_source_send_image_update(E_Comp_Wl_Remote_Source *source)
                                                    fd,
                                                    (unsigned int)image_size,
                                                    EINA_FALSE,
-                                                   NULL, NULL, EINA_FALSE);
+                                                   NULL, NULL);
      }
 
    close(fd);
@@ -1591,7 +1586,7 @@ _remote_surface_cb_redirect(struct wl_client *client, struct wl_resource *resour
                                                    _rsm->dummy_fd,
                                                    0,
                                                    EINA_TRUE,
-                                                   buffer, tbm_surface, EINA_FALSE);
+                                                   buffer, tbm_surface);
      }
    else if (remote_surface->source)
      {
@@ -1626,7 +1621,7 @@ _remote_surface_cb_redirect(struct wl_client *client, struct wl_resource *resour
                                                         _rsm->dummy_fd,
                                                         0,
                                                         EINA_TRUE,
-                                                        buffer, tbm_surface, EINA_FALSE);
+                                                        buffer, tbm_surface);
           }
         else
           {
@@ -2961,7 +2956,7 @@ _e_comp_wl_remote_buffer_get(E_Comp_Wl_Remote_Surface *remote_surface, struct wl
 }
 
 static void
-_e_comp_wl_remote_surface_source_update(E_Comp_Wl_Remote_Source *source, E_Comp_Wl_Buffer *buffer, Eina_Bool pending)
+_e_comp_wl_remote_surface_source_update(E_Comp_Wl_Remote_Source *source, E_Comp_Wl_Buffer *buffer)
 {
    E_Comp_Wl_Remote_Surface *remote_surface;
    Eina_List *l;
@@ -2980,7 +2975,7 @@ _e_comp_wl_remote_surface_source_update(E_Comp_Wl_Remote_Source *source, E_Comp_
                                                    _rsm->dummy_fd,
                                                    0,
                                                    EINA_TRUE,
-                                                   buffer, NULL, pending);
+                                                   buffer, NULL);
      }
 }
 
@@ -3096,13 +3091,13 @@ _e_comp_wl_remote_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *st
                                                                   _rsm->dummy_fd,
                                                                   0,
                                                                   EINA_TRUE,
-                                                                  buffer, NULL, EINA_FALSE);
+                                                                  buffer, NULL);
                     }
                }
           }
         else if ((source = _remote_source_find(ec)))
           {
-             _e_comp_wl_remote_surface_source_update(source, buffer, EINA_FALSE);
+             _e_comp_wl_remote_surface_source_update(source, buffer);
           }
 
         /* send frame done */
@@ -3252,7 +3247,7 @@ e_comp_wl_remote_surface_commit(E_Client *ec)
           }
 
         //send update to remote_surface of source client
-        _e_comp_wl_remote_surface_source_update(source, ec->comp_data->pending.buffer, EINA_TRUE);
+        _e_comp_wl_remote_surface_source_update(source, ec->comp_data->pending.buffer);
 
         //do normal commit callback process
         return EINA_FALSE;