From 0549daab4aeea154be0165bb8bc81d64f1c56d96 Mon Sep 17 00:00:00 2001 From: raster Date: Tue, 25 Oct 2011 12:01:44 +0000 Subject: [PATCH] disable getting of xft.dpi - always been an option but it just leads to inconsistent rendering. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@64386 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/engines/gl_x11/evas_engine.c | 17 +++++++++------ src/modules/engines/software_16_x11/evas_engine.c | 14 +++++++----- src/modules/engines/software_x11/evas_engine.c | 26 +++++++++++++---------- 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/src/modules/engines/gl_x11/evas_engine.c b/src/modules/engines/gl_x11/evas_engine.c index dcedbdd..3686e06 100644 --- a/src/modules/engines/gl_x11/evas_engine.c +++ b/src/modules/engines/gl_x11/evas_engine.c @@ -32,12 +32,12 @@ struct _Render_Engine Evas *evas; Tilebuf *tb; int end; - +/* XrmDatabase xrdb; // xres - dpi struct { // xres - dpi int dpi; // xres - dpi } xr; // xres - dpi - + */ int w, h; int vsync; @@ -611,7 +611,7 @@ static Evas_Func func, pfunc; /* Function table for GL APIs */ static Evas_GL_API gl_funcs; - +/* struct xrdb_user { time_t last_stat; @@ -626,7 +626,7 @@ xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val) time_t last = xrdb_user.last_stat, now = time(NULL); xrdb_user.last_stat = now; - if (last != now) /* don't stat() more than once every second */ + if (last != now) // don't stat() more than once every second { struct stat st; const char *home = getenv("HOME"); @@ -656,7 +656,8 @@ xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val) xrdb_user.last_mtime = 0; return EINA_FALSE; } - +*/ + static void * eng_info(Evas *e) { @@ -874,7 +875,7 @@ eng_setup(Evas *e, void *in) } gl_wins++; - +/* { int status; char *type = NULL; @@ -928,7 +929,7 @@ eng_setup(Evas *e, void *in) } } } - + */ if (!initted) { evas_common_cpu_init(); @@ -3952,6 +3953,7 @@ static void module_close(Evas_Module *em __UNUSED__) { eina_log_domain_unregister(_evas_engine_GL_X11_log_dom); +/* if (xrdb_user.db) { XrmDestroyDatabase(xrdb_user.db); @@ -3959,6 +3961,7 @@ module_close(Evas_Module *em __UNUSED__) xrdb_user.last_mtime = 0; xrdb_user.db = NULL; } + */ evas_gl_common_module_close(); } diff --git a/src/modules/engines/software_16_x11/evas_engine.c b/src/modules/engines/software_16_x11/evas_engine.c index 9a49e44..5378972 100644 --- a/src/modules/engines/software_16_x11/evas_engine.c +++ b/src/modules/engines/software_16_x11/evas_engine.c @@ -7,7 +7,7 @@ int _evas_engine_soft16_x11_log_dom = -1; /* function tables - filled in later (func and parent func) */ static Evas_Func func, pfunc; - +/* struct xrdb_user { time_t last_stat; @@ -22,7 +22,7 @@ xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val) time_t last = xrdb_user.last_stat, now = time(NULL); xrdb_user.last_stat = now; - if (last != now) /* don't stat() more than once every second */ + if (last != now) // don't stat() more than once every second { struct stat st; const char *home = getenv("HOME"); @@ -52,6 +52,7 @@ xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val) xrdb_user.last_mtime = 0; return EINA_FALSE; } +*/ /* engine struct data */ typedef struct _Render_Engine Render_Engine; @@ -65,12 +66,12 @@ struct _Render_Engine Tilebuf *tb; Tilebuf_Rect *rects; Tilebuf_Rect *cur_rect; - +/* XrmDatabase xrdb; // xres - dpi struct { // xres - dpi int dpi; // xres - dpi } xr; // xres - dpi - + */ X_Output_Buffer *shbuf; Soft16_Image *tmp_out; /* used by indirect render, like rotation */ Region clip_rects; @@ -227,7 +228,7 @@ eng_setup(Evas *e, void *in) } if (!e->engine.data.output) return 0; - +/* { int status; char *type = NULL; @@ -281,6 +282,7 @@ eng_setup(Evas *e, void *in) } evas_common_font_dpi_set(re->xr.dpi / 1000); } + */ /* add a draw context if we dont have one */ if (!e->engine.data.context) @@ -709,6 +711,7 @@ static void module_close(Evas_Module *em __UNUSED__) { eina_log_domain_unregister(_evas_engine_soft16_x11_log_dom); +/* if (xrdb_user.db) { XrmDestroyDatabase(xrdb_user.db); @@ -716,6 +719,7 @@ module_close(Evas_Module *em __UNUSED__) xrdb_user.last_mtime = 0; xrdb_user.db = NULL; } + */ } static Evas_Module_Api evas_modapi = diff --git a/src/modules/engines/software_x11/evas_engine.c b/src/modules/engines/software_x11/evas_engine.c index cb07032..0a2d2a3 100644 --- a/src/modules/engines/software_x11/evas_engine.c +++ b/src/modules/engines/software_x11/evas_engine.c @@ -21,6 +21,7 @@ int _evas_engine_soft_x11_log_dom = -1; static Evas_Func func, pfunc; #ifdef BUILD_ENGINE_SOFTWARE_XLIB +/* struct xrdb_user { time_t last_stat; @@ -38,7 +39,7 @@ xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val) now = time(NULL); xrdb_user.last_stat = now; - if (last != now) /* don't stat() more than once every second */ + if (last != now) // don't stat() more than once every second { struct stat st; const char *home; @@ -70,6 +71,7 @@ xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val) xrdb_user.last_mtime = 0; return EINA_FALSE; } +*/ #endif /* engine struct data */ @@ -82,7 +84,7 @@ struct _Render_Engine Tilebuf_Rect *rects; Eina_Inlist *cur_rect; unsigned char end : 1; - +/* #ifdef BUILD_ENGINE_SOFTWARE_XLIB XrmDatabase xrdb; #endif @@ -90,7 +92,7 @@ struct _Render_Engine { int dpi; } xr; - + */ #ifdef EVAS_FRAME_QUEUING Evas_Engine_Render_Mode render_mode; #endif @@ -138,16 +140,16 @@ _output_xlib_setup(int w, int h, int rot, Display *disp, Drawable draw, int shape_dither, int destination_alpha) { Render_Engine *re; - int status; - char *type = NULL; - XrmValue val; +// int status; +// char *type = NULL; +// XrmValue val; if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL; evas_software_xlib_x_init(); evas_software_xlib_x_color_init(); evas_software_xlib_outbuf_init(); - +/* re->xr.dpi = 75000; // dpy * 1000 status = xrdb_user_query("Xft.dpi", "Xft.Dpi", &type, &val); @@ -197,7 +199,7 @@ _output_xlib_setup(int w, int h, int rot, Display *disp, Drawable draw, evas_common_font_dpi_set(re->xr.dpi / 1000); } } - + */ re->ob = evas_software_xlib_outbuf_setup_x(w, h, rot, OUTBUF_DEPTH_INHERIT, disp, draw, vis, cmap, depth, grayscale, @@ -243,14 +245,14 @@ _output_xcb_setup(int w, int h, int rot, xcb_connection_t *conn, int shape_dither, int destination_alpha) { Render_Engine *re; - int v = 0; +// int v = 0; if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL; evas_software_xcb_init(); evas_software_xcb_color_init(); evas_software_xcb_outbuf_init(); - +/* // FIXME: re->xrdb _evas_xcb_xdefaults_init(); v = _evas_xcb_xdefaults_int_get("Xft", "dpi"); @@ -259,7 +261,7 @@ _output_xcb_setup(int w, int h, int rot, xcb_connection_t *conn, else re->xr.dpi = 75000; // dpy * 1000 evas_common_font_dpi_set(re->xr.dpi / 1000); - + */ re->ob = evas_software_xcb_outbuf_setup(w, h, rot, OUTBUF_DEPTH_INHERIT, conn, screen, draw, vis, cmap, depth, @@ -899,6 +901,7 @@ module_close(Evas_Module *em __UNUSED__) { eina_log_domain_unregister(_evas_engine_soft_x11_log_dom); #ifdef BUILD_ENGINE_SOFTWARE_XLIB +/* if (xrdb_user.db) { XrmDestroyDatabase(xrdb_user.db); @@ -906,6 +909,7 @@ module_close(Evas_Module *em __UNUSED__) xrdb_user.last_mtime = 0; xrdb_user.db = NULL; } + */ #endif } -- 2.7.4