forked from enlightenment/efl
disable getting of xft.dpi - always been an option but it just leads
to inconsistent rendering. SVN revision: 64386
This commit is contained in:
parent
fb447485e8
commit
bc10321643
|
@ -32,12 +32,12 @@ struct _Render_Engine
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
Tilebuf *tb;
|
Tilebuf *tb;
|
||||||
int end;
|
int end;
|
||||||
|
/*
|
||||||
XrmDatabase xrdb; // xres - dpi
|
XrmDatabase xrdb; // xres - dpi
|
||||||
struct { // xres - dpi
|
struct { // xres - dpi
|
||||||
int dpi; // xres - dpi
|
int dpi; // xres - dpi
|
||||||
} xr; // xres - dpi
|
} xr; // xres - dpi
|
||||||
|
*/
|
||||||
int w, h;
|
int w, h;
|
||||||
int vsync;
|
int vsync;
|
||||||
|
|
||||||
|
@ -611,7 +611,7 @@ static Evas_Func func, pfunc;
|
||||||
|
|
||||||
/* Function table for GL APIs */
|
/* Function table for GL APIs */
|
||||||
static Evas_GL_API gl_funcs;
|
static Evas_GL_API gl_funcs;
|
||||||
|
/*
|
||||||
struct xrdb_user
|
struct xrdb_user
|
||||||
{
|
{
|
||||||
time_t last_stat;
|
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);
|
time_t last = xrdb_user.last_stat, now = time(NULL);
|
||||||
|
|
||||||
xrdb_user.last_stat = now;
|
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;
|
struct stat st;
|
||||||
const char *home = getenv("HOME");
|
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;
|
xrdb_user.last_mtime = 0;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
eng_info(Evas *e)
|
eng_info(Evas *e)
|
||||||
{
|
{
|
||||||
|
@ -874,7 +875,7 @@ eng_setup(Evas *e, void *in)
|
||||||
}
|
}
|
||||||
|
|
||||||
gl_wins++;
|
gl_wins++;
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
char *type = NULL;
|
char *type = NULL;
|
||||||
|
@ -928,7 +929,7 @@ eng_setup(Evas *e, void *in)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (!initted)
|
if (!initted)
|
||||||
{
|
{
|
||||||
evas_common_cpu_init();
|
evas_common_cpu_init();
|
||||||
|
@ -3952,6 +3953,7 @@ static void
|
||||||
module_close(Evas_Module *em __UNUSED__)
|
module_close(Evas_Module *em __UNUSED__)
|
||||||
{
|
{
|
||||||
eina_log_domain_unregister(_evas_engine_GL_X11_log_dom);
|
eina_log_domain_unregister(_evas_engine_GL_X11_log_dom);
|
||||||
|
/*
|
||||||
if (xrdb_user.db)
|
if (xrdb_user.db)
|
||||||
{
|
{
|
||||||
XrmDestroyDatabase(xrdb_user.db);
|
XrmDestroyDatabase(xrdb_user.db);
|
||||||
|
@ -3959,6 +3961,7 @@ module_close(Evas_Module *em __UNUSED__)
|
||||||
xrdb_user.last_mtime = 0;
|
xrdb_user.last_mtime = 0;
|
||||||
xrdb_user.db = NULL;
|
xrdb_user.db = NULL;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
evas_gl_common_module_close();
|
evas_gl_common_module_close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
int _evas_engine_soft16_x11_log_dom = -1;
|
int _evas_engine_soft16_x11_log_dom = -1;
|
||||||
/* function tables - filled in later (func and parent func) */
|
/* function tables - filled in later (func and parent func) */
|
||||||
static Evas_Func func, pfunc;
|
static Evas_Func func, pfunc;
|
||||||
|
/*
|
||||||
struct xrdb_user
|
struct xrdb_user
|
||||||
{
|
{
|
||||||
time_t last_stat;
|
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);
|
time_t last = xrdb_user.last_stat, now = time(NULL);
|
||||||
|
|
||||||
xrdb_user.last_stat = now;
|
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;
|
struct stat st;
|
||||||
const char *home = getenv("HOME");
|
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;
|
xrdb_user.last_mtime = 0;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/* engine struct data */
|
/* engine struct data */
|
||||||
typedef struct _Render_Engine Render_Engine;
|
typedef struct _Render_Engine Render_Engine;
|
||||||
|
@ -65,12 +66,12 @@ struct _Render_Engine
|
||||||
Tilebuf *tb;
|
Tilebuf *tb;
|
||||||
Tilebuf_Rect *rects;
|
Tilebuf_Rect *rects;
|
||||||
Tilebuf_Rect *cur_rect;
|
Tilebuf_Rect *cur_rect;
|
||||||
|
/*
|
||||||
XrmDatabase xrdb; // xres - dpi
|
XrmDatabase xrdb; // xres - dpi
|
||||||
struct { // xres - dpi
|
struct { // xres - dpi
|
||||||
int dpi; // xres - dpi
|
int dpi; // xres - dpi
|
||||||
} xr; // xres - dpi
|
} xr; // xres - dpi
|
||||||
|
*/
|
||||||
X_Output_Buffer *shbuf;
|
X_Output_Buffer *shbuf;
|
||||||
Soft16_Image *tmp_out; /* used by indirect render, like rotation */
|
Soft16_Image *tmp_out; /* used by indirect render, like rotation */
|
||||||
Region clip_rects;
|
Region clip_rects;
|
||||||
|
@ -227,7 +228,7 @@ eng_setup(Evas *e, void *in)
|
||||||
}
|
}
|
||||||
if (!e->engine.data.output) return 0;
|
if (!e->engine.data.output) return 0;
|
||||||
|
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
char *type = NULL;
|
char *type = NULL;
|
||||||
|
@ -281,6 +282,7 @@ eng_setup(Evas *e, void *in)
|
||||||
}
|
}
|
||||||
evas_common_font_dpi_set(re->xr.dpi / 1000);
|
evas_common_font_dpi_set(re->xr.dpi / 1000);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/* add a draw context if we dont have one */
|
/* add a draw context if we dont have one */
|
||||||
if (!e->engine.data.context)
|
if (!e->engine.data.context)
|
||||||
|
@ -709,6 +711,7 @@ static void
|
||||||
module_close(Evas_Module *em __UNUSED__)
|
module_close(Evas_Module *em __UNUSED__)
|
||||||
{
|
{
|
||||||
eina_log_domain_unregister(_evas_engine_soft16_x11_log_dom);
|
eina_log_domain_unregister(_evas_engine_soft16_x11_log_dom);
|
||||||
|
/*
|
||||||
if (xrdb_user.db)
|
if (xrdb_user.db)
|
||||||
{
|
{
|
||||||
XrmDestroyDatabase(xrdb_user.db);
|
XrmDestroyDatabase(xrdb_user.db);
|
||||||
|
@ -716,6 +719,7 @@ module_close(Evas_Module *em __UNUSED__)
|
||||||
xrdb_user.last_mtime = 0;
|
xrdb_user.last_mtime = 0;
|
||||||
xrdb_user.db = NULL;
|
xrdb_user.db = NULL;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Module_Api evas_modapi =
|
static Evas_Module_Api evas_modapi =
|
||||||
|
|
|
@ -21,6 +21,7 @@ int _evas_engine_soft_x11_log_dom = -1;
|
||||||
static Evas_Func func, pfunc;
|
static Evas_Func func, pfunc;
|
||||||
|
|
||||||
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
|
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
|
||||||
|
/*
|
||||||
struct xrdb_user
|
struct xrdb_user
|
||||||
{
|
{
|
||||||
time_t last_stat;
|
time_t last_stat;
|
||||||
|
@ -38,7 +39,7 @@ xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val)
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
|
|
||||||
xrdb_user.last_stat = now;
|
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;
|
struct stat st;
|
||||||
const char *home;
|
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;
|
xrdb_user.last_mtime = 0;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* engine struct data */
|
/* engine struct data */
|
||||||
|
@ -82,7 +84,7 @@ struct _Render_Engine
|
||||||
Tilebuf_Rect *rects;
|
Tilebuf_Rect *rects;
|
||||||
Eina_Inlist *cur_rect;
|
Eina_Inlist *cur_rect;
|
||||||
unsigned char end : 1;
|
unsigned char end : 1;
|
||||||
|
/*
|
||||||
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
|
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
|
||||||
XrmDatabase xrdb;
|
XrmDatabase xrdb;
|
||||||
#endif
|
#endif
|
||||||
|
@ -90,7 +92,7 @@ struct _Render_Engine
|
||||||
{
|
{
|
||||||
int dpi;
|
int dpi;
|
||||||
} xr;
|
} xr;
|
||||||
|
*/
|
||||||
#ifdef EVAS_FRAME_QUEUING
|
#ifdef EVAS_FRAME_QUEUING
|
||||||
Evas_Engine_Render_Mode render_mode;
|
Evas_Engine_Render_Mode render_mode;
|
||||||
#endif
|
#endif
|
||||||
|
@ -138,16 +140,16 @@ _output_xlib_setup(int w, int h, int rot, Display *disp, Drawable draw,
|
||||||
int shape_dither, int destination_alpha)
|
int shape_dither, int destination_alpha)
|
||||||
{
|
{
|
||||||
Render_Engine *re;
|
Render_Engine *re;
|
||||||
int status;
|
// int status;
|
||||||
char *type = NULL;
|
// char *type = NULL;
|
||||||
XrmValue val;
|
// XrmValue val;
|
||||||
|
|
||||||
if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL;
|
if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL;
|
||||||
|
|
||||||
evas_software_xlib_x_init();
|
evas_software_xlib_x_init();
|
||||||
evas_software_xlib_x_color_init();
|
evas_software_xlib_x_color_init();
|
||||||
evas_software_xlib_outbuf_init();
|
evas_software_xlib_outbuf_init();
|
||||||
|
/*
|
||||||
re->xr.dpi = 75000; // dpy * 1000
|
re->xr.dpi = 75000; // dpy * 1000
|
||||||
|
|
||||||
status = xrdb_user_query("Xft.dpi", "Xft.Dpi", &type, &val);
|
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);
|
evas_common_font_dpi_set(re->xr.dpi / 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
re->ob =
|
re->ob =
|
||||||
evas_software_xlib_outbuf_setup_x(w, h, rot, OUTBUF_DEPTH_INHERIT, disp,
|
evas_software_xlib_outbuf_setup_x(w, h, rot, OUTBUF_DEPTH_INHERIT, disp,
|
||||||
draw, vis, cmap, depth, grayscale,
|
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)
|
int shape_dither, int destination_alpha)
|
||||||
{
|
{
|
||||||
Render_Engine *re;
|
Render_Engine *re;
|
||||||
int v = 0;
|
// int v = 0;
|
||||||
|
|
||||||
if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL;
|
if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL;
|
||||||
|
|
||||||
evas_software_xcb_init();
|
evas_software_xcb_init();
|
||||||
evas_software_xcb_color_init();
|
evas_software_xcb_color_init();
|
||||||
evas_software_xcb_outbuf_init();
|
evas_software_xcb_outbuf_init();
|
||||||
|
/*
|
||||||
// FIXME: re->xrdb
|
// FIXME: re->xrdb
|
||||||
_evas_xcb_xdefaults_init();
|
_evas_xcb_xdefaults_init();
|
||||||
v = _evas_xcb_xdefaults_int_get("Xft", "dpi");
|
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
|
else re->xr.dpi = 75000; // dpy * 1000
|
||||||
|
|
||||||
evas_common_font_dpi_set(re->xr.dpi / 1000);
|
evas_common_font_dpi_set(re->xr.dpi / 1000);
|
||||||
|
*/
|
||||||
re->ob =
|
re->ob =
|
||||||
evas_software_xcb_outbuf_setup(w, h, rot, OUTBUF_DEPTH_INHERIT, conn,
|
evas_software_xcb_outbuf_setup(w, h, rot, OUTBUF_DEPTH_INHERIT, conn,
|
||||||
screen, draw, vis, cmap, depth,
|
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);
|
eina_log_domain_unregister(_evas_engine_soft_x11_log_dom);
|
||||||
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
|
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
|
||||||
|
/*
|
||||||
if (xrdb_user.db)
|
if (xrdb_user.db)
|
||||||
{
|
{
|
||||||
XrmDestroyDatabase(xrdb_user.db);
|
XrmDestroyDatabase(xrdb_user.db);
|
||||||
|
@ -906,6 +909,7 @@ module_close(Evas_Module *em __UNUSED__)
|
||||||
xrdb_user.last_mtime = 0;
|
xrdb_user.last_mtime = 0;
|
||||||
xrdb_user.db = NULL;
|
xrdb_user.db = NULL;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue