From: Doyoun Kang Date: Fri, 14 Feb 2020 05:19:11 +0000 (+0900) Subject: capture: add code to capture window before unmap X-Git-Tag: submit/tizen/20200214.070252^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5c196c499d6116383b9f617588bb234cef60cf2;p=platform%2Fupstream%2Fenlightenment.git capture: add code to capture window before unmap There was a bug that the window was not captured when it was unmapped. This fixes it. Change-Id: I93976058115d74ff7cfcf56a60bc432b87100311 --- diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index d41b7efbec..bf2e23fb40 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -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; diff --git a/src/bin/e_comp_wl_capture.c b/src/bin/e_comp_wl_capture.c index f51b9a0b38..bc901a0daa 100644 --- a/src/bin/e_comp_wl_capture.c +++ b/src/bin/e_comp_wl_capture.c @@ -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;