better logging.

* log domains in lower-case only please. let's make it a standard so
   we don't have to look at the code everytime to figure out the name...

 * logs do NOT require trailing newline (\n), it's automatic!

 * do NOT add newline inside log messages!

 * add gl_common logging.

NOTE: I tried to compile all modules, but there are clear broken
      modules such as cairo and qtopia. Other modules like gl_sdl are
      broken as they were not updated to new gl_common api (resize
      method AFAIR).



SVN revision: 53174
This commit is contained in:
Gustavo Sverzut Barbieri 2010-10-07 23:46:42 +00:00
parent 3a88bc8b71
commit 379b546adf
47 changed files with 306 additions and 242 deletions

View File

@ -563,7 +563,8 @@ img_free(Img *img)
if (tmp) strshr_freeme = tmp;
else
{
printf("realloc of strshr_freeme failed for %i items\n", strshr_freeme_alloc);
ERR("realloc of strshr_freeme failed for %i items",
strshr_freeme_alloc);
strshr_freeme_alloc -= 32;
strshr_freeme_count -= 3;
return;
@ -1527,14 +1528,15 @@ main(int argc, char **argv)
unsetenv("EVAS_CSERVE");
DBG("eina init...");
eina_init();
_evas_cserve_bin_log_dom = eina_log_domain_register("Evas_cserve_bin", CSERVE_BIN_DEFAULT_COLOR);
if(_evas_cserve_bin_log_dom < 0) {
DBG("Problem with eina_log : impossible to create a log domain");
eina_shutdown();
exit(1);
}
_evas_cserve_bin_log_dom = eina_log_domain_register
("evas_cserve_bin", CSERVE_BIN_DEFAULT_COLOR);
if (_evas_cserve_bin_log_dom < 0)
{
EINA_LOG_ERR("impossible to create a log domain.");
eina_shutdown();
exit(1);
}
DBG("evas init...");
evas_init();

View File

@ -30,11 +30,12 @@ evas_init(void)
if (!eina_init())
goto shutdown_evil;
_evas_log_dom_global = eina_log_domain_register("evas_main",EVAS_DEFAULT_LOG_COLOR);
_evas_log_dom_global = eina_log_domain_register
("evas_main", EVAS_DEFAULT_LOG_COLOR);
if (_evas_log_dom_global < 0)
{
EINA_LOG_ERR("Evas could not create a default log domain\n");
goto shutdown_eina;
EINA_LOG_ERR("Can not create a module log domain.");
goto shutdown_eina;
}
evas_module_init();

View File

@ -134,12 +134,12 @@ _on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *o, void *einfo __U
if ((!api) || (!api->remove))
{
fputs("no api->remove\n", stderr);
ERR("no api->remove");
return;
}
if (!api->remove(box, priv, o))
fputs("child removal failed\n", stderr);
ERR("child removal failed");
evas_object_smart_changed(box);
}
@ -166,14 +166,14 @@ _evas_object_box_option_new(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Obj
api = priv->api;
if ((!api) || (!api->option_new))
{
fputs("no api->option_new\n", stderr);
ERR("no api->option_new");
return NULL;
}
opt = api->option_new(o, priv, child);
if (!opt)
{
fputs("option_new failed\n", stderr);
ERR("option_new failed");
return NULL;
}
@ -201,8 +201,7 @@ _evas_object_box_option_callbacks_register(Evas_Object *o, Evas_Object_Box_Data
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)");
return NULL;
}
@ -376,8 +375,7 @@ _evas_object_box_remove_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas
if ((!api) || (!api->option_free))
{
fputs("WARNING: api->option_free not set (may cause memory leaks,"
" segfaults)\n", stderr);
ERR("api->option_free not set (may cause memory leaks, segfaults)");
return NULL;
}
@ -411,15 +409,14 @@ _evas_object_box_remove_at_default(Evas_Object *o, Evas_Object_Box_Data *priv, u
if ((!api) || (!api->option_free))
{
WRN("api->option_free not set (may cause memory leaks,"
" segfaults)\n");
WRN("api->option_free not set (may cause memory leaks, segfaults)");
return NULL;
}
node = eina_list_nth_list(priv->children, pos);
if (!node)
{
ERR("No item to be removed at position %d\n", pos);
ERR("No item to be removed at position %d", pos);
return NULL;
}
@ -447,7 +444,7 @@ _evas_object_box_smart_add(Evas_Object *o)
priv = (Evas_Object_Box_Data *)calloc(1, sizeof(*priv));
if (!priv)
{
ERR("Could not allocate object private data.\n");
ERR("Could not allocate object private data.");
return;
}
@ -483,8 +480,7 @@ _evas_object_box_smart_del(Evas_Object *o)
api = priv->api;
if ((!api) || (!api->option_free))
{
WRN("api->option_free not set (may cause memory leaks,"
" segfaults)\n");
WRN("api->option_free not set (may cause memory leaks, segfaults)");
return;
}

View File

@ -249,7 +249,7 @@ evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned i
}
else
{
fprintf(stderr, "ERROR: realloc failed!\n");
ERR("realloc failed!");
return 0;
}
}

View File

@ -196,12 +196,12 @@ evas_object_stack_above(Evas_Object *obj, Evas_Object *above)
{
if (above->smart.parent)
{
ERR("BITCH! evas_object_stack_above(), %p stack above %p, but above has smart parent, obj does not\n", obj, above);
ERR("BITCH! evas_object_stack_above(), %p stack above %p, but above has smart parent, obj does not", obj, above);
return;
}
if (obj->layer != above->layer)
{
ERR("BITCH! evas_object_stack_above(), %p stack above %p, not matching layers\n", obj, above);
ERR("BITCH! evas_object_stack_above(), %p stack above %p, not matching layers", obj, above);
return;
}
if (obj->in_layer)
@ -288,12 +288,12 @@ evas_object_stack_below(Evas_Object *obj, Evas_Object *below)
{
if (below->smart.parent)
{
ERR("BITCH! evas_object_stack_below(), %p stack below %p, but below has smart parent, obj does not\n", obj, below);
ERR("BITCH! evas_object_stack_below(), %p stack below %p, but below has smart parent, obj does not", obj, below);
return;
}
if (obj->layer != below->layer)
{
ERR("BITCH! evas_object_stack_below(), %p stack below %p, not matching layers\n", obj, below);
ERR("BITCH! evas_object_stack_below(), %p stack below %p, not matching layers", obj, below);
return;
}
if (obj->in_layer)

View File

@ -145,7 +145,7 @@ server_read(Server *s, int channel, int *opcode, int *size)
if ((*size < 0) || (*size > (1024 * 1024))) return NULL;
if (ints[2] != (s->ch[channel].req_from + 1))
{
ERR("EEK! sequence number mismatch from serer with pid: %i\n"
ERR("EEK! sequence number mismatch from serer with pid: %i. "
"---- num %i is not 1 more than %i"
,
s->pid, ints[2], s->ch[channel].req_from);

View File

@ -225,7 +225,7 @@ server_parse(Server *s, Client *c)
data = c->inbuf + (sizeof(int) * 3);
if (ints[2] != (c->req_from + 1))
{
ERR("EEK! sequence number mismatch from client with pid: %i\n"
ERR("EEK! sequence number mismatch from client with pid: %i."
"---- num %i is not 1 more than %i"
,
c->pid, ints[2], c->req_from);

View File

@ -94,7 +94,7 @@ evas_common_font_ascent_get(RGBA_Font *fn)
}
if (!FT_IS_SCALABLE(fi->src->ft.face))
{
printf("NOT SCALABLE!\n");
WRN("NOT SCALABLE!");
}
val = (int)fi->src->ft.face->size->metrics.ascender;
return val >> 6;

View File

@ -199,10 +199,10 @@ evas_common_font_query_inset(RGBA_Font *fn, const Eina_Unicode *text)
LKU(fi->ft_mutex);
if (!fg) return 0;
/*
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"
INF("fg->glyph_out->left = %i, "
"fi->src->ft.face->glyph->bitmap_left = %i, "
"fi->src->ft.face->glyph->metrics.horiBearingX = %i, "
"fi->src->ft.face->glyph->metrics.horiBearingY = %i, "
"fi->src->ft.face->glyph->metrics.horiAdvance = %i"
,
(int)fg->glyph_out->left,

View File

@ -263,7 +263,7 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie)
RGBA_Image *im = (RGBA_Image *) ie;
if (ie->file)
printf("unload: [%p] %s %s\n", ie, ie->file, ie->key);
DBG("unload: [%p] %s %s", ie, ie->file, ie->key);
if ((im->cs.data) && (im->image.data))
{
if (im->cs.data != im->image.data)
@ -290,7 +290,7 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie)
static void
_evas_common_rgba_image_unload(Image_Entry *im)
{
// printf("unload: [%p] %s %s\n", im, im->file, im->key);
// DBG("unload: [%p] %s %s", im, im->file, im->key);
evas_common_rgba_image_scalecache_dirty(im);
evas_common_rgba_image_unload(im);
}

View File

@ -32,7 +32,7 @@ static int _evas_common_load_soft8_image_data_from_file(Image_Entry * ie);
static void
_evas_common_soft8_image_debug(const char* context, Image_Entry *eim)
{
DBG("[8] %p = [%s] {%s,%s} %i [%i|%i]\n", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h);
DBG("[8] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h);
}
*/

View File

@ -347,14 +347,15 @@ module_open(Evas_Module *em)
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)
_evas_engine_buffer_log_dom = eina_log_domain_register
("evas-buffer", 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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
func = pfunc;
/* now to override methods */

View File

@ -1353,11 +1353,12 @@ static int
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)
_evas_engine_cairo_X11_log_dom = eina_log_domain_register
("evas-cairo_x11", EVAS_DEFAULT_LOG_COLOR);
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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
em->functions = (void *)(&eng_func);
return 1;

View File

@ -422,11 +422,12 @@ module_open(Evas_Module *em)
/* 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)
_evas_engine_direct3d_log_dom = eina_log_domain_register
("evas-direct3d", 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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
func = pfunc;

View File

@ -355,7 +355,7 @@ _dfb_surface_set_blit_params(DirectFB_Engine_Image_Entry *d, DirectFB_Engine_Ima
goto error;
#ifdef DFB_DEBUG_FLAGS
DBG("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, blit=%s, draw=%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));
@ -632,15 +632,11 @@ evas_cache_image_dfb_debug(const char *context, Engine_Image_Entry* eie)
DBG("*** %s image (%p) ***", context, eim);
if (eim)
{
DBG("* W: %d\n"
"* H: %d\n"
"* R: %d\n"
"* Key: %s\n"
"* DFB Surface: %p",
eie->w, eie->h, eie->references, eie->cache_key, eim->surface);
DBG("W: %d, H: %d, R: %d, Key: %s, DFB Surface: %p",
eie->w, eie->h, eie->references, eie->cache_key, eim->surface);
if (eie->src)
DBG("* Pixels: %p", ((RGBA_Image*) eie->src)->image.data);
DBG("Pixels: %p", ((RGBA_Image*) eie->src)->image.data);
}
DBG("*** ***");
}
@ -1670,11 +1666,12 @@ module_open(Evas_Module *em)
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_LOG_COLOR);
if(_evas_engine_directfb_log_dom < 0)
_evas_engine_directfb_log_dom = eina_log_domain_register
("evas-directfb", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_directfb_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for the DirectFb engine.\n");
return 0;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
func = parent_func;

View File

@ -262,11 +262,13 @@ module_open(Evas_Module *em)
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;
}
_evas_engine_fb_log_dom = eina_log_domain_register
("evas-fb", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_fb_log_dom < 0)
{
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
func = pfunc;

View File

@ -510,4 +510,7 @@ unsigned int (*secsym_eglGetImageAttribSEC) (void *a, void *b, int c,
# define GLERR(fn, fl, ln, op)
#endif
Eina_Bool evas_gl_common_module_open(void);
void evas_gl_common_module_close(void);
#endif

View File

@ -3,6 +3,7 @@
#define GLPIPES 1
static int sym_done = 0;
int _evas_engine_GL_common_log_dom = -1;
typedef void (*glsym_func_void) ();
@ -34,7 +35,7 @@ static int dbgflushnum = -1;
static void
sym_missing(void)
{
printf("EVAS ERROR - GL symbols missing!\n");
ERR("GL symbols missing!");
}
static void
@ -114,24 +115,30 @@ static Evas_GL_Shared *shared = NULL;
void
glerr(int err, const char *file, const char *func, int line, const char *op)
{
fprintf(stderr, "GLERR: %s:%i %s(), %s: ", file, line, func, op);
const char *errmsg;
char buf[32];
switch (err)
{
case GL_INVALID_ENUM:
fprintf(stderr, "GL_INVALID_ENUM\n");
errmsg = "GL_INVALID_ENUM";
break;
case GL_INVALID_VALUE:
fprintf(stderr, "GL_INVALID_VALUE\n");
errmsg = "GL_INVALID_VALUE";
break;
case GL_INVALID_OPERATION:
fprintf(stderr, "GL_INVALID_OPERATION\n");
errmsg = "GL_INVALID_OPERATION";
break;
case GL_OUT_OF_MEMORY:
fprintf(stderr, "GL_OUT_OF_MEMORY\n");
errmsg = "GL_OUT_OF_MEMORY";
break;
default:
fprintf(stderr, "0x%x\n", err);
snprintf(buf, sizeof(buf), "%#x", err);
errmsg = buf;
}
eina_log_print(_evas_engine_GL_common_log_dom, EINA_LOG_LEVEL_ERR,
file, func, line, "%s: %s", op, errmsg);
}
static void
@ -2214,7 +2221,7 @@ again:
if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert))
{
// FIXME: handle yinvert
fprintf(stderr, "EVAS GL ENGINE ERROR: not handling inverted y case for map4\n");
ERR("not handling inverted y case for map4");
}
cmul = ARGB_JOIN(a, r, g, b);
@ -2585,3 +2592,25 @@ shader_array_flush(Evas_GL_Context *gc)
if (done > 0) printf("DONE (pipes): %i\n", done);
}
}
Eina_Bool
evas_gl_common_module_open(void)
{
if (_evas_engine_GL_common_log_dom < 0)
_evas_engine_GL_common_log_dom = eina_log_domain_register
("evas-gl_common", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_GL_common_log_dom < 0)
{
EINA_LOG_ERR("Can not create a module log domain.");
return EINA_FALSE;
}
return EINA_TRUE;
}
void
evas_gl_common_module_close(void)
{
if (_evas_engine_GL_common_log_dom < 0) return;
eina_log_domain_unregister(_evas_engine_GL_common_log_dom);
_evas_engine_GL_common_log_dom = -1;
}

View File

@ -456,7 +456,7 @@ _evas_gl_common_image_update(Evas_GL_Context *gc, Evas_GL_Image *im)
if (!im->tex) return;
break;
default:
printf("unhandled img format\n");
ERR("unhandled img format colorspace=%d", im->cs.space);
break;
}
}

View File

@ -4,4 +4,31 @@
#include <dlfcn.h> /* dlopen,dlclose,etc */
extern int _evas_engine_GL_common_log_dom;
#ifdef ERR
# undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_GL_common_log_dom, __VA_ARGS__)
#ifdef DBG
# undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_GL_common_log_dom, __VA_ARGS__)
#ifdef INF
# undef INF
#endif
#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_GL_common_log_dom, __VA_ARGS__)
#ifdef WRN
# undef WRN
#endif
#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_GL_common_log_dom, __VA_ARGS__)
#ifdef CRIT
# undef CRIT
#endif
#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_GL_common_log_dom, __VA_ARGS__)
#endif

View File

@ -415,7 +415,7 @@ gl_compile_link_error(GLuint target, const char *action)
if (logtxt)
{
glGetShaderInfoLog(target, loglen, &chars, logtxt);
printf("Failed to %s: %s\n", action, logtxt);
ERR("Failed to %s: %s", action, logtxt);
free(logtxt);
}
}
@ -428,7 +428,7 @@ gl_compile_link_error(GLuint target, const char *action)
if (logtxt)
{
glGetProgramInfoLog(target, loglen, &chars, logtxt);
printf("Failed to %s: %s\n", action, logtxt);
ERR("Failed to %s: %s", action, logtxt);
free(logtxt);
}
}
@ -461,7 +461,7 @@ evas_gl_common_shader_program_init(Evas_GL_Program *p,
if (!ok)
{
gl_compile_link_error(p->vert, "compile vertex shader");
printf("Abort compile of shader vert (%s):\n%s\n", name, vert->src);
ERR("Abort compile of shader vert (%s): %s", name, vert->src);
return 0;
}
glShaderSource(p->frag, 1,
@ -475,7 +475,7 @@ evas_gl_common_shader_program_init(Evas_GL_Program *p,
if (!ok)
{
gl_compile_link_error(p->frag, "compile fragment shader");
printf("Abort compile of shader frag (%s):\n%s\n", name, frag->src);
ERR("Abort compile of shader frag (%s): %s", name, frag->src);
return 0;
}
#endif
@ -504,8 +504,8 @@ evas_gl_common_shader_program_init(Evas_GL_Program *p,
if (!ok)
{
gl_compile_link_error(p->prog, "link fragment and vertex shaders");
printf("Abort compile of shader frag (%s):\n%s\n", name, frag->src);
printf("Abort compile of shader vert (%s):\n%s\n", name, vert->src);
ERR("Abort compile of shader frag (%s): %s", name, frag->src);
ERR("Abort compile of shader vert (%s): %s", name, vert->src);
return 0;
}
return 1;

View File

@ -788,13 +788,15 @@ static int
module_open(Evas_Module *em)
{
if (!em) return 0;
if (!evas_gl_common_module_open()) 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)
_evas_engine_GL_glew_log_dom = eina_log_domain_register
("evas-gl_glew", 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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
func = pfunc;
@ -864,6 +866,7 @@ static void
module_close(Evas_Module *em)
{
eina_log_domain_unregister(_evas_engine_GL_glew_log_dom);
evas_gl_common_module_close();
}
static Evas_Module_Api evas_modapi =

View File

@ -55,7 +55,7 @@ eng_window_new(HWND window,
if (!GLEW_VERSION_2_0)
{
fprintf(stderr, "\nERROR: OpenGL 2.0 not supported. Exiting...\n\n");
ERR("OpenGL 2.0 not supported. Exiting...");
goto delete_context;
}

View File

@ -855,13 +855,15 @@ static int
module_open(Evas_Module *em)
{
if (!em) return 0;
if (!evas_gl_common_module_open()) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
if (_evas_engine_GL_SDL_log_dom < 0)
_evas_engine_GL_SDL_log_dom = eina_log_domain_register("EvasEngineGLSDL", EVAS_DEFAULT_LOG_COLOR);
_evas_engine_GL_SDL_log_dom = eina_log_domain_register
("evas-gl_sdl", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_GL_SDL_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for GL SDL engine.\n");
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
@ -931,6 +933,7 @@ static void
module_close(Evas_Module *em)
{
eina_log_domain_unregister(_evas_engine_GL_SDL_log_dom);
evas_gl_common_module_close();
}
static Evas_Module_Api evas_modapi =
@ -994,16 +997,12 @@ _sdl_output_setup (int w, int h, int fullscreen, int noframe)
if (!surface)
{
CRIT("SDL_SetVideoMode [ %i x %i x 32 ] failed.", w, h);
CRIT("SDL: %s\n", SDL_GetError());
CRIT("SDL_SetVideoMode [ %i x %i x 32 ] failed. %s", w, h, SDL_GetError());
SDL_Quit();
exit(-1);
}
fprintf(stderr, "Screen Depth : %d\n", SDL_GetVideoSurface()->format->BitsPerPixel);
fprintf(stderr, "Vendor : %s\n", glGetString(GL_VENDOR));
fprintf(stderr, "Renderer : %s\n", glGetString(GL_RENDERER));
fprintf(stderr, "Version : %s\n", glGetString(GL_VERSION));
INF("Screen Depth: %d, Vendor: '%s', Renderer: '%s', Version: '%s'", SDL_GetVideoSurface()->format->BitsPerPixel, glGetString(GL_VENDOR), glGetString(GL_RENDERER), glGetString(GL_VERSION));
re->gl_context = evas_gl_common_context_new();
if (!re->gl_context)

View File

@ -221,7 +221,7 @@ _re_wincheck(Render_Engine *re)
eng_window_resurf(re->win);
if (!re->win->surf)
{
fprintf(stderr, "ERROR: GL engine can't re-create window surface!\n");
ERR("GL engine can't re-create window surface!");
}
return 0;
}
@ -986,10 +986,10 @@ _native_bind_cb(void *data, void *image)
{
glsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, n->egl_surface);
if (eglGetError() != EGL_SUCCESS)
printf("Error: glEGLImageTargetTexture2DOES() fail.\n");
ERR("glEGLImageTargetTexture2DOES() failed.");
}
else
printf("Try glEGLImageTargetTexture2DOES on EGL with no support\n");
ERR("Try glEGLImageTargetTexture2DOES on EGL with no support");
}
#else
# ifdef GLX_BIND_TO_TEXTURE_TARGETS_EXT
@ -1002,7 +1002,7 @@ _native_bind_cb(void *data, void *image)
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
}
else
printf("Try glXBindTexImage on GLX with no support\n");
ERR("Try glXBindTexImage on GLX with no support");
# endif
#endif
}
@ -1026,7 +1026,7 @@ _native_unbind_cb(void *data, void *image)
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
}
else
printf("Try glXReleaseTexImage on GLX with no support\n");
ERR("Try glXReleaseTexImage on GLX with no support");
# endif
#endif
}
@ -1049,10 +1049,10 @@ _native_free_cb(void *data, void *image)
glsym_eglDestroyImage(re->win->egl_disp,
n->egl_surface);
if (eglGetError() != EGL_SUCCESS)
printf("Error: eglDestroyImage() fail.\n");
ERR("eglDestroyImage() failed.");
}
else
printf("Try eglDestroyImage on EGL with no support\n");
ERR("Try eglDestroyImage on EGL with no support");
}
#else
# ifdef GLX_BIND_TO_TEXTURE_TARGETS_EXT
@ -1067,7 +1067,7 @@ _native_free_cb(void *data, void *image)
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
}
else
printf("Try glXReleaseTexImage on GLX with no support\n");
ERR("Try glXReleaseTexImage on GLX with no support");
}
if (glsym_glXDestroyPixmap)
{
@ -1075,7 +1075,7 @@ _native_free_cb(void *data, void *image)
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
}
else
printf("Try glXDestroyPixmap on GLX with no support\n");
ERR("Try glXDestroyPixmap on GLX with no support");
n->glx_pixmap = 0;
}
# endif
@ -1173,7 +1173,7 @@ eng_image_native_set(void *data, void *image, void *native)
if (!eglChooseConfig(re->win->egl_disp, config_attrs,
&egl_config, 1, &num_config))
printf("ERROR: eglChooseConfig() failed for pixmap 0x%x, num_config = %i\n", (unsigned int)pm, num_config);
ERR("eglChooseConfig() failed for pixmap 0x%x, num_config = %i", (unsigned int)pm, num_config);
n->pixmap = pm;
n->visual = vis;
if (glsym_eglCreateImage)
@ -1183,9 +1183,9 @@ eng_image_native_set(void *data, void *image, void *native)
(void *)pm,
NULL);
else
printf("Try eglCreateImage on EGL with no support\n");
ERR("Try eglCreateImage on EGL with no support");
if (!n->egl_surface)
printf("ERROR: eglCreatePixmapSurface() for 0x%x failed\n", (unsigned int)pm);
ERR("eglCreatePixmapSurface() for 0x%x failed", (unsigned int)pm);
im->native.yinvert = 1;
im->native.loose = 0;
im->native.data = n;
@ -1226,12 +1226,12 @@ eng_image_native_set(void *data, void *image, void *native)
else if ((re->win->depth_cfg[depth].tex_target &
GLX_TEXTURE_RECTANGLE_BIT_EXT))
{
printf("rect!!! (not handled)\n");
ERR("rect!!! (not handled)");
target = GLX_TEXTURE_RECTANGLE_EXT;
}
if (!target)
{
printf("broken text-from-pixmap\n");
ERR("broken text-from-pixmap");
if (!(re->win->depth_cfg[depth].tex_target &
GLX_TEXTURE_2D_BIT_EXT))
target = GLX_TEXTURE_RECTANGLE_EXT;
@ -1264,14 +1264,14 @@ eng_image_native_set(void *data, void *image, void *native)
n->pixmap,
pixmap_att);
else
printf("Try glXCreatePixmap on GLX with no support\n");
ERR("Try glXCreatePixmap on GLX with no support");
if (n->glx_pixmap)
{
// printf("%p: new native texture for %x | %4i x %4i @ %2i = %p\n",
// n, pm, w, h, depth, n->glx_pixmap);
if (!target)
{
printf("no target :(\n");
ERR("no target :(");
if (glsym_glXQueryDrawable)
glsym_glXQueryDrawable(re->win->disp,
n->pixmap,
@ -1294,11 +1294,11 @@ eng_image_native_set(void *data, void *image, void *native)
{
im->native.target = GL_TEXTURE_2D;
im->native.mipmap = 0;
printf("still unknown target\n");
ERR("still unknown target");
}
}
else
printf("ERROR: GLX Pixmap create fail\n");
ERR("GLX Pixmap create fail");
im->native.yinvert = re->win->depth_cfg[depth].yinvert;
im->native.loose = re->win->detected.loose_binding;
im->native.data = n;
@ -1777,13 +1777,15 @@ module_open(Evas_Module *em)
}
if (!em) return 0;
if (!evas_gl_common_module_open()) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
if (_evas_engine_GL_X11_log_dom < 0)
_evas_engine_GL_X11_log_dom = eina_log_domain_register("EvasEngineGLX11", EVAS_DEFAULT_LOG_COLOR);
_evas_engine_GL_X11_log_dom = eina_log_domain_register
("evas-gl_x11", 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");
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
@ -1865,6 +1867,7 @@ module_close(Evas_Module *em __UNUSED__)
xrdb_user.last_mtime = 0;
xrdb_user.db = NULL;
}
evas_gl_common_module_close();
}
static Evas_Module_Api evas_modapi =

View File

@ -159,23 +159,20 @@ eng_window_new(Display *disp,
gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)(gw->disp));
if (!gw->egl_disp)
{
printf("Error: eglGetDisplay() fail.\n");
printf("Error: error # was: 0x%x\n", eglGetError());
ERR("eglGetDisplay() fail. code=%#x", eglGetError());
eng_window_free(gw);
return NULL;
}
if (!eglInitialize(gw->egl_disp, &major_version, &minor_version))
{
printf("Error: eglInitialize() fail.\n");
printf("Error: error # was: 0x%x\n", eglGetError());
ERR("eglInitialize() fail. code=%#x", eglGetError());
eng_window_free(gw);
return NULL;
}
eglBindAPI(EGL_OPENGL_ES_API);
if (eglGetError() != EGL_SUCCESS)
{
printf("Error: eglBindAPI() fail.\n");
printf("Error: error # was: 0x%x\n", eglGetError());
ERR("eglBindAPI() fail. code=%#x", eglGetError());
eng_window_free(gw);
return NULL;
}
@ -184,8 +181,7 @@ eng_window_new(Display *disp,
if (!eglChooseConfig(gw->egl_disp, config_attrs, &gw->egl_config,
1, &num_config) || (num_config != 1))
{
printf("Error: eglChooseConfig() fail.\n");
printf("Error: error # was: 0x%x\n", eglGetError());
ERR("eglChooseConfig() fail. code=%#x", eglGetError());
eng_window_free(gw);
return NULL;
}
@ -194,8 +190,8 @@ eng_window_new(Display *disp,
NULL);
if (gw->egl_surface[0] == EGL_NO_SURFACE)
{
printf("Error: eglCreateWindowSurface() fail for 0x%x.\n", (unsigned int)gw->win);
printf("Error: error # was: 0x%x\n", eglGetError());
ERR("eglCreateWindowSurface() fail for %#x. code=%#x",
(unsigned int)gw->win, eglGetError());
eng_window_free(gw);
return NULL;
}
@ -205,8 +201,7 @@ eng_window_new(Display *disp,
gw->egl_context[0] = context;
if (gw->egl_context[0] == EGL_NO_CONTEXT)
{
printf("Error: eglCreateContext() fail.\n");
printf("Error: error # was: 0x%x\n", eglGetError());
ERR("eglCreateContext() fail. code=%#x", eglGetError());
eng_window_free(gw);
return NULL;
}
@ -215,8 +210,7 @@ eng_window_new(Display *disp,
gw->egl_surface[0],
gw->egl_context[0]) == EGL_FALSE)
{
printf("Error: eglMakeCurrent() fail.\n");
printf("Error: error # was: 0x%x\n", eglGetError());
ERR("eglMakeCurrent() fail. code=%#x", eglGetError());
eng_window_free(gw);
return NULL;
}
@ -346,7 +340,7 @@ eng_window_new(Display *disp,
fbc = glXGetFBConfigs(gw->disp, screen, &num);
if (!fbc)
{
printf("Error: glXGetFBConfigs() returned no fb configs\n");
ERR("glXGetFBConfigs() returned no fb configs");
eng_window_free(gw);
return NULL;
}
@ -422,7 +416,7 @@ eng_window_new(Display *disp,
XFree(fbc);
if (!gw->depth_cfg[DefaultDepth(gw->disp, screen)].fbc)
{
printf("texture from pixmap not going to work\n");
WRN("texture from pixmap not going to work");
}
}
#endif
@ -497,7 +491,7 @@ eng_window_use(Evas_GL_X11_Window *gw)
gw->egl_surface[0],
gw->egl_context[0]) == EGL_FALSE)
{
printf("Error: eglMakeCurrent() failed!\n");
ERR("eglMakeCurrent() failed!");
}
}
// GLX
@ -507,14 +501,14 @@ eng_window_use(Evas_GL_X11_Window *gw)
if (!glXMakeContextCurrent(gw->disp, gw->glxwin, gw->glxwin,
gw->context))
{
printf("Error: glXMakeContextCurrent(%p, %p, %p, %p)\n", (void *)gw->disp, (void *)gw->win, (void *)gw->win, (void *)gw->context);
ERR("glXMakeContextCurrent(%p, %p, %p, %p)", (void *)gw->disp, (void *)gw->win, (void *)gw->win, (void *)gw->context);
}
}
else
{
if (!glXMakeCurrent(gw->disp, gw->win, gw->context))
{
printf("Error: glXMakeCurrent(%p, 0x%x, %p) failed\n", gw->disp, (unsigned int)gw->win, (void *)gw->context);
ERR("glXMakeCurrent(%p, 0x%x, %p) failed", gw->disp, (unsigned int)gw->win, (void *)gw->context);
}
}
#endif
@ -564,8 +558,8 @@ eng_window_resurf(Evas_GL_X11_Window *gw)
NULL);
if (gw->egl_surface[0] == EGL_NO_SURFACE)
{
printf("Error: eglCreateWindowSurface() fail for 0x%x.\n", (unsigned int)gw->win);
printf("Error: error # was: 0x%x\n", eglGetError());
ERR("eglCreateWindowSurface() fail for %#x. code=%#x",
(unsigned int)gw->win, eglGetError());
return;
}
if (eglMakeCurrent(gw->egl_disp,
@ -573,7 +567,7 @@ eng_window_resurf(Evas_GL_X11_Window *gw)
gw->egl_surface[0],
gw->egl_context[0]) == EGL_FALSE)
{
printf("Error: eglMakeCurrent() failed!\n");
ERR("eglMakeCurrent() failed!");
}
#else
#ifdef NEWGL
@ -584,12 +578,12 @@ eng_window_resurf(Evas_GL_X11_Window *gw)
if (!glXMakeContextCurrent(gw->disp, gw->glxwin, gw->glxwin,
gw->context))
{
printf("Error: glXMakeContextCurrent(%p, %p, %p, %p)\n", (void *)gw->disp, (void *)gw->win, (void *)gw->win, (void *)gw->context);
ERR("glXMakeContextCurrent(%p, %p, %p, %p)", (void *)gw->disp, (void *)gw->win, (void *)gw->win, (void *)gw->context);
}
#else
if (!glXMakeCurrent(gw->disp, gw->win, gw->context))
{
printf("Error: glXMakeCurrent(%p, 0x%x, %p) failed\n", (void *)gw->disp, (unsigned int)gw->win, (void *)gw->context);
ERR("glXMakeCurrent(%p, 0x%x, %p) failed", (void *)gw->disp, (unsigned int)gw->win, (void *)gw->context);
}
#endif
#endif
@ -700,7 +694,7 @@ eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo)
config_attrs, &num);
if ((!configs) || (num < 1))
{
printf("Error: glXChooseFBConfig returned no configs\n");
ERR("glXChooseFBConfig returned no configs");
}
for (i = 0; i < num; i++)
{

View File

@ -1217,11 +1217,12 @@ module_open(Evas_Module *em)
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)
_evas_engine_quartz_log_dom = eina_log_domain_register
("evas-quartz", 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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_)

View File

@ -739,11 +739,12 @@ static int
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)
_evas_soft16_log_dom = eina_log_domain_register
("evas-software_16", 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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
em->functions = (void *)(&func);

View File

@ -574,10 +574,11 @@ module_open(Evas_Module *em)
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)
_evas_engine_soft16_ddraw_log_dom = eina_log_domain_register
("evas-software_16_ddraw", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_soft16_ddraw_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for Soft16_DDraw engine.\n");
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */

View File

@ -1030,11 +1030,12 @@ module_open(Evas_Module *em)
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)
_evas_engine_soft16_sdl_log_dom = eina_log_domain_register
("evas-software_16_sdl", 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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */

View File

@ -715,11 +715,11 @@ module_open(Evas_Module *em)
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)
_evas_engine_soft16_wince_log_dom = eina_log_domain_register
("evas-software_16_wince", 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.");
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}

View File

@ -51,7 +51,7 @@ _evas_software_wince_gxinfo_init(HDC dc, int *width, int *height, void **buffer)
(char *) &gxInfo);
if (result <= 0)
{
ERR("[Engine] [WinCE FB] ExtEscape() with GETGXINFO failed\n");
ERR("ExtEscape() with GETGXINFO failed");
return 0;
}
@ -79,7 +79,7 @@ evas_software_wince_fb_init(HWND window,
dc = GetDC (window);
if (!dc)
{
ERR("[Engine] [WinCE FB] Can not get DC\n");
ERR("Can not get DC");
free(priv);
return NULL;
}
@ -102,9 +102,8 @@ evas_software_wince_fb_init(HWND window,
if ((priv->width != width) ||
(priv->height != 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);
ERR("Size mismatch: asked: %dx%d, got: %dx%d",
width, height, priv->width, priv->height);
ReleaseDC(window, dc);
free(priv);
return NULL;
@ -119,8 +118,8 @@ evas_software_wince_fb_init(HWND window,
(rfbi.wBPP != 16) ||
(rfbi.wFormat != 1))
{
ERR("[Engine] [WinCE FB] ExtEscape() with GETRAWFRAMEBUFFER failed\n");
ERR("[Engine] [WinCE FB] trying ExtEscape() with GETGXINFO\n");
ERR("ExtEscape() with GETRAWFRAMEBUFFER failed. "
"Trying ExtEscape() with GETGXINFO");
if (!_evas_software_wince_gxinfo_init(dc, &priv->width, &priv->height, &priv->buffer))
{
ReleaseDC(window, dc);
@ -139,9 +138,8 @@ evas_software_wince_fb_init(HWND window,
if ((priv->width != width) ||
(priv->height != 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);
ERR("Size mismatch: asked: %dx%d, got: %dx%d",
width, height, priv->width, priv->height);
ReleaseDC(window, dc);
free(priv);
return NULL;

View File

@ -146,7 +146,7 @@ evas_software_wince_gapi_init(HWND window,
// verify pixel format
if(!(prop.ffFormat & kfDirect565) || (prop.cBPP != 16))
{
ERR("[Engine] [WinCE GAPI] display format mismatch\n");
ERR("display format mismatch");
goto close_display;
}
@ -154,7 +154,7 @@ evas_software_wince_gapi_init(HWND window,
if ((GetSystemMetrics(SM_CXSCREEN) != (int)prop.cxWidth) ||
(GetSystemMetrics(SM_CYSCREEN) != (int)prop.cyHeight))
{
ERR("[Engine] [WinCE GAPI] display size mismatch\n");
ERR("display size mismatch");
goto close_display;
}
@ -221,7 +221,7 @@ v | |
dc = GetDC (window);
if (!dc)
{
ERR("[Engine] [WinCE GAPI] Can not get device\n");
ERR("Can not get device");
goto close_display;
}
@ -230,7 +230,7 @@ v | |
(char *) &gxInfo);
if (result <= 0)
{
ERR("[Engine] [WinCE GAPI] ExtEscape failed\n");
ERR("ExtEscape failed");
ReleaseDC(window, dc);
goto close_display;
}
@ -249,9 +249,8 @@ v | |
if ((priv->width != width) ||
(priv->height != 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);
ERR("Size mismatch: asked: %dx%d, got: %dx%d",
width, height, priv->width, priv->height);
goto close_display;
}

View File

@ -37,7 +37,7 @@ evas_software_wince_gdi_init(HWND window,
priv->dc = GetDC(window);
if (!priv->dc)
{
ERR("[Engine] [WinCE GDI] Can not get DC\n");
ERR("Can not get DC");
free(priv);
return NULL;
}
@ -56,7 +56,7 @@ evas_software_wince_gdi_init(HWND window,
priv->bitmap_info = (BITMAPINFO_16bpp *)malloc(sizeof(BITMAPINFO_16bpp));
if (!priv->bitmap_info)
{
ERR("[Engine] [WinCE GDI] Can not allocate bitmap info\n");
ERR("Can not allocate bitmap info");
ReleaseDC(window, priv->dc);
free(priv);
return NULL;

View File

@ -674,11 +674,12 @@ module_open(Evas_Module *em)
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)
_evas_engine_soft16_x11_log_dom = eina_log_domain_register
("evas-software_16_x11", 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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */

View File

@ -785,12 +785,11 @@ module_open(Evas_Module * em)
{
if (!em)
return 0;
_evas_soft8_log_dom =
eina_log_domain_register("Soft8Engine", EVAS_DEFAULT_LOG_COLOR);
_evas_soft8_log_dom = eina_log_domain_register
("evas-software_8", EVAS_DEFAULT_LOG_COLOR);
if (_evas_soft8_log_dom < 0)
{
EINA_LOG_ERR
("Impossible to create a log domain for the soft8 Engine.\n");
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
em->functions = (void *)(&func);

View File

@ -646,12 +646,11 @@ module_open(Evas_Module * em)
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_8"))
return 0;
_evas_engine_soft8_x11_log_dom =
eina_log_domain_register("EvasSoft8X11", EVAS_DEFAULT_LOG_COLOR);
_evas_engine_soft8_x11_log_dom = eina_log_domain_register
("evas-software_8_x11", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_soft8_x11_log_dom < 0)
{
EINA_LOG_ERR
("Impossible to create a log domain for the Soft8_X11 engine.\n");
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}

View File

@ -325,11 +325,12 @@ module_open(Evas_Module *em)
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)
_evas_log_dom_module = eina_log_domain_register
("evas-software_ddraw", EVAS_DEFAULT_LOG_COLOR);
if (_evas_log_dom_module < 0)
{
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
func = pfunc;

View File

@ -332,11 +332,12 @@ module_open(Evas_Module *em)
/* 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)
_evas_engine_soft_gdi_log_dom = eina_log_domain_register
("evas-software_gdi", 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 0;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
func = pfunc;

View File

@ -906,11 +906,12 @@ static int
module_open(Evas_Module *em)
{
if (!em) return 0;
_evas_soft_gen_log_dom = eina_log_domain_register("EvasSoftGeneric", EVAS_DEFAULT_LOG_COLOR);
_evas_soft_gen_log_dom = eina_log_domain_register
("evas-software_generic", 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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
em->functions = (void *)(&func);
cpunum = eina_cpu_count();

View File

@ -273,11 +273,12 @@ module_open(Evas_Module *em)
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_LOG_COLOR);
_evas_engine_soft_qtopia_log_dom = eina_log_domain_register
("evas-software_qtopia", EVAS_DEFAULT_LOG_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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
func = pfunc;

View File

@ -861,11 +861,12 @@ static int module_open(Evas_Module *em)
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)
_evas_engine_soft_sdl_log_dom = eina_log_domain_register
("evas-software_sdl", 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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
func = pfunc;
@ -1187,14 +1188,14 @@ _sdl_image_debug(const char* context, Engine_Image_Entry* eie)
DBG("*** %s image (%p) ***", context, eim);
if (eim)
{
DBG ("* W: %i\n* H: %i\n* R: %i", eim->cache_entry.w, eim->cache_entry.h, eim->cache_entry.references);
DBG("W: %i, H: %i, R: %i", eim->cache_entry.w, eim->cache_entry.h, eim->cache_entry.references);
if (eim->cache_entry.src)
DBG ("* Pixels: %p\n* SDL Surface: %p",((RGBA_Image*) eim->cache_entry.src)->image.data, eim->surface);
DBG("Pixels: %p, SDL Surface: %p",((RGBA_Image*) eim->cache_entry.src)->image.data, eim->surface);
if (eim->surface)
DBG ("* Surface->pixels: %p", eim->surface->pixels);
DBG ("* Key: %s", eim->cache_entry.cache_key);
DBG ("* 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);
}
DBG ("*** ***");
DBG("*** ***");
}
#endif

View File

@ -874,11 +874,12 @@ module_open(Evas_Module *em)
/* 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)
_evas_engine_soft_x11_log_dom = eina_log_domain_register
("evas-software_x11", 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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
func = pfunc;

View File

@ -350,18 +350,14 @@ evas_software_xlib_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
evas_software_xlib_x_output_buffer_free(xob, 1);
if (!conv_func)
{
printf(".[ Evas Error ].\n"
" {\n"
" At depth %i:\n"
" RGB format mask: %08x, %08x, %08x\n"
" Palette mode: %i\n"
" Not supported by compiled in converters!\n"
" }\n",
buf->priv.x11.xlib.depth,
buf->priv.mask.r,
buf->priv.mask.g,
buf->priv.mask.b,
buf->priv.pal ? (int)buf->priv.pal->colors : -1);
ERR("At depth: %i, RGB format mask: %08x %08x %08x, "
"Palette mode: %i. "
"Not supported by compiled in converters!",
buf->priv.x11.xlib.depth,
buf->priv.mask.r,
buf->priv.mask.g,
buf->priv.mask.b,
buf->priv.pal ? (int)buf->priv.pal->colors : -1);
}
}
evas_software_xlib_outbuf_drawable_set(buf, draw);

View File

@ -1226,11 +1226,12 @@ module_open(Evas_Module *em)
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)
_evas_xrender_xcb_log_dom = eina_log_domain_register
("evas-xrender_x11", 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;
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
/* store it for later use */
func = pfunc;

View File

@ -370,10 +370,11 @@ static int
module_open(Evas_Module *em)
{
if (!em) return 0;
_evas_loader_tiff_log_dom = eina_log_domain_register("EvasLoaderTiff", EVAS_DEFAULT_LOG_COLOR);
_evas_loader_tiff_log_dom = eina_log_domain_register
("evas-tiff", EVAS_DEFAULT_LOG_COLOR);
if (_evas_loader_tiff_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for the LoaderTiff loader.\n");
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
em->functions = (void *)(&evas_image_load_tiff_func);

View File

@ -655,10 +655,11 @@ static int
module_open(Evas_Module *em)
{
if (!em) return 0;
_evas_loader_xpm_log_dom = eina_log_domain_register("EvasLoaderXpm", EVAS_DEFAULT_LOG_COLOR);
_evas_loader_xpm_log_dom = eina_log_domain_register
("evas-xpm", EVAS_DEFAULT_LOG_COLOR);
if (_evas_loader_xpm_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for the LoaderXpm loader.\n");
EINA_LOG_ERR("Can not create a module log domain.");
return 0;
}
em->functions = (void *)(&evas_image_load_xpm_func);