e_comp_object: Initializing Evas_Native_Surface using memset. 91/72491/1
authorGwanglim Lee <gl77.lee@samsung.com>
Wed, 1 Jun 2016 08:08:49 +0000 (17:08 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Wed, 1 Jun 2016 08:08:49 +0000 (17:08 +0900)
It doesn't need to initialise all elements of Evas_Native_Surface structure.

Change-Id: Icc7dfc903bbd5754d1e40d690436deb27562bc8c

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

index 08db68bf1969e4a3d1d6c1f03535f2e3275f6820..d1c7279b07c4bc7331042690fb2f0f8597f5f1a2 100644 (file)
@@ -3510,6 +3510,8 @@ e_comp_object_native_surface_set(Evas_Object *obj, Eina_Bool set)
    if (cw->ec->input_only) return;
    set = !!set;
 
+   memset(&ns, 0, sizeof(Evas_Native_Surface));
+
    if (set)
      {
         /* native requires gl enabled, texture from pixmap enabled, and a non-shaped client */
@@ -3768,7 +3770,7 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
              else
                {
                   Evas_Native_Surface ns;
-
+                  memset(&ns, 0, sizeof(Evas_Native_Surface));
                   if (e_pixmap_native_surface_init(cw->ec->pixmap, &ns))
                     evas_object_image_native_surface_set(o, &ns);
                }
index 810e5083b0d79edd4379d3a1d30aec0f15ce53d9..d2c1090ed6e33f19f0fc4bbb9ce67f7b0953242e 100644 (file)
@@ -542,9 +542,6 @@ e_pixmap_native_surface_init(E_Pixmap *cp, Evas_Native_Surface *ns)
         ns->type = EVAS_NATIVE_SURFACE_TBM;
         ns->version = EVAS_NATIVE_SURFACE_VERSION;
         ns->data.tbm.buffer = cp->buffer->tbm_surface;
-        ns->data.tbm.rot = 0;
-        ns->data.tbm.ratio = 0;
-        ns->data.tbm.flip = 0;
         if (cp->buffer->tbm_surface)
           ret = EINA_TRUE;
      }