return only ui layer video buffer in e_devicemgr_video_fb_get 33/80033/3
authorJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 14 Jul 2016 07:11:53 +0000 (16:11 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 15 Jul 2016 04:54:39 +0000 (21:54 -0700)
clear dst buffer of dump_still

Change-Id: I76e8a0cc7499d98a5c8701f812fd6a18e838cc85
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/e_devicemgr_screenshooter.c
src/e_devicemgr_video.c

index af0fbc2b7b496b299abcdcc566118aa0313e9aea..b8b2ce87ede7d573bc9257ab7ca958bcce6d6c0a 100644 (file)
@@ -398,6 +398,8 @@ _e_tz_screenmirror_dump_still(E_Mirror_Buffer *buffer)
    dst = buffer->mbuf;
    EINA_SAFETY_ON_NULL_RETURN(dst);
 
+   e_devmgr_buffer_clear(dst);
+
    /* get ui buffer */
    ui = _e_tz_screenmirror_ui_buffer_get(mirror);
    EINA_SAFETY_ON_NULL_RETURN(ui);
index fa8ce0fe62dac353efce3b34babeb21c0b00d929..ea76f0c1d02de4832831c50cfddf973dda40253c 100644 (file)
@@ -1692,8 +1692,16 @@ e_devicemgr_video_get(struct wl_resource *surface_resource)
 E_Devmgr_Buf*
 e_devicemgr_video_fb_get(E_Video *video)
 {
+   tdm_layer_capability capabilities = 0;
+
    EINA_SAFETY_ON_NULL_RETURN_VAL(video, NULL);
 
+   if (tdm_layer_get_capabilities(video->layer, &capabilities) != TDM_ERROR_NONE)
+      return NULL;
+
+   if (capabilities & TDM_LAYER_CAPABILITY_VIDEO)
+      return NULL;
+
    return (video->current_fb) ? video->current_fb->mbuf : NULL;
 }