+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <pixman.h>
+
+#ifdef EVAS_CSERVE2
+# include "evas_cs2_private.h"
+#endif
#include "evas_common.h"
#include "evas_macros.h"
#include "evas_xcb_outbuf.h"
#include "evas_xcb_buffer.h"
#include "evas_xcb_color.h"
-#include <pixman.h>
/* local structures */
typedef struct _Outbuf_Region Outbuf_Region;
eina_list_remove_list(buf->priv.pending_writes,
buf->priv.pending_writes);
obr = im->extended_info;
- evas_cache_image_drop(&im->cache_entry);
+#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);
free(obr);
return NULL;
}
- im =
- (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
- buf->w, buf->h,
- (DATA32 *)evas_software_xcb_output_buffer_data(obr->xcbob, &bpl),
- alpha, EVAS_COLORSPACE_ARGB8888);
+#ifdef EVAS_CSERVE2
+ if (evas_cserve2_use_get())
+ {
+ im =
+ (RGBA_Image *)evas_cache2_image_data(evas_common_image_cache2_get(),
+ buf->w, buf->h,
+ (DATA32 *)evas_software_xcb_output_buffer_data(obr->xcbob, &bpl),
+ alpha, EVAS_COLORSPACE_ARGB8888);
+ }
+ else
+#endif
+ {
+ im =
+ (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
+ buf->w, buf->h,
+ (DATA32 *)evas_software_xcb_output_buffer_data(obr->xcbob, &bpl),
+ alpha, EVAS_COLORSPACE_ARGB8888);
+ }
+
if (!im)
{
evas_software_xcb_output_buffer_free(obr->xcbob, EINA_FALSE);
{
int bw = 0, bh = 0;
- im =
- (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
+#ifdef EVAS_CSERVE2
+ if (evas_cserve2_use_get())
+ {
+ im =
+ (RGBA_Image *)evas_cache2_image_empty(evas_common_image_cache2_get());
+ }
+ else
+#endif
+ {
+ im =
+ (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
+ }
+
if (!im)
{
free(obr);
return NULL;
}
im->cache_entry.flags.alpha |= (alpha ? 1 : 0);
- evas_cache_image_surface_alloc(&im->cache_entry, buf->w, buf->h);
+#ifdef EVAS_CSERVE2
+ if (evas_cserve2_use_get())
+ evas_cache2_image_surface_alloc(&im->cache_entry, buf->w, buf->h);
+ else
+#endif
+ evas_cache_image_surface_alloc(&im->cache_entry, buf->w, buf->h);
+
im->extended_info = obr;
if ((buf->rot == 0) || (buf->rot == 180))
{
bw, bh, use_shm, NULL);
if (!obr->xcbob)
{
- evas_cache_image_drop(&im->cache_entry);
+#ifdef EVAS_CSERVE2
+ if (evas_cserve2_use_get())
+ evas_cache2_image_close(&im->cache_entry);
+ else
+#endif
+ evas_cache_image_drop(&im->cache_entry);
+
free(obr);
return NULL;
}
free(obr);
return NULL;
}
- im =
- (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
- w, h,
- (DATA32 *)evas_software_xcb_output_buffer_data(obr->xcbob, &bpl),
- alpha, EVAS_COLORSPACE_ARGB8888);
+#ifdef EVAS_CSERVE2
+ if (evas_cserve2_use_get())
+ {
+ im =
+ (RGBA_Image *)evas_cache2_image_data(evas_common_image_cache2_get(),
+ w, h,
+ (DATA32 *)evas_software_xcb_output_buffer_data(obr->xcbob, &bpl),
+ alpha, EVAS_COLORSPACE_ARGB8888);
+ }
+ else
+#endif
+ {
+ im =
+ (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
+ w, h,
+ (DATA32 *)evas_software_xcb_output_buffer_data(obr->xcbob, &bpl),
+ alpha, EVAS_COLORSPACE_ARGB8888);
+ }
+
if (!im)
{
_unfind_xcbob(obr->xcbob, EINA_FALSE);
{
int bw = 0, bh = 0;
- im =
- (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
+#ifdef EVAS_CSERVE2
+ if (evas_cserve2_use_get())
+ {
+ im =
+ (RGBA_Image *)evas_cache2_image_empty(evas_common_image_cache2_get());
+ }
+ else
+#endif
+ {
+ im =
+ (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
+ }
+
if (!im)
{
free(obr);
return NULL;
}
im->cache_entry.flags.alpha |= (alpha ? 1 : 0);
- evas_cache_image_surface_alloc(&im->cache_entry, w, h);
+#ifdef EVAS_CSERVE2
+ if (evas_cserve2_use_get())
+ evas_cache2_image_surface_alloc(&im->cache_entry, w, h);
+ else
+#endif
+ evas_cache_image_surface_alloc(&im->cache_entry, w, h);
+
im->extended_info = obr;
if ((buf->rot == 0) || (buf->rot == 180))
{
buf->priv.x11.xcb.depth, bw, bh, use_shm, NULL);
if (!obr->xcbob)
{
- evas_cache_image_drop(&im->cache_entry);
+#ifdef EVAS_CSERVE2
+ if (evas_cserve2_use_get())
+ evas_cache2_image_close(&im->cache_entry);
+ else
+#endif
+ evas_cache_image_drop(&im->cache_entry);
free(obr);
return NULL;
}
eina_list_remove_list(buf->priv.prev_pending_writes,
buf->priv.prev_pending_writes);
obr = im->extended_info;
- evas_cache_image_drop(&im->cache_entry);
+# 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);
eina_list_remove_list(buf->priv.pending_writes,
buf->priv.pending_writes);
obr = im->extended_info;
- evas_cache_image_drop(&im->cache_entry);
+# 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_cache_image_drop(&im->cache_entry);
+# ifdef EVAS_CSERVE2
+ if (evas_cserve2_use_get())
+ evas_cache2_image_close(&im->cache_entry);
+ else
+# endif
+ evas_cache_image_drop(&im->cache_entry);
}
#endif
}
if (obr->mask)
evas_software_xcb_output_buffer_free(obr->mask, EINA_FALSE);
free(obr);
- evas_cache_image_drop(&im->cache_entry);
+# ifdef EVAS_CSERVE2
+ if (evas_cserve2_use_get())
+ evas_cache2_image_close(&im->cache_entry);
+ else
+# endif
+ evas_cache_image_drop(&im->cache_entry);
}
else
{
eina_list_remove_list(buf->priv.prev_pending_writes,
buf->priv.prev_pending_writes);
obr = im->extended_info;
- evas_cache_image_drop(&im->cache_entry);
+# 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);