Ejemplo n.º 1
0
void 
_evas_outbuf_free(Outbuf *ob)
{
   LOGFN(__FILE__, __LINE__, __FUNCTION__);

   while (ob->priv.pending_writes)
     {
        RGBA_Image *img;
        Eina_Rectangle *rect;

        img = ob->priv.pending_writes->data;
        ob->priv.pending_writes = 
          eina_list_remove_list(ob->priv.pending_writes, ob->priv.pending_writes);

        rect = img->extended_info;

#ifdef EVAS_CSERVE2
        if (evas_cserve2_use_get())
          evas_cache2_image_close(&img->cache_entry);
        else
#endif
          evas_cache_image_drop(&img->cache_entry);

        eina_rectangle_free(rect);
     }

   _evas_outbuf_flush(ob, NULL, MODE_FULL);
   _evas_outbuf_idle_flush(ob);

   if (ob->surface) _evas_shm_surface_destroy(ob->surface);

   eina_array_flush(&ob->priv.onebuf_regions);

   free(ob);
}
Ejemplo n.º 2
0
EAPI void
eina_array_free(Eina_Array *array)
{
   eina_array_flush(array);

   EINA_SAFETY_ON_NULL_RETURN(array);
   EINA_MAGIC_CHECK_ARRAY(array);
   MAGIC_FREE(array);
}
Ejemplo n.º 3
0
void 
evas_software_xcb_outbuf_free(Outbuf *buf) 
{
   while (buf->priv.pending_writes) 
     {
        RGBA_Image *im = NULL;
        Outbuf_Region *obr = NULL;

        im = buf->priv.pending_writes->data;
        buf->priv.pending_writes = 
          eina_list_remove_list(buf->priv.pending_writes, 
                                buf->priv.pending_writes);
        obr = im->extended_info;
#ifdef EVAS_CSERVE2
        if (evas_cserve2_use_get())
          evas_cache2_image_close(&im->cache_entry);
        else
#endif
          evas_cache_image_drop(&im->cache_entry);

        if (obr->xcbob) _unfind_xcbob(obr->xcbob, EINA_FALSE);
        if (obr->mask) _unfind_xcbob(obr->mask, EINA_FALSE);
        free(obr);
     }

   evas_software_xcb_outbuf_idle_flush(buf);
   evas_software_xcb_outbuf_flush(buf, NULL, MODE_FULL);

   if (buf->priv.x11.xcb.gc)
     xcb_free_gc(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.gc);
   if (buf->priv.x11.xcb.gcm)
     xcb_free_gc(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.gcm);
   if (buf->priv.pal)
     evas_software_xcb_color_deallocate(buf->priv.x11.xcb.conn, 
                                        buf->priv.x11.xcb.cmap, 
                                        buf->priv.x11.xcb.visual, 
                                        buf->priv.pal);

   eina_array_flush(&buf->priv.onebuf_regions);

   free(buf);
   _clear_xcbob(EINA_FALSE);
}