Not create a native surface in case of video buffer 76/66676/1
authorBoram Park <boram1288.park@samsung.com>
Wed, 20 Apr 2016 08:23:13 +0000 (17:23 +0900)
committerBoram Park <boram1288.park@samsung.com>
Wed, 20 Apr 2016 08:40:27 +0000 (17:40 +0900)
Change-Id: Idfc8dee63954de191e834be23bf63c22439e6791

src/bin/e_comp_object.c
src/bin/e_pixmap.c

index 913ea07355b0f6e7f7aac9622dd2221e35964240..992661c1574cc6b2c40e86337a9049f21cd8d684 100644 (file)
@@ -3881,8 +3881,8 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
                {
                   Evas_Native_Surface ns;
 
-                  e_pixmap_native_surface_init(cw->ec->pixmap, &ns);
-                  evas_object_image_native_surface_set(o, &ns);
+                  if (e_pixmap_native_surface_init(cw->ec->pixmap, &ns))
+                    evas_object_image_native_surface_set(o, &ns);
                }
           }
         else
index 93d62ca3c4b2b5c27594a6bd8e6d2f4cca553f05..96a0311475705551f7f7f9ef41c65a7ef1554ebd 100644 (file)
@@ -724,13 +724,18 @@ e_pixmap_native_surface_init(E_Pixmap *cp, Evas_Native_Surface *ns)
         break;
       case E_PIXMAP_TYPE_WL:
 #ifdef HAVE_WAYLAND
-        if (cp->buffer)
+        if (cp->buffer && cp->buffer->type == E_COMP_WL_BUFFER_TYPE_NATIVE)
           {
              ns->type = EVAS_NATIVE_SURFACE_WL;
              ns->version = EVAS_NATIVE_SURFACE_VERSION;
              ns->data.wl.legacy_buffer = cp->buffer->resource;
              ret = !cp->buffer->shm_buffer;
           }
+        else /* SHM buffer or VIDEO buffer */
+          {
+             ns->type = EVAS_NATIVE_SURFACE_NONE;
+             ret = EINA_FALSE;
+          }
 #endif
         break;
       default: