#include "Evas.h"
#include "evas_cs.h"
-#define D(...) EINA_LOG_DBG(__VA_ARGS__)
+#define D(...) EINA_LOG_DOM_DBG(_evas_cserve_bin_log_dom, __VA_ARGS__)
#ifdef ERR
#undef ERR
#endif
#ifdef CSERVE_BIN_DEFAULT_COLOR
#undef CSERVE_BIN_DEFAULT_COLOR
#endif
-#define CSERVE_BIN_DEFAULT_COLOR "\033[36m"
+#define CSERVE_BIN_DEFAULT_COLOR EINA_COLOR_BLUE
// fixme:'s
//
// preload - make it work (both)
if (e->pointer.mouse_grabbed < 0)
{
- ERROR("BUG? e->pointer.mouse_grabbed (=%d) < 0!",
+ ERR("BUG? e->pointer.mouse_grabbed (=%d) < 0!",
e->pointer.mouse_grabbed);
}
if ((e->pointer.button == 0) && (e->pointer.mouse_grabbed != 0))
{
- INFO("restore to 0 grabs (from %i)", e->pointer.mouse_grabbed);
+ INF("restore to 0 grabs (from %i)", e->pointer.mouse_grabbed);
e->pointer.mouse_grabbed = 0;
}
_evas_unwalk(e);
set = FcFontSort(NULL, p_nm, FcTrue, NULL, &res);
if (!set)
{
- ERROR("No fontconfig font matches '%s'. It was the last resource, no font found!", name);
+ ERR("No fontconfig font matches '%s'. It was the last resource, no font found!", name);
goto fc_end;
}
_evas_log_dom_global = eina_log_domain_register("evas_main",EVAS_DEFAULT_LOG_COLOR);
if (_evas_log_dom_global < 0)
{
- fprintf(stderr,"Error: Evas could not create a default log domain\n");
+ EINA_LOG_ERR("Evas could not create a default log domain\n");
goto shutdown_eina;
}
if (h <= 0) return;
if ((x != 0) || (y != 0))
{
- ERROR("EVAS: compat error. viewport x,y != 0,0 not supported");
+ ERR("Compat error. viewport x,y != 0,0 not supported");
x = 0;
y = 0;
}
EVAS_OBJECT_BOX_DATA_GET(o, ptr); \
if (!ptr) \
{ \
- CRITICAL("no widget data for object %p (%s)", \
+ CRIT("no widget data for object %p (%s)", \
o, evas_object_type_get(o)); \
fflush(stderr); \
abort(); \
EVAS_OBJECT_BOX_DATA_GET(o, ptr); \
if (!ptr) \
{ \
- CRITICAL("no widget data for object %p (%s)", \
+ CRIT("no widget data for object %p (%s)", \
o, evas_object_type_get(o)); \
fflush(stderr); \
abort(); \
if ((!api) || (!api->option_free))
{
- fputs("WARNING: api->option_free not set (may cause memory leaks,"
- " segfaults)\n", stderr);
+ WRN("api->option_free not set (may cause memory leaks,"
+ " segfaults)\n");
return NULL;
}
node = eina_list_nth_list(priv->children, pos);
if (!node)
{
- ERROR("ERROR: no item to be removed at position %d\n", pos);
+ ERR("No item to be removed at position %d\n", pos);
return NULL;
}
priv = (Evas_Object_Box_Data *)calloc(1, sizeof(*priv));
if (!priv)
{
- fputs("ERROR: could not allocate object private data.\n", stderr);
+ ERR("Could not allocate object private data.\n");
return;
}
api = priv->api;
if ((!api) || (!api->option_free))
{
- fputs("WARNING: api->option_free not set (may cause memory leaks,"
- " segfaults)\n", stderr);
+ WRN("api->option_free not set (may cause memory leaks,"
+ " segfaults)\n");
return;
}
if (priv->layout.cb)
priv->layout.cb(o, priv, priv->layout.data);
else
- ERROR("No layout function set for %p box.", o);
+ ERR("No layout function set for %p box.", o);
}
static Evas_Smart *
if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1))
{
- ERROR("evas image: %p has invalid fill size: %dx%d. Ignored",
+ ERR("%p has invalid fill size: %dx%d. Ignored",
obj, o->cur.fill.w, o->cur.fill.h);
return;
}
if (obj->delete_me)
{
- ERROR("Adding deleted object %p to smart obj %p", obj, smart_obj);
+ CRIT("Adding deleted object %p to smart obj %p", obj, smart_obj);
abort();
return;
}
if (smart_obj->delete_me)
{
- ERROR("Adding object %p to deleted smart obj %p", obj, smart_obj);
+ CRIT("Adding object %p to deleted smart obj %p", obj, smart_obj);
abort();
return;
}
if (!smart_obj->layer)
{
- ERROR("No evas surface associated with smart object (%p)", smart_obj);
+ CRIT("No evas surface associated with smart object (%p)", smart_obj);
abort();
return;
}
if (obj->layer && smart_obj->layer
&& obj->layer->evas != smart_obj->layer->evas)
{
- ERROR("EVAS ERROR: Adding object %p from Evas (%p) from another Evas (%p)", obj, obj->layer->evas, smart_obj->layer->evas);
+ CRIT("Adding object %p from Evas (%p) from another Evas (%p)", obj, obj->layer->evas, smart_obj->layer->evas);
abort();
return;
}
EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \
if (!ptr) \
{ \
- CRITICAL("CRITICAL: no widget data for object %p (%s)", \
- o, evas_object_type_get(o)); \
+ CRIT("no widget data for object %p (%s)", \
+ o, evas_object_type_get(o)); \
abort(); \
return; \
}
EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \
if (!ptr) \
{ \
- CRITICAL("No widget data for object %p (%s)", \
+ CRIT("No widget data for object %p (%s)", \
o, evas_object_type_get(o)); \
abort(); \
return val; \
cache = malloc(size);
if (!cache)
{
- ERROR("Could not allocate table cache %dx%d (%d bytes): %s",
+ ERR("Could not allocate table cache %dx%d (%d bytes): %s",
cols, rows, size, strerror(errno));
return NULL;
}
/* } */
/* else if (min < 1) */
/* { */
-/* WARN("Child %p [%s, %s] has no minimum width " */
+/* WRN("Child %p [%s, %s] has no minimum width " */
/* "and no %s expand (weight is not > 0.0). " */
/* "Assuming weight > 0.0\n", */
/* child, evas_object_type_get(child), evas_object_name_get(child), */
{
if (o_minw < 1)
{
- ERROR("homogeneous table based on item size but no "
+ ERR("homogeneous table based on item size but no "
"horizontal mininum size specified! Using expand.");
expand_h = 1;
}
if (o_minh < 1)
{
- ERROR("homogeneous table based on item size but no "
+ ERR("homogeneous table based on item size but no "
"vertical mininum size specified! Using expand.");
expand_v = 1;
}
cols = malloc(size);
if (!cols)
{
- ERROR("Could not allocate temp columns (%d bytes): %s",
+ ERR("Could not allocate temp columns (%d bytes): %s",
size, strerror(errno));
return;
}
rows = malloc(size);
if (!rows)
{
- ERROR("could not allocate temp rows (%d bytes): %s",
+ ERR("could not allocate temp rows (%d bytes): %s",
size, strerror(errno));
goto end;
}
priv = calloc(1, sizeof(*priv));
if (!priv)
{
- ERROR("could not allocate object private data.");
+ ERR("could not allocate object private data.");
return;
}
evas_object_smart_data_set(o, priv);
if ((priv->size.cols < 1) || (priv->size.rows < 1))
{
- DEBUG("Nothing to do: cols=%d, rows=%d",
+ DBG("Nothing to do: cols=%d, rows=%d",
priv->size.cols, priv->size.rows);
return;
}
if (rowspan < 1)
{
- ERROR("rowspan < 1");
+ ERR("rowspan < 1");
return EINA_FALSE;
}
if (colspan < 1)
{
- ERROR("colspan < 1");
+ ERR("colspan < 1");
return EINA_FALSE;
}
opt = _evas_object_table_option_get(child);
if (opt)
{
- ERROR("cannot add object that is already part of a table!");
+ ERR("cannot add object that is already part of a table!");
return EINA_FALSE;
}
opt = malloc(sizeof(*opt));
if (!opt)
{
- ERROR("could not allocate table option data.");
+ ERR("could not allocate table option data.");
return EINA_FALSE;
}
if (o != evas_object_smart_parent_get(child))
{
- ERROR("cannot unpack child from incorrect table!");
+ ERR("cannot unpack child from incorrect table!");
return EINA_FALSE;
}
opt = _evas_object_table_option_del(child);
if (!opt)
{
- ERROR("cannot unpack child with no packing option!");
+ ERR("cannot unpack child with no packing option!");
return EINA_FALSE;
}
}
if ((e->output.w != e->viewport.w) || (e->output.h != e->viewport.h))
{
- ERROR("viewport size != output size!");
+ ERR("viewport size != output size!");
}
/* phase 5. add obscures */
EINA_LIST_FOREACH(e->obscures, ll, r)
Evas_Smart *s;
Evas_Smart_Class *sc;
- WARN("----- WARNING. evas_smart_new() will be deprecated and removed soon"
+ WRN("----- WARNING. evas_smart_new() will be deprecated and removed soon"
"----- Please use evas_smart_class_new() instead");
if (!name) return NULL;
{
if (obj->smart.parent != above->smart.parent)
{
-// ERROR("BITCH! evas_object_stack_above(), %p not inside same smart as %p!", obj, above);
+// ERR("BITCH! evas_object_stack_above(), %p not inside same smart as %p!", obj, above);
return;
}
evas_object_smart_member_stack_above(obj, above);
{
if (obj->smart.parent != below->smart.parent)
{
-// ERROR("BITCH! evas_object_stack_below(), %p not inside same smart as %p!", obj, below);
+// ERR("BITCH! evas_object_stack_below(), %p not inside same smart as %p!", obj, below);
return;
}
evas_object_smart_member_stack_below(obj, below);
if ((*size < 0) || (*size > (1024 * 1024))) return NULL;
if (ints[2] != (s->ch[channel].req_from + 1))
{
- ERROR("EEK! sequence number mismatch from serer with pid: %i\n"
+ ERR("EEK! sequence number mismatch from serer with pid: %i\n"
"---- num %i is not 1 more than %i"
,
s->pid, ints[2], s->ch[channel].req_from);
data = c->inbuf + (sizeof(int) * 3);
if (ints[2] != (c->req_from + 1))
{
- ERROR("EEK! sequence number mismatch from client with pid: %i\n"
+ ERR("EEK! sequence number mismatch from client with pid: %i\n"
"---- num %i is not 1 more than %i"
,
c->pid, ints[2], c->req_from);
}
#endif
}
- INFO("depth = %i mode = %i", depth, pal_mode);
+ INF("depth = %i mode = %i", depth, pal_mode);
if (depth == 8)
{
#ifdef BUILD_CONVERT_8_RGB_332
dst_ptr = (DATA16 *)dst;
- ERROR("evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180");
+ ERR("evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180");
CONVERT_LOOP_START_ROT_180();
if (cpu_feature_mask & CPU_FEATURE_MMX2) do_sse = 1;
if (cpu_feature_mask & CPU_FEATURE_SSE) do_sse = 1;
}
-// INFO("%i %i %i", do_mmx, do_sse, do_sse2);
+// INF("%i %i %i", do_mmx, do_sse, do_sse2);
*mmx = do_mmx;
*sse = do_sse;
*sse2 = do_sse2;
fg = evas_common_font_int_cache_glyph_get(fi, index);
if (!fg) return 0;
/*
- INFO("fg->glyph_out->left = %i\n"
+ INF("fg->glyph_out->left = %i\n"
"fi->src->ft.face->glyph->bitmap_left = %i\n"
"fi->src->ft.face->glyph->metrics.horiBearingX = %i\n"
"fi->src->ft.face->glyph->metrics.horiBearingY = %i\n"
static void
_evas_common_rgba_image_debug(const char* context, Image_Entry *eim)
{
- DEBUG("%p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h);
+ DBG("%p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h);
}
static const Evas_Cache_Image_Func _evas_common_image_func =
if (!eci)
eci = evas_cache_image_init(&_evas_common_image_func);
reference++;
-//// ERROR("REF++=%i", reference);
+//// ERR("REF++=%i", reference);
#ifdef BUILD_LOADER_EET
eet_init();
im->cache.list = eina_list_remove(im->cache.list, sci);
if (sci->im)
{
-// INFO(" 0- %i", sci->dst_w * sci->dst_h * 4);
+// INF(" 0- %i", sci->dst_w * sci->dst_h * 4);
LKL(cache_lock);
evas_common_rgba_image_free(&sci->im->cache_entry);
if (!sci->forced_unload)
if (sci->usage_count > im->cache.newest_usage_count)
im->cache.newest_usage_count = sci->usage_count;
}
-// INFO("_sci_fix_newest! -> %i", im->cache.newest_usage);
+// INF("_sci_fix_newest! -> %i", im->cache.newest_usage);
}
static Scaleitem *
cache_size -= sci->dst_w * sci->dst_h * 4;
else
cache_size -= sci->size_adjust;
-// INFO(" 1- %i", sci->dst_w * sci->dst_h * 4);
+// INF(" 1- %i", sci->dst_w * sci->dst_h * 4);
cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
}
if (max_scale_items < 1) return NULL;
cache_size -= sci->dst_w * sci->dst_h * 4;
else
cache_size -= sci->size_adjust;
-// INFO(" 2- %i", sci->dst_w * sci->dst_h * 4);
+// INF(" 2- %i", sci->dst_w * sci->dst_h * 4);
cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
memset(sci, 0, sizeof(Eina_Inlist));
}
-// INFO("FLUSH %i > %i", cache_size, max_cache_size);
+// INF("FLUSH %i > %i", cache_size, max_cache_size);
}
}
#endif
LKU(im->cache.lock);
return;
}
-// INFO("%10i | %4i %4i %4ix%4i -> %4i %4i %4ix%4i | %i",
+// INF("%10i | %4i %4i %4ix%4i -> %4i %4i %4ix%4i | %i",
// (int)use_counter,
// src_region_x, src_region_y, src_region_w, src_region_h,
// dst_region_x, dst_region_y, dst_region_w, dst_region_h,
LKU(cache_lock);
if (sci->usage > im->cache.newest_usage)
im->cache.newest_usage = sci->usage;
-// INFO("newset? %p %i > %i", im,
+// INF("newset? %p %i > %i", im,
// (int)sci->usage,
// (int)im->cache.newest_usage);
if (sci->usage_count > im->cache.newest_usage_count)
im->cache.newest_usage_count = sci->usage_count;
-// INFO(" -------------- used %8i#, %8i@", (int)sci->usage, (int)sci->usage_count);
+// INF(" -------------- used %8i#, %8i@", (int)sci->usage, (int)sci->usage_count);
LKU(im->cache.lock);
#endif
}
i++;
if (i > 2000)
{
- INFO("p: %6i, h: %6i, m: %6i, n: %6i",
+ INF("p: %6i, h: %6i, m: %6i, n: %6i",
pops, hits, misses, noscales);
i = 0;
}
}
if (sci->populate_me)
{
-// INFO("##! populate!");
+// INF("##! populate!");
sci->im = evas_common_image_new
(dst_region_w, dst_region_h, im->cache_entry.flags.alpha);
if (sci->im)
{
cache_size += sci->dst_w * sci->dst_h * 4;
}
-// INFO(" + %i @ flop: %i (%ix%i)",
+// INF(" + %i @ flop: %i (%ix%i)",
// sci->dst_w * sci->dst_h * 4, sci->flop,
// sci->dst_w, sci->dst_h);
cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci);
{
if (sci->flop > 0) sci->flop -= FLOP_DEL;
}
-// INFO("use cached!");
+// INF("use cached!");
evas_common_scale_rgba_in_to_out_clip_sample
(sci->im, dst, dc,
0, 0,
dst_region_x, dst_region_y,
dst_region_w, dst_region_h);
// hits++;
-// INFO("check %p %i < %i",
+// INF("check %p %i < %i",
// im,
// (int)im->cache.orig_usage,
// (int)im->cache.newest_usage);
{
Thinfo *thinfo;
-// INFO("TH [...........");
+// INF("TH [...........");
thinfo = data;
for (;;)
{
RGBA_Pipe *p;
/* wait for start signal */
-// INFO(" TH %i START...", thinfo->thread_num);
+// INF(" TH %i START...", thinfo->thread_num);
pthread_barrier_wait(&(thinfo->barrier[0]));
info = thinfo->info;
// if (info)
// {
// thinfo->info = NULL;
-// INFO(" TH %i GO", thinfo->thread_num);
+// INF(" TH %i GO", thinfo->thread_num);
EINA_INLIST_FOREACH(EINA_INLIST_GET(info->im->pipe), p)
{
int i;
}
free(info);
// }
-// INFO(" TH %i DONE", thinfo->thread_num);
+// INF(" TH %i DONE", thinfo->thread_num);
/* send finished signal */
pthread_barrier_wait(&(thinfo->barrier[1]));
}
void
rect_print(const rect_t r)
{
- INFO("<rect(%d, %d, %d, %d)>", r.left, r.top, r.width, r.height);
+ INF("<rect(%d, %d, %d, %d)>", r.left, r.top, r.width, r.height);
}
void
*/
/* prev_cur_node = cur_node; */
/* cur_node = cur_node->next; */
- WARN("Should not get here!");
+ WRN("Should not get here!");
abort();
}
rn = (rect_node_t *)rect_list_node_pool_get();
rn->_lst = list_node_zeroed;
rect_init(&rn->rect, x, y, w, h);
- //INFO(stderr, "ACCOUNTING: add_redraw: %4d,%4d %3dx%3d", x, y, w, h);
+ //INF("ACCOUNTING: add_redraw: %4d,%4d %3dx%3d", x, y, w, h);
//testing on my core2 duo desktop - fuzz of 32 or 48 is best.
#define FUZZ 32
rect_list_add_split_fuzzy_and_merge(rects, (list_node_t *)rn,
if ((w <= 0) || (h <= 0)) return 0;
rect_init(&r, x, y, w, h);
- //ERROR("ACCOUNTING: del_redraw: %4d,%4d %3dx%3d", x, y, w, h);
+ //ERR("ACCOUNTING: del_redraw: %4d,%4d %3dx%3d", x, y, w, h);
rect_list_del_split_strict(&tb->rects, r);
tb->need_merge = 1;
_soft16_image_draw_scaled_solid_solid
(src, dst, dc, dst_offset, w, h, offset_x, offset_y);
else
- ERROR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
+ ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
"dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
}
_soft16_image_draw_scaled_solid_solid_mul_alpha
(src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
else
- ERROR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
+ ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
"dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col));
}
_soft16_image_draw_scaled_solid_solid_mul_color
(src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
else
- ERROR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
+ ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
"dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col);
}
src_offset, dst_offset,
width, height);
else
- ERROR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
+ ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
"dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
}
_soft16_image_draw_unscaled_solid_solid_mul_alpha
(src, dst, dc, src_offset, dst_offset, width, height, a);
else
- ERROR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
+ ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
"dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col));
}
_soft16_image_draw_unscaled_solid_solid_mul_color
(src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a);
else
- ERROR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
+ ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
"dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col);
}
/* static void */
/* _evas_common_soft16_image_debug(const char* context, Image_Entry *eim) */
/* { */
-/* DEBUG("[16] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); */
+/* DBG("[16] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); */
/* } */
static const Evas_Cache_Image_Func _evas_common_soft16_image_func =
(dst, dst_offset, dr.w, dr.h, rgb565, alpha);
}
else
- ERROR("Unsupported feature: drawing rectangle to non-opaque destination.");
+ ERR("Unsupported feature: drawing rectangle to non-opaque destination.");
}
void
/* macros needed to log message through eina_log */
extern EAPI int _evas_log_dom_global;
-#ifdef _EVAS_DEFAULT_MODULE_LOG_DOM
-# undef _EVAS_DEFAULT_MODULE_LOG_DOM
+#ifdef _EVAS_DEFAULT_LOG_DOM
+# undef _EVAS_DEFAULT_LOG_DOM
#endif
-#define _EVAS_DEFAULT_MODULE_LOG_DOM _evas_log_dom_global
+#define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global
#ifdef EVAS_DEFAULT_LOG_COLOR
# undef EVAS_DEFAULT_LOG_COLOR
#endif
-#define EVAS_DEFAULT_LOG_COLOR "\033[36m"
-#ifdef ERROR
-# undef ERROR
-#endif
-#define ERROR(...) EINA_LOG_DOM_ERR(_evas_log_dom_global, __VA_ARGS__)
-#ifdef DEBUG
-# undef DEBUG
-#endif
-#define DEBUG(...) EINA_LOG_DOM_DBG(_evas_log_dom_global, __VA_ARGS__)
-#ifdef INFO
-# undef INFO
-#endif
-#define INFO(...) EINA_LOG_DOM_INFO(_evas_log_dom_global, __VA_ARGS__)
-#ifdef WARN
-# undef WARN
-#endif
-#define WARN(...) EINA_LOG_DOM_WARN(_evas_log_dom_global, __VA_ARGS__)
-#ifdef CRITICAL
-# undef CRITICAL
-#endif
-#define CRITICAL(...) EINA_LOG_DOM_CRIT(_evas_log_dom_global, __VA_ARGS__)
-/**
- * macros that are used all around the code for message processing
- * four macros are defined ERR, WRN, DGB, INF.
- * EFREET_MODULE_LOG_DOM should be defined individually for each module
- */
+#define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
#ifdef ERR
# undef ERR
#endif
-#define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
+
#ifdef DBG
# undef DBG
#endif
-#define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
+#define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
+
#ifdef INF
# undef INF
#endif
-#define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT__MODULE_LOG_DOM, __VA_ARGS__)
+#define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
+
#ifdef WRN
# undef WRN
#endif
-#define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
+#define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
+
#ifdef CRIT
# undef CRIT
#endif
-#define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
+#define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
/*****************************************************************************/
_evas_debug_init = 1;
}
if (_evas_debug_show)
- DEBUG("*** EVAS ERROR: Evas Magic Check Failed!!!");
+ DBG("*** EVAS ERROR: Evas Magic Check Failed!!!");
}
void
_evas_debug_init = 1;
}
if (_evas_debug_show)
- DEBUG("Input object pointer is NULL!");
+ DBG("Input object pointer is NULL!");
if (_evas_debug_abort) abort();
}
_evas_debug_init = 1;
}
if (_evas_debug_show)
- DEBUG("Input object is zero'ed out (maybe a freed object or zero-filled RAM)!");
+ DBG("Input object is zero'ed out (maybe a freed object or zero-filled RAM)!");
if (_evas_debug_abort) abort();
}
_evas_debug_init = 1;
}
if (_evas_debug_show)
- DEBUG(" Input object is wrong type\n"
+ DBG(" Input object is wrong type\n"
" Expected: %08x - %s\n"
" Supplied: %08x - %s",
expected, evas_debug_magic_string_get(expected),
_evas_debug_init = 1;
}
if (_evas_debug_show)
- DEBUG("*** EVAS ERROR:\n"
+ DBG("*** EVAS ERROR:\n"
"%s", (char *)str);
if (_evas_debug_abort) abort();
}
#include "evas_engine.h"
#include "Evas_Engine_Buffer.h"
+/* domain for eina_log */
+/* the log macros are defined in evas_common.h */
+/* theirs names are EVAS_ERR, EVAS_DBG, EVAS_CRIT, EVAS_WRN and EVAS_INF */
+/* although we can use the EVAS_ERROR, etc... macros it will not work
+ when the -fvisibility=hidden option is passed to gcc */
+
+int _evas_engine_buffer_log_dom = -1;
+
/* function tables - filled in later (func and parent func) */
+
static Evas_Func func, pfunc;
+
/* engine struct data */
typedef struct _Render_Engine Render_Engine;
evas_common_tilebuf_init();
evas_buffer_outbuf_buf_init();
-
+
{
Outbuf_Depth dep;
DATA32 color_key = 0;
eng_info(Evas *e)
{
Evas_Engine_Info_Buffer *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_Buffer));
if (!info) return NULL;
info->magic.magic = rand();
eng_info_free(Evas *e __UNUSED__, void *info)
{
Evas_Engine_Info_Buffer *in;
-
in = (Evas_Engine_Info_Buffer *)info;
free(in);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+
+ _evas_engine_buffer_log_dom = eina_log_domain_register("EvasBufferEngine", EINA_COLOR_BLUE);
+ if(_evas_engine_buffer_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for Eina.buffer.\n");
+ return 0;
+ }
+
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_engine_buffer_log_dom);
}
static Evas_Module_Api evas_modapi =
#ifndef EVAS_ENGINE_H
#define EVAS_ENGINE_H
+#include "evas_common.h"
+/* this thing is for eina_log */
+extern int _evas_engine_buffer_log_dom ;
+
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_buffer_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_buffer_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_buffer_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_buffer_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_buffer_log_dom, __VA_ARGS__)
typedef struct _Outbuf Outbuf;
#include "Evas_Engine_Cairo_X11.h"
#include "evas_cairo_common.h"
+/* domain for eina_log */
+int _evas_engine_cairo_X11_log_dom = -1;
+
static void *eng_info(Evas *e);
static void eng_info_free(Evas *e, void *info);
static int eng_setup(Evas *e, void *info);
eng_info(Evas *e)
{
Evas_Engine_Info_Cairo_X11 *info;
-
+ INF("CAIRO: create info...");
info = calloc(1, sizeof(Evas_Engine_Info_Cairo_X11));
if (!info) return NULL;
- info->magic.magic = rand();
- INFO("CAIRO: create info...");
+ info->magic.magic = rand();
return info;
e = NULL;
}
eng_info_free(Evas *e, void *info)
{
Evas_Engine_Info_Cairo_X11 *in;
-
in = (Evas_Engine_Info_Cairo_X11 *)info;
free(in);
}
Evas_Engine_Info_Cairo_X11 *info;
info = (Evas_Engine_Info_Cairo_X11 *)in;
- INFO("CAIRO: setup info...");
+ INF("CAIRO: setup info...");
if (!e->engine.data.output)
e->engine.data.output =
eng_output_setup(e->output.w,
free(re);
return NULL;
}
- INFO("CAIRO: cairo window setup done.");
+ INF("CAIRO: cairo window setup done.");
evas_common_cpu_init();
evas_common_blend_init();
module_open(Evas_Module *em)
{
if (!em) return 0;
+ _evas_engine_cairo_X11_log_dom = eina_log_domain_register("EvasCairoX11Engine", EINA_COLOR_BLUE);
+ if(_evas_engine_cairo_X11_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log doamin for the cairo (X11) engine.\n");
+ return 0;
+ }
em->functions = (void *)(&eng_func);
return 1;
}
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_engine_cairo_X11_log_dom);
}
static Evas_Module_Api evas_modapi =
#ifndef EVAS_ENGINE_H
#define EVAS_ENGINE_H
-
+#include "evas_common.h"
#include "evas_cairo_common.h"
+extern int _evas_engine_cairo_X11_log_dom ;
+
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
+
+
typedef struct _Evas_Cairo_X11_Window Evas_Cairo_X11_Window;
struct _Evas_Cairo_X11_Window
if (FAILED(hr = _object->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &dm)))
{
- Log("GetAdapterDisplayMode failed: %x", hr);
- Destroy();
- return false;
+ ERR("GetAdapterDisplayMode failed: %x", hr);
+ Destroy();
+ return false;
}
if (FAILED(hr = _object->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &caps)))
{
- Log("GetDeviceCaps failed: %x", hr);
+ ERR("GetDeviceCaps failed: %x", hr);
Destroy();
return false;
}
if (!GetClientRect(window, &rect))
{
- Log("GetClientRect failed: %x", GetLastError());
+ ERR("GetClientRect failed: %x", GetLastError());
Destroy();
return false;
}
if (FAILED(hr = _object->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
window, flag, &pp, &_device)))
{
- Log("CreateDevice failed: %x", hr);
+ WRN("CreateDevice failed: %x", hr);
Destroy();
return false;
}
_depth = 16;
break;
default:
- Log("No supported format found");
+ WRN("No supported format found");
Destroy();
return false;
}
if (FAILED(CreateRenderTarget()))
{
- Log("Failed to create render target");
+ ERR("Failed to create render target");
Destroy();
return false;
}
_d3dpp.Windowed = (fullscreen == 1) ? FALSE : ((fullscreen == 0) ? TRUE : _d3dpp.Windowed);
if (FAILED(ResetDevice()))
{
- Log("Couldnt restore device");
+ WRN("Couldnt restore device");
_d3dpp = pp;
return SUCCEEDED(ResetDevice());
}
_object->Release();
ResetParams();
- Log("uninitialized");
+ INF("uninitialized");
}
void D3DDevice::ResetParams()
if (SUCCEEDED(hr = _device->TestCooperativeLevel()))
{
_device_lost = FALSE;
- Log("render test ok");
+ DBG("render test ok");
return S_OK;
}
HRESULT D3DDevice::ResetDevice()
{
- Log("reset");
+ DBG("reset");
HRESULT hr = S_OK;
_scene_rendering = FALSE;
// Reset the device
if (FAILED(hr = _device->Reset(&_d3dpp)))
{
- Log("D3DDevice: Reset of the device failed! Error (%X)", (DWORD)hr);
+ ERR("D3DDevice: Reset of the device failed! Error (%X)", (DWORD)hr);
return hr;
}
if (FAILED(hr))
{
- Log("Restoration of device objects failed");
+ WRN("Restoration of device objects failed");
// Invalidate objects
return E_FAIL;
}
- Log("Device objects were successfuly restored");
+ DBG("Device objects were successfuly restored");
_textures.Set(NULL);
//_device_objects_restored = true;
HRESULT hr;
if (FAILED(hr = _device->BeginScene()))
{
- Log("Cannot begin scene: %X", (DWORD)hr);
+ WRN("Cannot begin scene: %X", (DWORD)hr);
return false;
}
return _render_data;
if (FAILED(hr = _device->GetRenderTargetData(surf, _render_target_data)))
{
- Log("Failed to get render target data (%X)", (DWORD)hr);
+ WRN("Failed to get render target data (%X)", (DWORD)hr);
surf->Release();
return _render_data;
}
if (FAILED(hr = d3d->GetDevice()->CreateTexture(nw, nh, 0, 0, D3DFMT_A8R8G8B8,
D3DPOOL_MANAGED, &tex, NULL)))
{
- Log("Failed to create texture: %X", hr);
+ WRN("Failed to create texture: %X", hr);
return false;
}
assert(tex != NULL);
if (FAILED(hr = d3d->GetDevice()->CreateTexture(width, height, 0, 0, D3DFMT_A8R8G8B8,
D3DPOOL_MANAGED, &entry.texture, NULL)))
{
- Log("Failed to create texture: %X", hr);
+ WRN("Failed to create texture: %X", hr);
return false;
}
D3DLOCKED_RECT lr;
if (FAILED(entry.texture->LockRect(0, &lr, &rc, 0)))
{
- Log("Failed to lock texture");
+ WRN("Failed to lock texture");
return false;
}
if (FAILED(entry.texture->UnlockRect(0)))
{
- Log("Failed to unlock texture");
+ WRN("Failed to unlock texture");
return false;
}
return true;
D3DLOCKED_RECT lr;
if (FAILED(entry.texture->LockRect(0, &lr, &rc, D3DLOCK_READONLY)))
{
- Log("Failed to lock texture");
+ WRN("Failed to lock texture");
return false;
}
if (FAILED(entry.texture->UnlockRect(0)))
{
- Log("Failed to unlock texture");
+ WRN("Failed to unlock texture");
return false;
}
return true;
D3DLOCKED_RECT lr;
if (FAILED(entry.texture->LockRect(0, &lr, &rc, 0)))
{
- Log("Failed to lock texture");
+ WRN("Failed to lock texture");
return false;
}
if (FAILED(entry.texture->UnlockRect(0)))
{
- Log("Failed to unlock texture");
+ WRN("Failed to unlock texture");
return false;
}
return true;
D3DLOCKED_RECT lr;
if (FAILED(entry.texture->LockRect(0, &lr, &rc, 0)))
{
- Log("Failed to lock texture");
+ WRN("Failed to lock texture");
return false;
}
if (FAILED(entry.texture->UnlockRect(0)))
{
- Log("Failed to unlock texture");
+ WRN("Failed to unlock texture");
return false;
}
return true;
assert(dev_ptr != NULL);
if ((dev_ptr->dib.hdc = CreateCompatibleDC(NULL)) == NULL)
{
- Log("Failed to create compatible DC");
+ WRN("Failed to create compatible DC");
return false;
}
ZeroMemory(&dev_ptr->dib.info, sizeof(dev_ptr->dib.info));
if ((dev_ptr->dib.image = CreateDIBSection(dev_ptr->dib.hdc, &dev_ptr->dib.info,
DIB_RGB_COLORS, (void **)&dev_ptr->dib.data, NULL, 0)) == NULL)
{
- Log("Failed to create dib section");
+ WRN("Failed to create dib section");
DeleteDIBObjects(dev_ptr);
return false;
}
if (!D3DShaderPack::Current()->Initialize(device))
{
- Log("Failed to build shader pack");
+ ERR("Failed to build shader pack");
device->Destroy();
return NULL;
}
if (!D3DImageCache::Current()->CreateImage(device, device->GetWidth(), device->GetHeight(),
true, info))
{
- Log("Failed to create fonts image buffer");
+ WRN("Failed to create fonts image buffer");
return NULL;
}
dev_ptr->fonts_buffer_image_id = info.id;
dev_ptr->device = NULL;
delete dev_ptr;
- Log("uninitialized");
+ DBG("uninitialized");
}
void
D3DDevice *device = dev_ptr->device;
if (!device->Reset(width, height, -1))
{
- Log("Failed to resize");
+ ERR("Failed to resize");
return;
}
if (!D3DImageCache::Current()->ResizeImage(device, width, height,
dev_ptr->fonts_buffer_image_id))
{
- Log("Failed to resize fonts image buffer");
+ WRN("Failed to resize fonts image buffer");
}
if (dev_ptr->layered)
{
DeleteDIBObjects(dev_ptr);
if (!CreateDIBObjects(dev_ptr))
- Log("Failed to create dib objects");
+ WRN("Failed to create dib objects");
}
}
if (!device->Reset(width, height, fullscreen))
{
- Log("Failed to resize");
+ WRN("Failed to resize");
return;
}
if (!D3DImageCache::Current()->ResizeImage(device, width, height,
dev_ptr->fonts_buffer_image_id))
{
- Log("Failed to resize fonts image buffer");
+ WRN("Failed to resize fonts image buffer");
}
if (fullscreen == 0)
void
evas_direct3d_render_all(Direct3DDeviceHandler d3d)
{
- Log("render");
+ DBG("render");
assert(d3d != NULL);
DevicePtr *dev_ptr = SelectDevice(d3d);
D3DDevice *device = dev_ptr->device;
{
line = new D3DObjectLine();
scene->AddObject(line);
- Log("New line object (total objects: %d)", scene->GetObjectCount());
+ DBG("New line object (total objects: %d)", scene->GetObjectCount());
}
else
{
line->SetFree(false);
- Log("Line reused (object: %p)", line.Addr());
+ DBG("Line reused (object: %p)", line.Addr());
}
line->Setup(
{
rect = new D3DObjectRect();
scene->AddObject(rect);
- Log("New rect object (total objects: %d)", scene->GetObjectCount());
+ DBG("New rect object (total objects: %d)", scene->GetObjectCount());
}
else
{
rect->SetFree(false);
- Log("Rect reused (object: %p)", rect.Addr());
+ DBG("Rect reused (object: %p)", rect.Addr());
}
rect->Setup(
RGBA_Image *evas_image = evas_common_load_image_from_file(file, key, lo);
if (evas_image == NULL)
{
- Log("Failed to load image from %s", file);
+ WRN("Failed to load image from %s", file);
return NULL;
}
int image_width = evas_image->cache_entry.w;
image->SetFree(true);
scene->AddObject(image);
- Log("New image object (total objects: %d)", scene->GetObjectCount());
+ DBG("New image object (total objects: %d)", scene->GetObjectCount());
ImagePtr *ptr = new ImagePtr;
ptr->ref = image;
if (!D3DImageCache::Current()->InsertImage(device, image_data,
image_width, image_height, info))
{
- Log("Couldnt add image to the cache");
+ WRN("Couldnt add image to the cache");
return NULL;
}
char buf[64];
image->SetFree(true);
scene->AddObject(image);
- Log("New image object (total objects: %d)", scene->GetObjectCount());
+ DBG("New image object (total objects: %d)", scene->GetObjectCount());
ImagePtr *ptr = new ImagePtr;
ptr->ref = image;
return;
if (!image_ref->UpdateImageData(image_data))
- Log("Failed to update image data");
+ ERR("Failed to update image data");
}
void evas_direct3d_image_data_get(Direct3DDeviceHandler d3d, Direct3DImageHandler image,
{
images[i]->CopyTo(image_ref);
found = true;
- Log("Image object info reused, source: \"%s\"", image_ref->GetSource());
+ WRN("Image object info reused, source: \"%s\"", image_ref->GetSource());
break;
}
}
if (!D3DImageCache::Current()->InsertImage(device, (DWORD *)evas_image->image.data,
evas_image->cache_entry.w, evas_image->cache_entry.h, info))
{
- Log("Couldnt add image to the cache");
+ WRN("Couldnt add image to the cache");
return;
}
image_ref->Init(info.u, info.v, info.du, info.dv, info.id,
{
if (_image_id < 0)
{
- Log("Font is not initialized");
+ WRN("Font is not initialized");
return NULL;
}
for (int i = 0; i < _glyphs.Length(); i++)
{
if (_image_id < 0)
{
- Log("Font is not initialized");
+ WRN("Font is not initialized");
return NULL;
}
for (int i = 0; i < _glyphs.Length(); i++)
cur += groups[i].num * 6;
}
- Log("Image cache drawn: %d items, %d groups", _cache.Length(), groups.Length());
+ DBG("Image cache drawn: %d items, %d groups", _cache.Length(), groups.Length());
_cache_enabled = false;
}
{
_dirty = false;
- Log("Image draw: (%.3f, %.3f, %.3f, %.3f)", _x, _y, _w, _h);
+ DBG("Image draw: (%.3f, %.3f, %.3f, %.3f)", _x, _y, _w, _h);
if (_cache_enabled)
{
d3d->GetDevice()->DrawPrimitiveUP(D3DPT_LINELIST, _cache.Length() / 2,
_cache.Data(), sizeof(Vertex));
- Log("Line cache drawn: %d items", _cache.Length() / 2);
+ DBG("Line cache drawn: %d items", _cache.Length() / 2);
_cache_enabled = false;
}
d3d->GetDevice()->DrawPrimitiveUP(D3DPT_TRIANGLELIST, _cache.Length() / 3,
_cache.Data(), sizeof(Vertex));
- Log("Rect cache drawn: %d items", _cache.Length() / 6);
+ DBG("Rect cache drawn: %d items", _cache.Length() / 6);
_cache_enabled = false;
}
{
bool res = true;
if (!(res = InitVertexDeclarations(d3d) && res))
- Log("Failed to create vdecl set");
+ WRN("Failed to create vdecl set");
if (!(res = InitVertexShaders(d3d) && res))
- Log("Failed to create vs set");
+ WRN("Failed to create vs set");
if (!(res = InitPixelShaders(d3d) && res))
- Log("Failed to create ps set");
+ WRN("Failed to create ps set");
return res;
}
if (FAILED(res))
{
- Log("Shader %s compilation failed, code = %X", name, res);
+ ERR("Shader %s compilation failed, code = %X", name, res);
if (error_msgs == NULL)
return NULL;
const char *mess = (const char *)error_msgs->GetBufferPointer();
- Log("Error output:\n%s", mess);
+ ERR("Error output:\n%s", mess);
error_msgs->Release();
return NULL;
}
if (FAILED(res))
{
- Log("Shader %s creation failed, code = %X", name, res);
+ WRN("Shader %s creation failed, code = %X", name, res);
return NULL;
}
return res_ptr;
CacheEntry new_entry;
if (!CreateEntry(d3d, new_entry, size))
{
- Log("Failed to create new vbcache entry");
+ WRN("Failed to create new vbcache entry");
return false;
}
_cache.Add(new_entry);
assert(ce != NULL);
if (!InsertData(*ce, data, size))
{
- Log("Failed to insert vbcache data");
+ WRN("Failed to insert vbcache data");
return false;
}
return true;
int in_redraw : 1;
};
+int _evas_engine_direct3d_log_dom = -1;
/* function tables - filled in later (func and parent func) */
static Evas_Func func, pfunc;
evas_common_font_init();
evas_common_draw_init();
evas_common_tilebuf_init();
-
+
if ((re->d3d = evas_direct3d_init(window, depth, fullscreen)) == 0)
{
free(re);
{
Render_Engine *re;
Evas_Engine_Info_Direct3D *in;
- re = (Render_Engine *)e->engine.data.output;
-
+ re = (Render_Engine *)e->engine.data.output;
in = (Evas_Engine_Info_Direct3D *)info;
if (e->engine.data.output == NULL)
{
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ /* Initialize the log domain */
+ _evas_engine_direct3d_log_dom = eina_log_domain_register("EvasDirect3D", EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_engine_direct3d_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the Direct3D engine.\n");
+ return 0;
+ }
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_engine_direct3d_log_dom);
}
static Evas_Module_Api evas_modapi =
#define EVAS_INLINE_ARRAY_H // We dont need that and it is buggy
#include "evas_common.h"
-#include "evas_private.h"
#ifdef __cplusplus
}
#endif
+
//#define ENABLE_LOG_PRINTF
+
+extern int _evas_engine_direct3d_log_dom ;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_direct3d_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_direct3d_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_direct3d_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_direct3d_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_direct3d_log_dom, __VA_ARGS__)
+
#ifdef ENABLE_LOG_PRINTF
-#define Log(str, ...) INFO("D3D "str, __VA_ARGS__)
+#define Log(str, ...) INF("D3D "str, __VA_ARGS__)
#else
#define Log(str, ...)
#endif
typedef void * Direct3DImageHandler;
typedef void * Direct3DFontGlyphHandler;
+
#ifdef __cplusplus
extern "C" {
#endif
//#define DFB_DEBUG_IMAGE 1
//#define DFB_DEBUG_FLAGS 1
//#define DFB_DEBUG_ACCELERATION 1
+int _evas_engine_directfb_log_dom = -1;
static Evas_Func func = {};
static Evas_Func parent_func = {};
return;
error:
- ERROR("DirectFB: could not clear surface: %s",
+ ERR("DirectFB: could not clear surface: %s",
DirectFBErrorString(r));
}
r = surface->GetPixelFormat(surface, &fmt);
if (r != DFB_OK)
{
- ERROR("DirectFB: could not get pixel format: %s",
+ ERR("Could not get pixel format: %s",
DirectFBErrorString(r));
return;
}
cr.y2 = y + h - 1;
r = surface->Flip(surface, &cr, DSFLIP_NONE);
if (r != DFB_OK)
- WARN("DirectFB: could not update surface: %s",
+ WRN("Could not update surface: %s",
DirectFBErrorString(r));
}
r = dfb->CreateSurface(dfb, &desc, &s);
if (r != DFB_OK)
{
- ERROR("DirectFB: cannot create DirectFB surface: %s",
- DirectFBErrorString(r));
+ ERR("Cannot create DirectFB surface: %s",
+ DirectFBErrorString(r));
return NULL;
}
r = dst->GetAccelerationMask(dst, src, &mask);
if (r != DFB_OK)
{
- ERROR("DirectFB: Could not retrieve acceleration mask: %s",
+ ERR("Could not retrieve acceleration mask: %s",
DirectFBErrorString(r));
return;
}
- DEBUG("Acceleration: ");
+ DBG("Acceleration: ");
-#define O(m) if (mask & m) DEBUG(#m " ")
+#define O(m) if (mask & m) DBG(#m " ")
O(DFXL_FILLRECTANGLE);
O(DFXL_DRAWRECTANGLE);
O(DFXL_DRAWLINE);
O(DFXL_DRAWSTRING);
#undef O
- if (mask == DFXL_NONE) DEBUG("<NONE>");
+ if (mask == DFXL_NONE) DBG("<NONE>");
#endif /* DFB_DEBUG_ACCELERATION */
}
goto error;
#ifdef DFB_DEBUG_FLAGS
- DEBUG("DirectFB DRAW: color=%d %d %d %d, flags=%s",
+ DBG("Color=%d %d %d %d, flags=%s",
r, g, b, a, _dfb_draw_flags_str(flags));
#endif /* DFB_DEBUG_FLAGS */
return 1;
error:
- ERROR("DirectFB: could not set color from context: %s",
+ ERR("Could not set color from context: %s",
DirectFBErrorString(res));
return 0;
}
goto error;
#ifdef DFB_DEBUG_FLAGS
- DEBUG("DirectFB BLIT: sfunc=%s, dfunc=%s, color=%d %d %d %d\n\tblit=%s\n\tdraw=%s",
+ DBG("sfunc=%s, dfunc=%s, color=%d %d %d %d\n\tblit=%s\n\tdraw=%s",
_dfb_blend_func_str(src_func), _dfb_blend_func_str(dst_func),
r, g, b, a,
_dfb_blit_flags_str(blit_flags), _dfb_draw_flags_str(draw_flags));
return 1;
error:
- ERROR("DirectFB: Could not set blit params: %s",
+ ERR("Could not set blit params: %s",
DirectFBErrorString(res));
return 0;
}
if (pitch != (sw * 4))
{
/* XXX TODO: support other pixel formats. */
- ERROR("DirectFB: IDirectFBSurface pitch(%d) is not supported: "
+ ERR("IDirectFBSurface pitch(%d) is not supported: "
"should be %d.",
pitch, sw * 4);
surface->Unlock(surface);
r = deie->surface->GetSize(deie->surface, &w, &h);
if (r != DFB_OK)
{
- ERROR("DirectFB: Could not get surface size: %s",
+ ERR("Could not get surface size: %s",
DirectFBErrorString(r));
return size;
}
{
DirectFB_Engine_Image_Entry *eim = (DirectFB_Engine_Image_Entry *)eie;
- DEBUG("*** %s image (%p) ***", context, eim);
+ DBG("*** %s image (%p) ***", context, eim);
if (eim)
{
- DEBUG("* W: %d\n"
+ DBG("* W: %d\n"
"* H: %d\n"
"* R: %d\n"
"* Key: %s\n"
eie->w, eie->h, eie->references, eie->cache_key, eim->surface);
if (eie->src)
- DEBUG("* Pixels: %p", ((RGBA_Image*) eie->src)->image.data);
+ DBG("* Pixels: %p", ((RGBA_Image*) eie->src)->image.data);
}
- DEBUG("*** ***");
+ DBG("*** ***");
}
#endif
evas_engine_dfb_info(Evas* e __UNUSED__)
{
Evas_Engine_Info_DirectFB *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_DirectFB));
if (!info)
return NULL;
-
info->magic.magic = rand();
-
return info;
}
evas_engine_dfb_info_free(Evas *e __UNUSED__, void *in)
{
Evas_Engine_Info_DirectFB *info = in;
-
free(info);
}
if (!idfb)
{
- ERROR("missing IDirectFB");
+ ERR("missing IDirectFB");
return EINA_FALSE;
}
dfb = idfb;
if (!surface)
{
- ERROR("missing IDirectFBSurface");
+ ERR("missing IDirectFBSurface");
return EINA_FALSE;
}
r = surface->GetSize(surface, &sw, &sh);
if (r != DFB_OK)
{
- ERROR("DirectFB: could not get surface %p size: %s",
+ ERR("Could not get surface %p size: %s",
surface, DirectFBErrorString(r));
return EINA_FALSE;
}
if ((w > sw) || (h > sh))
{
- ERROR("DirectFB: requested size is larger than surface: %dx%d > %dx%d",
+ ERR("Requested size is larger than surface: %dx%d > %dx%d",
w, h, sw, sh);
return EINA_FALSE;
}
re->tb = evas_common_tilebuf_new(w, h);
if (!re->tb)
{
- ERROR("DirectFB: could not allocate tile buffer.");
+ ERR("Could not allocate tile buffer.");
goto failed_tilebuf;
}
evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
evas_cache_engine_image_engine(re->cache, re->spec->surface);
if (!re->screen_image)
{
- ERROR("DirectFB: RGBA_Image allocation from DFB failed");
+ ERR("RGBA_Image allocation from DFB failed");
goto failed_image;
}
re->screen_image->flags.engine_surface = 1;
re->tb = NULL;
failed_tilebuf:
re->screen_image = NULL;
- ERROR("DirectFB: Evas DirectFB reconfigure failed");
+ ERR("Evas DirectFB reconfigure failed");
return 0;
}
evas_common_image_cache_get());
if (!re->cache)
{
- ERROR("DirectFB: Evas_Cache_Engine_Image allocation failed!");
+ ERR("Evas_Cache_Engine_Image allocation failed!");
goto fatal_after_engine;
}
if (!evas_engine_dfb_output_reconfigure(re, w, h))
{
- ERROR("DirectFB: Could not reconfigure evas engine.");
+ ERR("Could not reconfigure evas engine.");
goto fatal_after_reconfigure;
}
fatal_after_engine:
free(re);
fatal:
- CRITICAL("DirectFB: unable to continue, abort()!");
+ CRIT("DirectFB: unable to continue, abort()!");
abort();
return NULL;
}
evas_engine_dfb_output_resize(void *data, int w, int h)
{
if (!evas_engine_dfb_output_reconfigure(data, w, h))
- ERROR("DirectFB: failed to resize DirectFB evas");
+ ERR("Failed to resize DirectFB evas");
}
static void
Render_Engine *re = data;
if (re->update_regions_count != 0)
- ERROR("DirectFB: update_regions_count not 0 as it should be!");
+ ERR("update_regions_count not 0 as it should be!");
free(re->update_regions);
re->update_regions_count = 0;
break;
error:
- ERROR("DirectFB: could not lock surface %p: %s",
+ ERR("Could not lock surface %p: %s",
s, DirectFBErrorString(r));
*image_data = NULL;
break;
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&parent_func, "software_generic")) return 0;
+ _evas_engine_directfb_log_dom = eina_log_domain_register("EvasEngineDirectFB",EVAS_DEFAULT_COLOR);
+ if(_evas_engine_directfb_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the DirectFb engine.\n");
+ return 0;
+ }
/* store it for later use */
func = parent_func;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_engine_directfb_log_dom);
}
static Evas_Module_Api evas_modapi =
#include "evas_private.h"
#include "Evas_Engine_DirectFB.h"
+extern int _evas_engine_directfb_log_dom ;
+
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_directfb_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_directfb_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_directfb_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_directfb_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_directfb_log_dom, __VA_ARGS__)
+
typedef struct _DirectFB_Engine_Image_Entry DirectFB_Engine_Image_Entry;
struct _DirectFB_Engine_Image_Entry
{
#include "evas_engine.h"
#include "Evas_Engine_FB.h"
+int _evas_engine_fb_log_dom = -1;
+
/* function tables - filled in later (func and parent func) */
static Evas_Func func, pfunc;
eng_info(Evas *e)
{
Evas_Engine_Info_FB *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_FB));
if (!info) return NULL;
info->magic.magic = rand();
eng_info_free(Evas *e __UNUSED__, void *info)
{
Evas_Engine_Info_FB *in;
-
in = (Evas_Engine_Info_FB *)info;
free(in);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ _evas_engine_fb_log_dom = eina_log_domain_register("Evas_fb_engine", EVAS_DEFAULT_LOG_COLOR);
+ if (_evas_engine_fb_log_dom < 0) {
+ EINA_LOG_ERR("Impossible to create a log domain for FB engine.\n");
+ return 0;
+ }
+
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_dom_unregister(_evas_engine_fb_log_dom);
}
static Evas_Module_Api evas_modapi =
#include "evas_fb.h"
+extern int _evas_engine_fb_log_dom;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_fb_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_fb_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_fb_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_fb_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_fb_log_dom, __VA_ARGS__)
+
typedef struct _Outbuf Outbuf;
typedef enum _Outbuf_Depth Outbuf_Depth;
bpp = mode->fb_var.bits_per_pixel / 8;
break;
default:
- ERROR("EvasFB: Cannot handle framebuffer of depth %i",
+ ERR("Cannot handle framebuffer of depth %i",
mode->fb_var.bits_per_pixel);
fb_cleanup();
- free(mode);
+ free(mode);
return NULL;
}
mode->depth = depth;
chown(vtname, getuid(), getgid());
if (access(vtname,R_OK | W_OK) == -1)
{
- CRITICAL("EvasFB: access %s: %s",vtname,strerror(errno));
+ CRIT("Access %s: %s",vtname,strerror(errno));
exit(1);
}
open(vtname,O_RDWR);
}
if (fb == -1)
{
- CRITICAL("open %s: %s", dev, strerror(errno));
+ CRIT("open %s: %s", dev, strerror(errno));
fb_cleanup();
exit(1);
}
if (fb_fix.type != FB_TYPE_PACKED_PIXELS)
{
- CRITICAL("can handle only packed pixel frame buffers");
+ CRIT("can handle only packed pixel frame buffers");
fb_cleanup();
exit(1);
}
evas_fb_outbuf_fb_free(Outbuf *buf)
{
/* FIXME: impliment */
- WARN("destroying fb info.. not implemented!!!! WARNING. LEAK!");
+ WRN("destroying fb info.. not implemented!!!! WARNING. LEAK!");
if (buf->priv.back_buf)
evas_cache_image_drop(&buf->priv.back_buf->cache_entry);
free(buf);
#include "evas_engine.h"
#include "Evas_Engine_GL_Glew.h"
-
+int _evas_engine_GL_GLEW_log_dom = -1;
/* function tables - filled in later (func and parent func) */
static Evas_Func func, pfunc;
eng_info(Evas *e)
{
Evas_Engine_Info_GL_Glew *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_GL_Glew));
- if (!info) return NULL;
-
info->magic.magic = rand();
-
return info;
e = NULL;
}
eng_info_free(Evas *e, void *info)
{
Evas_Engine_Info_GL_Glew *in;
-
in = (Evas_Engine_Info_GL_Glew *)info;
free(in);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ _evas_engine_GL_GLEW_log_dom = eina_log_domain_register("EvasGLGlew",EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_engine_GL_GLEW_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for GL (Glew) engine.\n");
+ return 0;
+ }
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_engine_GL_GLEW_log_dom);
}
static Evas_Module_Api evas_modapi =
#include <windows.h>
#include "evas_gl_common.h"
+extern int _evas_engine_GL_glew_log_dom ;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_GL_glew_log_dom, __VA_ARGS__)
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_GL_glew_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_GL_glew_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_GL_glew_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_GL_glew_log_dom, __VA_ARGS__)
typedef struct _Evas_GL_Glew_Window Evas_GL_Glew_Window;
if (GLEW_VERSION_2_0)
{
- INFO("2.0");
+ INF("2.0");
}
return 1;
#else
#endif
-
+int _evas_engine_GL_X11_log_dom = -1;
/* function tables - filled in later (func and parent func) */
static Evas_Func func, pfunc;
eng_info(Evas *e)
{
Evas_Engine_Info_GL_X11 *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_GL_X11));
- if (!info) return NULL;
info->magic.magic = rand();
info->func.best_visual_get = eng_best_visual_get;
info->func.best_colormap_get = eng_best_colormap_get;
eng_info_free(Evas *e __UNUSED__, void *info)
{
Evas_Engine_Info_GL_X11 *in;
-
+ eina_log_domain_unregister(_evas_engine_GL_X11_log_dom);
in = (Evas_Engine_Info_GL_X11 *)info;
free(in);
}
re = (Render_Engine *)data;
re->win->draw.redraw = 0;
-// INFO("GL: finish update cycle!");
+// INF("GL: finish update cycle!");
}
/* at least the nvidia drivers are so abysmal that copying from the backbuffer
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ _evas_engine_GL_X11_log_dom = eina_log_domain_register("EvasEngineGLX11", EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_engine_GL_X11_log_dom<0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for GL X11 engine.\n");
+ return 0;
+ }
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_engine_GL_X11_log_dom);
}
static Evas_Module_Api evas_modapi =
#include "Evas.h"
#include "Evas_Engine_GL_X11.h"
+extern int _evas_engine_GL_X11_log_dom ;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_GL_X11_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_GL_X11_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_GL_X11_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_GL_X11_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_GL_X11_log_dom, __VA_ARGS__)
+
typedef struct _Evas_GL_X11_Window Evas_GL_X11_Window;
struct _Evas_GL_X11_Window
#include "evas_engine.h"
#include "Evas_Engine_Quartz.h"
#include "evas_quartz_private.h"
-
+int _evas_engine_quartz_log_dom = -1;
static Evas_Func func;
typedef struct _Render_Engine Render_Engine;
eng_info(Evas *e)
{
Evas_Engine_Info_Quartz *info;
-
+
info = calloc(1, sizeof(Evas_Engine_Info_Quartz));
if (!info) return NULL;
-
info->magic.magic = rand();
-
return info;
}
RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
Evas_Quartz_Gradient *gr = (Evas_Quartz_Gradient *)gradient;
- INFO("#Gradient#");
- INFO("Fill: %i %i %i %i", gr->grad->fill.x, gr->grad->fill.y, gr->grad->fill.w, gr->grad->fill.h);
- INFO("Type: %s %s", gr->grad->type.name, gr->grad->type.params);
- INFO("XYWH: %i %i %i %i", x, y, w, h);
- INFO("Geom: %p %p", gr->grad->type.geometer, gr->grad->type.geometer->get_fill_func);
- INFO("Map: len: %d angle: %f direction: %d offset: %f", gr->grad->map.len, gr->grad->map.angle, gr->grad->map.direction, gr->grad->map.offset);
- INFO("Color: nstops: %d len: %d", gr->grad->color.nstops, gr->grad->color.len);
- INFO("Alpha: nstops: %d len: %d", gr->grad->alpha.nstops, gr->grad->alpha.len);
- INFO("");
+ INF("#Gradient#");
+ INF("Fill: %i %i %i %i", gr->grad->fill.x, gr->grad->fill.y, gr->grad->fill.w, gr->grad->fill.h);
+ INF("Type: %s %s", gr->grad->type.name, gr->grad->type.params);
+ INF("XYWH: %i %i %i %i", x, y, w, h);
+ INF("Geom: %p %p", gr->grad->type.geometer, gr->grad->type.geometer->get_fill_func);
+ INF("Map: len: %d angle: %f direction: %d offset: %f", gr->grad->map.len, gr->grad->map.angle, gr->grad->map.direction, gr->grad->map.offset);
+ INF("Color: nstops: %d len: %d", gr->grad->color.nstops, gr->grad->color.len);
+ INF("Alpha: nstops: %d len: %d", gr->grad->alpha.nstops, gr->grad->alpha.len);
+ INF("");
if ((gr->sw != w) || (gr->sh != h))
gr->changed = 1;
module_open(Evas_Module *em)
{
if (!em) return 0;
+
if (!_evas_module_engine_inherit(&func, "software_generic")) return 0;
+
+ _evas_engine_quartz_log_dom = eina_log_domain_register("EvasQuartz", EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_engine_quartz_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the Quartz engine.\n");
+ return 0;
+ }
+
#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_)
ORD(context_anti_alias_get);
ORD(context_anti_alias_set);
static void
module_close(Evas_Module *em)
{
-
+ eina_log_domain_unregister(_evas_engine_quartz_log_dom);
}
static Evas_Module_Api evas_modapi =
#include <ApplicationServices/ApplicationServices.h>
+/* log domain variable declared in evas_engine.c */
+extern int _evas_engine_quartz_log_dom ;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_quartz_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_quartz_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_quartz_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_quartz_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_quartz_log_dom, __VA_ARGS__)
+
typedef struct _Evas_Quartz_Context Evas_Quartz_Context;
struct _Evas_Quartz_Context
#include "evas_common.h"
-#include "evas_private.h"
#include "evas_common_soft16.h"
/*
**
*****
*/
+int _evas_soft16_log_dom = -1;
+#ifdef ERR
+#undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR( _evas_soft16_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+#undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_soft16_log_dom, __VA_ARGS__)
+
+#ifdef INF
+#undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_soft16_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+#undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_soft16_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+#undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_soft16_log_dom, __VA_ARGS__)
#define NOT_IMPLEMENTED() \
- WARN("NOT_IMPLEMENTED: %s() at %s:%d", \
+ WRN("NOT_IMPLEMENTED: %s() at %s:%d", \
__FUNCTION__, __FILE__, __LINE__)
static void *
{
if ((image_data) && (cspace != EVAS_COLORSPACE_RGB565_A5P))
{
- WARN("Unsupported colorspace %d in %s() (%s:%d)",
+ WRN("Unsupported colorspace %d in %s() (%s:%d)",
cspace, __FUNCTION__, __FILE__, __LINE__);
return NULL;
}
{
if ((image_data) && (cspace != EVAS_COLORSPACE_RGB565_A5P))
{
- WARN("Unsupported colorspace %d in %s() (%s:%d)",
+ WRN("Unsupported colorspace %d in %s() (%s:%d)",
cspace, __FUNCTION__, __FILE__, __LINE__);
return NULL;
}
module_open(Evas_Module *em)
{
if (!em) return 0;
+ _evas_soft16_log_dom = eina_log_domain_register("Soft16Engine", EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_soft16_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the soft16 Engine.\n");
+ return 0;
+ }
em->functions = (void *)(&func);
+
return 1;
}
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_soft16_log_dom);
}
static Evas_Module_Api evas_modapi =
#include "Evas_Engine_Software_16_DDraw.h"
#include "evas_common_soft16.h"
+int _evas_engine_soft16_ddraw_log_dom = -1;
/* function tables - filled in later (func and parent func) */
static Evas_Func func, pfunc;
eng_info(Evas *e)
{
Evas_Engine_Info_Software_16_DDraw *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_Software_16_DDraw));
if (!info) return NULL;
info->magic.magic = rand();
eng_info_free(Evas *e, void *info)
{
Evas_Engine_Info_Software_16_DDraw *in;
-
in = (Evas_Engine_Info_Software_16_DDraw *)info;
free(in);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_16")) return 0;
+ _evas_engine_soft16_ddraw_log_dom = eina_log_domain_register("EvasSoft16DDraw",EINA_COLOR_BLUE);
+ if(_evas_engine_soft16_ddraw_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for Soft16_DDraw engine.\n");
+ return 0;
+ }
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_engine_soft16_ddraw_log_dom);
}
static Evas_Module_Api evas_modapi =
#ifndef __EVAS_ENGINE_H__
#define __EVAS_ENGINE_H__
-
#include <windows.h>
#include <ddraw.h>
#include "evas_common_soft16.h"
+extern int _evas_engine_soft16_ddraw_log_dom ;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft16_ddraw_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft16_ddraw_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft16_ddraw_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft16_ddraw_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft16_ddraw_log_dom, __VA_ARGS__)
+
typedef struct _DDraw_Output_Buffer DDraw_Output_Buffer;
struct _DDraw_Output_Buffer
#include "evas_common.h"
#include "evas_engine.h"
+int _evas_engine_soft16_sdl_log_dom = -1;
/* function tables - filled in later (func and parent func) */
static Evas_Func func = {};
evas_engine_sdl16_info(Evas *e __UNUSED__)
{
Evas_Engine_Info_SDL_16 *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_SDL_16));
if (!info) return NULL;
info->magic.magic = rand();
evas_engine_sdl16_info_free(Evas *e __UNUSED__, void *info)
{
Evas_Engine_Info_SDL_16 *in;
-
in = (Evas_Engine_Info_SDL_16 *)info;
free(in);
}
re->cache = evas_cache_engine_image_init(&_sdl16_cache_engine_image_cb, evas_common_soft16_image_cache_get());
if (!re->cache)
{
- ERROR("Evas_Cache_Engine_Image allocation failed!");
+ ERR("Evas_Cache_Engine_Image allocation failed!");
free(re);
return NULL;
}
| (noframe ? SDL_NOFRAME : 0));
if (!surface)
{
- ERROR("SDL_SetVideoMode [ %i x %i x 16 ] failed", w, h);
+ ERR("SDL_SetVideoMode [ %i x %i x 16 ] failed", w, h);
evas_cache_engine_image_shutdown(re->cache);
free(re);
return NULL;
re->soft16_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface);
if (!re->soft16_engine_image)
{
- ERROR("Soft16_Image allocation from SDL failed");
+ ERR("Soft16_Image allocation from SDL failed");
evas_cache_engine_image_shutdown(re->cache);
free(re);
return NULL;
if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
{
- ERROR("SDL_Init failed with %s", SDL_GetError());
+ ERR("SDL_Init failed with %s", SDL_GetError());
SDL_Quit();
return 0;
}
| (re->flags.noframe ? SDL_NOFRAME : 0));
if (!surface)
{
- ERROR("Unable to change the resolution to : %ix%i", w, h);
+ ERR("Unable to change the resolution to : %ix%i", w, h);
exit(-1);
}
re->soft16_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface);
if (!re->soft16_engine_image)
{
- ERROR("RGBA_Image allocation from SDL failed");
+ ERR("RGBA_Image allocation from SDL failed");
exit(-1);
}
if (cspace != EVAS_COLORSPACE_RGB565_A5P)
{
- WARN("Unsupported colorspace %d in %s() (%s:%d)",
+ WRN("Unsupported colorspace %d in %s() (%s:%d)",
cspace, __FUNCTION__, __FILE__, __LINE__);
return NULL;
}
- WARN("s image_data: %p", image_data);
+ WRN("s image_data: %p", image_data);
return evas_cache_engine_image_copied_data(re->cache,
w, h,
if (cspace != EVAS_COLORSPACE_RGB565_A5P)
{
- WARN("Unsupported colorspace %d in %s() (%s:%d)",
+ WRN("Unsupported colorspace %d in %s() (%s:%d)",
cspace, __FUNCTION__, __FILE__, __LINE__);
return NULL;
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_16")) return 0;
+ _evas_engine_soft16_sdl_log_dom = eina_log_domain_register("EvasSoft16SDL",EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_engine_soft16_sdl_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the Soft16_SDL engine.\n");
+ return 0;
+ }
+
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_engine_soft16_sdl_log_dom);
}
static Evas_Module_Api evas_modapi =
#include "evas_private.h"
#include "evas_common_soft16.h"
#include "Evas_Engine_SDL_16.h"
+extern int _evas_engine_soft16_sdl_log_dom ;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft16_sdl_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft16_sdl_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft16_sdl_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft16_sdl_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft16_sdl_log_dom, __VA_ARGS__)
typedef struct _SDL_Engine_Image_Entry SDL_Engine_Image_Entry;
struct _SDL_Engine_Image_Entry
#include "Evas_Engine_Software_16_WinCE.h"
#include "evas_common_soft16.h"
+int _evas_enigne_soft16_wince_log_dom = -1;
typedef enum
{
eng_info(Evas *e)
{
Evas_Engine_Info_Software_16_WinCE *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_Software_16_WinCE));
if (!info) return NULL;
info->magic.magic = rand();
eng_info_free(Evas *e, void *info)
{
Evas_Engine_Info_Software_16_WinCE *in;
-
in = (Evas_Engine_Info_Software_16_WinCE *)info;
free(in);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_16")) return 0;
+ _evas_engine_soft16_wince_log_dom = eina_log_domain_register("EvasSoft16Wince", EVAS_DEFAULT_LOG_COLOR);
+
+ if(_evas_engine_soft16_wince_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the Soft16 Wince engine.\n");
+ return NULL;
+ }
+
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_soft16_wince_log_dom);
+ return NULL;
}
static Evas_Module_Api evas_modapi =
#ifndef __EVAS_ENGINE_H__
#define __EVAS_ENGINE_H__
-
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
-
+#include "evas_common.h"
#include "evas_common_soft16.h"
+extern int _evas_engine_soft16_wince_log_dom;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft16_wince_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft16_wince_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft16_wince_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft16_wince_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft16_wince_log_dom, __VA_ARGS__)
typedef struct _FB_Output_Buffer FB_Output_Buffer;
(char *) &gxInfo);
if (result <= 0)
{
- fprintf(stderr, "[Engine] [WinCE FB] ExtEscape() with GETGXINFO failed\n");
+ ERR("[Engine] [WinCE FB] ExtEscape() with GETGXINFO failed\n");
return 0;
}
dc = GetDC (window);
if (!dc)
{
- fprintf(stderr, "[Engine] [WinCE FB] Can not get DC\n");
+ ERR("[Engine] [WinCE FB] Can not get DC\n");
free(priv);
return NULL;
}
if ((priv->width != width) ||
(priv->height != height))
{
- fprintf(stderr, "[Engine] [WinCE FB] Size mismatch\n");
- fprintf(stderr, "[Engine] [WinCE FB] asked: %dx%d\n", width, height);
- fprintf(stderr, "[Engine] [WinCE FB] got : %dx%d\n", priv->width, priv->height);
+ ERR("[Engine] [WinCE FB] Size mismatch\n");
+ ERR("[Engine] [WinCE FB] asked: %dx%d\n", width, height);
+ ERR("[Engine] [WinCE FB] got : %dx%d\n", priv->width, priv->height);
ReleaseDC(window, dc);
free(priv);
return NULL;
(rfbi.wBPP != 16) ||
(rfbi.wFormat != 1))
{
- fprintf(stderr, "[Engine] [WinCE FB] ExtEscape() with GETRAWFRAMEBUFFER failed\n");
- fprintf(stderr, "[Engine] [WinCE FB] trying ExtEscape() with GETGXINFO\n");
+ ERR("[Engine] [WinCE FB] ExtEscape() with GETRAWFRAMEBUFFER failed\n");
+ ERR("[Engine] [WinCE FB] trying ExtEscape() with GETGXINFO\n");
if (!_evas_software_wince_gxinfo_init(dc, &priv->width, &priv->height, &priv->buffer))
{
ReleaseDC(window, dc);
if ((priv->width != width) ||
(priv->height != height))
{
- fprintf(stderr, "[Engine] [WinCE FB] Size mismatch\n");
- fprintf(stderr, "[Engine] [WinCE FB] asked: %dx%d\n", width, height);
- fprintf(stderr, "[Engine] [WinCE FB] got : %dx%d\n", priv->width, priv->height);
+ ERR("[Engine] [WinCE FB] Size mismatch\n");
+ ERR("[Engine] [WinCE FB] asked: %dx%d\n", width, height);
+ ERR("[Engine] [WinCE FB] got : %dx%d\n", priv->width, priv->height);
ReleaseDC(window, dc);
free(priv);
return NULL;
gapi_lib = LoadLibrary(L"gx.dll");
if (!gapi_lib)
{
- fprintf(stderr, "[Engine] [WinCE GAPI] Can not load gx.dll\n");
+ ERR("[Engine] [WinCE GAPI] Can not load gx.dll");
goto free_priv;
}
}
!suspend ||
!resume)
{
- fprintf(stderr, "[Engine] [WinCE GAPI] Can not find valid symbols\n");
+ ERR("[Engine] [WinCE GAPI] Can not find valid symbols");
goto free_lib;
}
if (!display_open(window, GX_FULLSCREEN))
{
- fprintf(stderr, "[Engine] [WinCE GAPI] Can not open display\n");
+ ERR("[Engine] [WinCE GAPI] Can not open display");
goto free_lib;
}
// verify pixel format
if(!(prop.ffFormat & kfDirect565) || (prop.cBPP != 16))
{
- fprintf(stderr, "[Engine] [WinCE GAPI] display format mismatch\n");
+ ERR("[Engine] [WinCE GAPI] display format mismatch\n");
goto close_display;
}
if ((GetSystemMetrics(SM_CXSCREEN) != (int)prop.cxWidth) ||
(GetSystemMetrics(SM_CYSCREEN) != (int)prop.cyHeight))
{
- fprintf(stderr, "[Engine] [WinCE GAPI] display size mismatch\n");
+ ERR("[Engine] [WinCE GAPI] display size mismatch\n");
goto close_display;
}
dc = GetDC (window);
if (!dc)
{
- fprintf(stderr, "[Engine] [WinCE GAPI] Can not get device\n");
+ ERR("[Engine] [WinCE GAPI] Can not get device\n");
goto close_display;
}
(char *) &gxInfo);
if (result <= 0)
{
- fprintf(stderr, "[Engine] [WinCE GAPI] ExtEscape failed\n");
+ ERR("[Engine] [WinCE GAPI] ExtEscape failed\n");
ReleaseDC(window, dc);
goto close_display;
}
if ((priv->width != width) ||
(priv->height != height))
{
- fprintf(stderr, "[Engine] [WinCE GAPI] Size mismatch\n");
- fprintf(stderr, "[Engine] [WinCE GAPI] asked: %dx%d\n", width, height);
- fprintf(stderr, "[Engine] [WinCE GAPI] got : %dx%d\n", priv->width, priv->height);
+ ERR("[Engine] [WinCE GAPI] Size mismatch\n");
+ ERR("[Engine] [WinCE GAPI] asked: %dx%d\n", width, height);
+ ERR("[Engine] [WinCE GAPI] got : %dx%d\n", priv->width, priv->height);
goto close_display;
}
priv->dc = GetDC(window);
if (!priv->dc)
{
- fprintf(stderr, "[Engine] [WinCE GDI] Can not get DC\n");
+ ERR("[Engine] [WinCE GDI] Can not get DC\n");
free(priv);
return NULL;
}
priv->bitmap_info = (BITMAPINFO_16bpp *)malloc(sizeof(BITMAPINFO_16bpp));
if (!priv->bitmap_info)
{
- fprintf(stderr, "[Engine] [WinCE GDI] Can not allocate bitmap info\n");
+ ERR("[Engine] [WinCE GDI] Can not allocate bitmap info\n");
ReleaseDC(window, priv->dc);
free(priv);
return NULL;
#include "Evas_Engine_Software_16_X11.h"
#include "evas_common_soft16.h"
+int _evas_engine_soft16_x11_log_dom = -1;
/* function tables - filled in later (func and parent func) */
static Evas_Func func, pfunc;
eng_info(Evas *e)
{
Evas_Engine_Info_Software_16_X11 *info;
-
+
info = calloc(1, sizeof(Evas_Engine_Info_Software_16_X11));
if (!info) return NULL;
info->magic.magic = rand();
eng_info_free(Evas *e __UNUSED__, void *info)
{
Evas_Engine_Info_Software_16_X11 *in;
-
in = (Evas_Engine_Info_Software_16_X11 *)info;
free(in);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_16")) return 0;
+ _evas_engine_soft16_x11_log_dom = eina_log_domain_register("EvasSoft16X11", EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_engine_soft16_x11_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the Soft16_X11 engine.\n");
+ return 0;
+ }
+
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_dom_unregister(_evas_engine_soft16_x11_log_dom);
}
static Evas_Module_Api evas_modapi =
#include <X11/extensions/XShm.h>
#include <sys/ipc.h>
#include <sys/shm.h>
-
+#include "evas_common.h"
#include "evas_common_soft16.h"
+extern int _evas_engine_soft16_x11_log_dom;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft16_x11_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft16_x11_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft16_x11_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft16_x11_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft16_x11_log_dom, __VA_ARGS__)
+
typedef struct _X_Output_Buffer X_Output_Buffer;
struct _X_Output_Buffer
#include "evas_engine.h"
#include "Evas_Engine_Software_DDraw.h"
+int _evas_engine_soft_ddraw_log_dom = -1;
/* function tables - filled in later (func and parent func) */
static Evas_Func func, pfunc;
info = calloc(1, sizeof(Evas_Engine_Info_Software_DDraw));
if (!info) return NULL;
info->magic.magic = rand();
-
- _evas_log_dom_module = eina_log_domain_register("Software_DDraw", EVAS_DEFAULT_LOG_COLOR);
- if(_evas_log_dom_module < 0)
- {
- EINA_LOG_ERR("Can not create a module log domain.");
- free(info);
- return NULL;
- }
-
return info;
e = NULL;
}
eng_info_free(Evas *e, void *info)
{
Evas_Engine_Info_Software_DDraw *in;
-
- eina_log_domain_unregister(_evas_log_dom_module);
- _evas_log_dom_module = -1;
-
in = (Evas_Engine_Info_Software_DDraw *)info;
free(in);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ _evas_log_dom_module = eina_log_domain_register("Software_DDraw", EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_log_dom_module < 0)
+ {
+ EINA_LOG_ERR("Can not create a module log domain.");
+ free(info);
+ return NULL;
+ }
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_log_dom_module);
}
static Evas_Module_Api evas_modapi =
#include "evas_engine.h"
#include "Evas_Engine_Software_Gdi.h"
+int _evas_engine_soft_gdi_log_dom = -1;
/* function tables - filled in later (func and parent func) */
static Evas_Func func, pfunc;
eng_info(Evas *e __UNUSED__)
{
Evas_Engine_Info_Software_Gdi *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_Software_Gdi));
if (!info) return NULL;
info->magic.magic = rand();
eng_info_free(Evas *e __UNUSED__, void *info)
{
Evas_Engine_Info_Software_Gdi *in;
-
in = (Evas_Engine_Info_Software_Gdi *)info;
free(in);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+
+ _evas_engine_soft_gdi_log_dom = eina_log_domain_register("EvasSoftGDI",EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_engine_soft_gdi_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the Soft_GDI engine.\n");
+ return NULL;
+ }
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_engine_soft_gdi_log_dom);
}
static Evas_Module_Api evas_modapi =
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
+extern _evas_engine_soft_gdi_log_dom = -1;
+
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft_gdi_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft_gdi_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft_gdi_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft_gdi_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft_gdi_log_dom, __VA_ARGS__)
typedef enum _Outbuf_Depth Outbuf_Depth;
if (!window)
{
- ERROR("[Engine] [GDI] Window is NULL");
+ ERR("[Engine] [GDI] Window is NULL");
return 0;
}
buf->priv.gdi.dc = GetDC(window);
if (!buf->priv.gdi.dc)
{
- ERROR("[Engine] [GDI] Can not get DC");
+ ERR("[Engine] [GDI] Can not get DC");
return 0;
}
/* FIXME: check depth */
if (depth != GetDeviceCaps(buf->priv.gdi.dc, BITSPIXEL))
{
- ERROR("[Engine] [GDI] no compatible depth");
+ ERR("[Engine] [GDI] no compatible depth");
ReleaseDC(window, buf->priv.gdi.dc);
return 0;
}
buf->priv.gdi.bitmap_info = (BITMAPINFO_GDI *)malloc(sizeof(BITMAPINFO_GDI));
if (!buf->priv.gdi.bitmap_info)
{
- ERROR("[Engine] [GDI] Can not allocate bitmap info");
+ ERR("[Engine] [GDI] Can not allocate bitmap info");
ReleaseDC(window, buf->priv.gdi.dc);
return 0;
}
buf->priv.gdi.bitmap_info->masks[2] = 0x000000ff;
break;
default:
- ERROR("[Engine] [GDI] wrong depth");
+ ERR("[Engine] [GDI] wrong depth");
free(buf->priv.gdi.bitmap_info);
ReleaseDC(window, buf->priv.gdi.dc);
return 0;
if (!conv_func)
{
- ERROR(".[ soft_gdi engine Error ]."
+ ERR(".[ soft_gdi engine Error ]."
" {"
" At depth %i:"
" RGB format mask: %08lx, %08lx, %08lx"
**
*****
*/
-
static int cpunum = 0;
-
+static int _evas_soft_gen_log_dom = -1;
static void *
eng_context_new(void *data __UNUSED__)
{
module_open(Evas_Module *em)
{
if (!em) return 0;
+ _evas_soft_gen_log_dom = eina_log_domain_register("EvasSoftGeneric", EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_soft_gen_log_dom<0)
+ {
+ EINA_LOG_ERR("Evas SoftGen : Impossible to create a log domain for the software generic engine.\n");
+ return 0;
+ }
em->functions = (void *)(&func);
cpunum = eina_cpu_count();
return 1;
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_soft_gen_log_dom);
}
static Evas_Module_Api evas_modapi =
#include "evas_engine.h"
#include "Evas_Engine_Software_Qtopia.h"
+int _evas_engine_soft_qtopia_log_dom = -1;
/* function tables - filled in later (func and parent func) */
static Evas_Func func, pfunc;
eng_info(Evas *e)
{
Evas_Engine_Info_Software_Qtopia *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_Software_Qtopia));
if (!info) return NULL;
info->magic.magic = rand();
eng_info_free(Evas *e, void *info)
{
Evas_Engine_Info_Software_Qtopia *in;
-
in = (Evas_Engine_Info_Software_Qtopia *)info;
free(in);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ _evas_engine_soft_qtopia_log_dom = eina_log_domain_register("EvasSoftQtopia",EVAS_DEFAULT_COLOR);
+ if(_evas_engine_soft_qtopia_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the qtopia engine.\n");
+ return NULL;
+ }
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_engine_soft_qtopia_log_dom);
}
static Evas_Module_Api evas_modapi =
#ifndef EVAS_ENGINE_H
#define EVAS_ENGINE_H
+extern int _evas_engine_soft_qtopia_log_dom ;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_qtopia_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_qtopia_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_qtopia_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_qtopia_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_qtopia_log_dom, __VA_ARGS__)
+
typedef struct _Outbuf Outbuf;
typedef struct _QT_Direct QT_Direct;
typedef struct _QT_Direct_Rect QT_Direct_Rect;
#include "evas_common.h"
#include "evas_engine.h"
+int _evas_engine_soft_sdl_log_dom = -1;
/* #define DEBUG_SDL */
static Evas_Func func = {};
static void*
evas_engine_sdl_info (Evas* e __UNUSED__)
{
- Evas_Engine_Info_SDL* info = calloc(1, sizeof (Evas_Engine_Info_SDL));
-
- if (!info)
- return NULL;
-
+ Evas_Engine_Info_SDL* info;
+ info = calloc(1, sizeof (Evas_Engine_Info_SDL));
+ if (!info) return NULL;
info->magic.magic = rand();
-
return info;
}
static void
evas_engine_sdl_info_free (Evas* e __UNUSED__, void* info)
{
- Evas_Engine_Info_SDL* in = (Evas_Engine_Info_SDL*) info;
-
+ Evas_Engine_Info_SDL* in;
+ in = (Evas_Engine_Info_SDL*) info;
free(in);
in = NULL;
}
if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
{
- ERROR("SDL_Init failed with %s", SDL_GetError());
+ ERR("SDL_Init failed with %s", SDL_GetError());
SDL_Quit();
return 0;
}
if (!surface)
{
- ERROR("Unable to change the resolution to : %ix%i", w, h);
+ ERR("Unable to change the resolution to : %ix%i", w, h);
exit(-1);
}
re->rgba_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface);
if (!re->rgba_engine_image)
{
- ERROR("RGBA_Image allocation from SDL failed");
+ ERR("RGBA_Image allocation from SDL failed");
exit(-1);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ _evas_engine_soft_sdl_log_dom = eina_log_domain_register("EvasSoftSdl",EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_engine_soft_sdl_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the SoftSdl engine.\n");
+ return 0;
+ }
/* store it for later use */
func = pfunc;
/* now to override methods */
static void module_close(Evas_Module *em)
{
-
+ eina_log_domain_unregister(_evas_engine_soft_sdl_log_dom);
}
static Evas_Module_Api evas_modapi =
re->cache = evas_cache_engine_image_init(&_sdl_cache_engine_image_cb, evas_common_image_cache_get());
if (!re->cache)
{
- CRITICAL("Evas_Cache_Engine_Image allocation failed!");
+ CRIT("Evas_Cache_Engine_Image allocation failed!");
exit(-1);
}
if (!surface)
{
- CRITICAL("SDL_SetVideoMode [ %i x %i x 32 ] failed.", w, h);
+ CRIT("SDL_SetVideoMode [ %i x %i x 32 ] failed.", w, h);
exit(-1);
}
re->rgba_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface);
if (!re->rgba_engine_image)
{
- CRITICAL("RGBA_Image allocation from SDL failed");
+ CRIT("RGBA_Image allocation from SDL failed");
exit(-1);
}
{
SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) eie;
- DEBUG("*** %s image (%p) ***", context, eim);
+ DBG("*** %s image (%p) ***", context, eim);
if (eim)
{
- DEBUG ("* W: %i\n* H: %i\n* R: %i", eim->cache_entry.w, eim->cache_entry.h, eim->cache_entry.references);
+ DBG ("* W: %i\n* H: %i\n* R: %i", eim->cache_entry.w, eim->cache_entry.h, eim->cache_entry.references);
if (eim->cache_entry.src)
- DEBUG ("* Pixels: %p\n* SDL Surface: %p",((RGBA_Image*) eim->cache_entry.src)->image.data, eim->surface);
+ DBG ("* Pixels: %p\n* SDL Surface: %p",((RGBA_Image*) eim->cache_entry.src)->image.data, eim->surface);
if (eim->surface)
- DEBUG ("* Surface->pixels: %p", eim->surface->pixels);
- DEBUG ("* Key: %s", eim->cache_entry.cache_key);
- DEBUG ("* Reference: %i", eim->cache_entry.references);
+ DBG ("* Surface->pixels: %p", eim->surface->pixels);
+ DBG ("* Key: %s", eim->cache_entry.cache_key);
+ DBG ("* Reference: %i", eim->cache_entry.references);
}
- DEBUG ("*** ***");
+ DBG ("*** ***");
}
#endif
#include "evas_private.h"
#include "Evas_Engine_SDL.h"
+extern int _evas_engine_soft_sdl_log_dom ;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft_sdl_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft_sdl_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft_sdl_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft_sdl_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft_sdl_log_dom, __VA_ARGS__)
+
typedef struct _SDL_Engine_Image_Entry SDL_Engine_Image_Entry;
struct _SDL_Engine_Image_Entry
{
# include "evas_xcb_color.h"
#endif
+int _evas_engine_soft_x11_log_dom = -1;
+int test ;
/* function tables - filled in later (func and parent func) */
static Evas_Func func, pfunc;
eng_info(Evas *e __UNUSED__)
{
Evas_Engine_Info_Software_X11 *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_Software_X11));
if (!info) return NULL;
info->magic.magic = rand();
eng_info_free(Evas *e __UNUSED__, void *info)
{
Evas_Engine_Info_Software_X11 *in;
-
in = (Evas_Engine_Info_Software_X11 *)info;
free(in);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ _evas_engine_soft_x11_log_dom = eina_log_domain_register("EvasSoftX11", EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_engine_soft_x11_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the SoftX11 engine.\n");
+ return 0;
+ }
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em __UNUSED__)
{
+ eina_log_domain_unregister(_evas_engine_soft_x11_log_dom);
}
static Evas_Module_Api evas_modapi =
# include <xcb/xcb_image.h>
#endif
+extern int _evas_engine_soft_x11_log_dom;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft_x11_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft_x11_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft_x11_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft_x11_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft_x11_log_dom, __VA_ARGS__)
typedef enum _Outbuf_Depth Outbuf_Depth;
evas_software_xcb_x_output_buffer_free(xcbob, 1);
if (!conv_func)
{
- ERROR("XCB Engine"
+ ERR("XCB Engine"
" {"
" At depth %i:"
" RGB format mask: %08x, %08x, %08x"
#include "Evas_Engine_XRender_X11.h"
#include "evas_engine.h"
-
+int _evas_xrender_xcb_log_dom = -1;
/* function tables - filled in later (func and parent func) */
static Evas_Func func, pfunc;
eng_info(Evas *e __UNUSED__)
{
Evas_Engine_Info_XRender_X11 *info;
-
info = calloc(1, sizeof(Evas_Engine_Info_XRender_X11));
if (!info) return NULL;
info->magic.magic = rand();
eng_info_free(Evas *e __UNUSED__, void *info)
{
Evas_Engine_Info_XRender_X11 *in;
-
in = (Evas_Engine_Info_XRender_X11 *)info;
free(in);
}
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
-
+ _evas_xrender_xcb_log_dom = eina_log_domain_register("EvasSoftXrender", EVAS_DEFAULT_LOG_COLOR);
+ if(_evas_xrender_xcb_log_dom < 0)
+ {
+ EINA_LOG_ERR("Impossible to create a log domain for the Software Xrender engine.\n");
+ return 0;
+ }
/* store it for later use */
func = pfunc;
/* now to override methods */
static void
module_close(Evas_Module *em)
{
+ eina_log_domain_unregister(_evas_xrender_xcb_log_dom);
}
static Evas_Module_Api evas_modapi =
# include <xcb/xcb_image.h>
#endif
+extern int _evas_xrender_xcb_log_dom ;
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_evas_xrender_xcb_log_dom, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_evas_xrender_xcb_log_dom, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_evas_xrender_xcb_log_dom, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_evas_xrender_xcb_log_dom, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_xrender_xcb_log_dom, __VA_ARGS__)
+
typedef struct _Ximage_Info Ximage_Info;
typedef struct _Ximage_Image Ximage_Image;
typedef struct _Xrender_Surface Xrender_Surface;