capture: add code to capture window before unmap 29/224929/1 accepted/tizen/unified/20200214.120046 submit/tizen/20200214.070252
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 06:55:01 +0000 (15:55 +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 d41b7efbeca04993eeb30beac7748c3b85e657c1..bf2e23fb4055cb301796b9fcd17a1e886970445c 100644 (file)
@@ -2787,6 +2787,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 f51b9a0b382d185aee1629d35d089eb4af35fdcc..bc901a0daa996aa9daaec845ce20ebb4a5237496 100644 (file)
@@ -1481,13 +1481,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;