capture: add code to capture window before unmap 07/224907/1 accepted/tizen/5.5/unified/20200214.120149 submit/tizen_5.5/20200214.062339
authorDoyoun Kang <doyoun.kang@samsung.com>
Fri, 14 Feb 2020 05:19:11 +0000 (14:19 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Fri, 14 Feb 2020 05:19:11 +0000 (14:19 +0900)
There was a bug that the window was not captured when it was unmapped.
This fixes it.

Change-Id: I93976058115d74ff7cfcf56a60bc432b87100311

src/bin/e_comp_wl.c
src/bin/e_comp_wl_capture.c

index 4893b771f4f4e37eac0cd76619506ef932a49f6b..fa0ed9a8fd722fdd4ddd381a16ec9092beed45f0 100644 (file)
@@ -2774,6 +2774,15 @@ _e_comp_wl_surface_cb_attach(struct wl_client *client EINA_UNUSED, struct wl_res
           }
      }
 
+   if (!buffer)
+     {
+        if (ec->comp_data->mapped)
+          {
+             /* will be unmapped. so run capture */
+             e_comp_wl_remote_surface_image_save(ec);
+          }
+     }
+
    _e_comp_wl_surface_state_buffer_set(&ec->comp_data->pending, buffer);
 
    ec->comp_data->pending.sx = sx;
index ab8f92e8e7e423f27c909bce165b0247c10490b6..d298e544449f52eed2fbaf245904a8557ee80ec2 100644 (file)
@@ -1477,13 +1477,12 @@ _e_capture_client_save(E_Capture_Client *ecc,
    tbm_surface_h tbm_surface;
 
    if (!(ec = ecc->ec)) return E_CAPTURE_SAVE_STATE_INVALID;
-   if (!(buffer = e_pixmap_resource_get(ec->pixmap))) return E_CAPTURE_SAVE_STATE_INVALID;
-
    if (ecc->th)
      {
         CAPDBG("ALREADY doing capture", ecc->ec, "ECC", ecc);
         return E_CAPTURE_SAVE_STATE_BUSY;
      }
+   if (!(buffer = e_pixmap_resource_get(ec->pixmap))) return E_CAPTURE_SAVE_STATE_INVALID;
 
    td = E_NEW(Thread_Data, 1);
    if (!td) return E_CAPTURE_SAVE_STATE_INVALID;