e_comp_wl_rsm: send true of ignore output transform if remote surface is redirected 46/238546/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 14 Jul 2020 07:07:26 +0000 (16:07 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Wed, 15 Jul 2020 02:19:14 +0000 (11:19 +0900)
If buffer is rotated according to output rotation, remote surface doesn't send
buffer change event.
buffer should not be rotated because consumer of remote surface doesn't know
rotation state of buffer.

Change-Id: I490b33c284fe82e4eb4ae5c4c9083964c950308c

src/bin/e_comp_wl_rsm.c

index 278fdbda720a26eeaae8f7be8604ebe6e72ab0b4..050bef9a0cfa371743527c7bd5f06bd696ce8b05 100644 (file)
@@ -1004,19 +1004,28 @@ _remote_surface_ignore_output_transform_send(E_Comp_Wl_Remote_Common *common)
 {
    E_Comp_Wl_Remote_Surface *remote_surface;
    const char *msg;
+   Eina_List *l;
+   Eina_Bool bind = EINA_FALSE;
 
    EINA_SAFETY_ON_NULL_RETURN(common);
 
-   if (eina_list_count(common->surfaces) != 1)
+   EINA_LIST_FOREACH(common->surfaces, l, remote_surface)
      {
-        msg = "remote surface count = 0 or over 1";
-        goto ignore;
+        if (!remote_surface) continue;
+
+        if (remote_surface->bind_ec)
+          bind = EINA_TRUE;
+
+        if (remote_surface->redirect && !remote_surface->bind_ec)
+          {
+             msg = "remote surface redirect and not bind";
+             goto ignore;
+          }
      }
 
-   remote_surface = eina_list_nth(common->surfaces, 0);
-   if (remote_surface && remote_surface->bind_ec)
+   if (bind)
      {
-        msg = "1 binding remote surface";
+        msg = "remote surface bind";
         goto no_ignore;
      }
 
@@ -1233,8 +1242,8 @@ _remote_source_offscreen_set(E_Comp_Wl_Remote_Source *source, Eina_Bool set)
 
         if (source->offscreen_ref == 1)
           {
-             _remote_surface_ignore_output_transform_send(&source->common);
              source->common.is_offscreen = EINA_TRUE;
+             _remote_surface_ignore_output_transform_send(&source->common);
 
              source->common.ec->exp_iconify.not_raise = 1;
              if (!source->common.ec->exp_iconify.by_client)
@@ -1261,8 +1270,8 @@ _remote_source_offscreen_set(E_Comp_Wl_Remote_Source *source, Eina_Bool set)
 
         if (source->offscreen_ref == 0)
           {
-             _remote_surface_ignore_output_transform_send(&source->common);
              source->common.is_offscreen = EINA_FALSE;
+             _remote_surface_ignore_output_transform_send(&source->common);
              source->common.ec->exp_iconify.skip_by_remote = 0;
              EC_CHANGED(source->common.ec);
           }
@@ -1538,6 +1547,7 @@ _remote_surface_cb_redirect(struct wl_client *client, struct wl_resource *resour
                remote_surface->provider, remote_surface->provider->common.ec);
 
         remote_surface->redirect = EINA_TRUE;
+        _remote_surface_ignore_output_transform_send(&remote_surface->provider->common);
 
         /* Send input event filter of provider */
         if ((remote_surface->provider->input_event_filter) &&
@@ -1577,6 +1587,7 @@ _remote_surface_cb_redirect(struct wl_client *client, struct wl_resource *resour
           return;
 
         remote_surface->redirect = EINA_TRUE;
+        _remote_surface_ignore_output_transform_send(&remote_surface->source->common);
 
         buffer = _remote_surface_comp_wl_buffer_get(remote_surface->source->common.ec);
         tbm_surface = _remote_surface_get_tbm_surface_from_ns(remote_surface->source->common.ec);
@@ -1607,6 +1618,10 @@ _remote_surface_cb_unredirect(struct wl_client *client, struct wl_resource *reso
    EINA_SAFETY_ON_FALSE_RETURN(remote_surface->valid);
 
    remote_surface->redirect = EINA_FALSE;
+   if (remote_surface->provider)
+     _remote_surface_ignore_output_transform_send(&remote_surface->provider->common);
+   else if (remote_surface->source)
+     _remote_surface_ignore_output_transform_send(&remote_surface->source->common);
 
    RSMINF("Unredirect surface provider:%p(ec:%p)",
           remote_surface->ec, "SURFACE", remote_surface,