forked from enlightenment/efl
add an engine info field (4 bits) for swap mode :)
SVN revision: 77128
This commit is contained in:
parent
0951e8a9d1
commit
17cfe59433
|
@ -5,6 +5,18 @@
|
||||||
|
|
||||||
typedef struct _Evas_Engine_Info_GL_X11 Evas_Engine_Info_GL_X11;
|
typedef struct _Evas_Engine_Info_GL_X11 Evas_Engine_Info_GL_X11;
|
||||||
|
|
||||||
|
/* have this feature */
|
||||||
|
#define EVAS_ENGINE_GL_X11_SWAP_MODE_EXISTS 1
|
||||||
|
|
||||||
|
typedef enum _Evas_Engine_Info_GL_X11_Swap_Mode
|
||||||
|
{
|
||||||
|
EVAS_ENGINE_GL_X11_SWAP_MODE_AUTO = 0,
|
||||||
|
EVAS_ENGINE_GL_X11_SWAP_MODE_FULL = 1,
|
||||||
|
EVAS_ENGINE_GL_X11_SWAP_MODE_COPY = 2,
|
||||||
|
EVAS_ENGINE_GL_X11_SWAP_MODE_DOUBLE = 3,
|
||||||
|
EVAS_ENGINE_GL_X11_SWAP_MODE_TRIPLE = 4
|
||||||
|
} Evas_Engine_Info_GL_X11_Swap_Mode;
|
||||||
|
|
||||||
struct _Evas_Engine_Info_GL_X11
|
struct _Evas_Engine_Info_GL_X11
|
||||||
{
|
{
|
||||||
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
|
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
|
||||||
|
@ -42,5 +54,6 @@ struct _Evas_Engine_Info_GL_X11
|
||||||
|
|
||||||
unsigned char vsync : 1; // does nothing right now
|
unsigned char vsync : 1; // does nothing right now
|
||||||
unsigned char indirect : 1; // use indirect rendering
|
unsigned char indirect : 1; // use indirect rendering
|
||||||
|
unsigned char swap_mode : 4; // what swap mode to assume
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -782,8 +782,25 @@ eng_setup(Evas *e, void *in)
|
||||||
// copy (though using those explicitly is more efficient). so let's play with
|
// copy (though using those explicitly is more efficient). so let's play with
|
||||||
// triple buffer mdoe as a default and see.
|
// triple buffer mdoe as a default and see.
|
||||||
// re->mode = MODE_TRIPLE;
|
// re->mode = MODE_TRIPLE;
|
||||||
// XXX: note - the abvoe seems to break on some older intel chipsets and
|
// XXX: note - the above seems to break on some older intel chipsets and
|
||||||
// drivers. it seems we CANT depend on backbuffer staying around. bugger!
|
// drivers. it seems we CANT depend on backbuffer staying around. bugger!
|
||||||
|
switch (info->swap_mode)
|
||||||
|
{
|
||||||
|
case EVAS_ENGINE_GL_X11_SWAP_MODE_FULL:
|
||||||
|
re->mode = MODE_FULL;
|
||||||
|
break;
|
||||||
|
case EVAS_ENGINE_GL_X11_SWAP_MODE_COPY:
|
||||||
|
re->mode = MODE_COPY;
|
||||||
|
break;
|
||||||
|
case EVAS_ENGINE_GL_X11_SWAP_MODE_DOUBLE:
|
||||||
|
re->mode = MODE_DOUBLE;
|
||||||
|
break;
|
||||||
|
case EVAS_ENGINE_GL_X11_SWAP_MODE_TRIPLE:
|
||||||
|
re->mode = MODE_TRIPLE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!re->win)
|
if (!re->win)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue