summaryrefslogtreecommitdiff
path: root/legacy/evas/src/modules/engines
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-09-27 06:56:41 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-09-27 06:56:41 +0000
commit17cfe5943363d6bf3a03a18b14afe8702b0b3792 (patch)
treed1cba5409ab00c137260172dc1b0461c95a8969a /legacy/evas/src/modules/engines
parent0951e8a9d1618eeef063d5859848aff8aab63432 (diff)
add an engine info field (4 bits) for swap mode :)
SVN revision: 77128
Diffstat (limited to 'legacy/evas/src/modules/engines')
-rw-r--r--legacy/evas/src/modules/engines/gl_x11/Evas_Engine_GL_X11.h13
-rw-r--r--legacy/evas/src/modules/engines/gl_x11/evas_engine.c19
2 files changed, 31 insertions, 1 deletions
diff --git a/legacy/evas/src/modules/engines/gl_x11/Evas_Engine_GL_X11.h b/legacy/evas/src/modules/engines/gl_x11/Evas_Engine_GL_X11.h
index fb2c81cf4e..aceb2ff8ae 100644
--- a/legacy/evas/src/modules/engines/gl_x11/Evas_Engine_GL_X11.h
+++ b/legacy/evas/src/modules/engines/gl_x11/Evas_Engine_GL_X11.h
@@ -5,6 +5,18 @@
5 5
6typedef struct _Evas_Engine_Info_GL_X11 Evas_Engine_Info_GL_X11; 6typedef struct _Evas_Engine_Info_GL_X11 Evas_Engine_Info_GL_X11;
7 7
8/* have this feature */
9#define EVAS_ENGINE_GL_X11_SWAP_MODE_EXISTS 1
10
11typedef enum _Evas_Engine_Info_GL_X11_Swap_Mode
12{
13 EVAS_ENGINE_GL_X11_SWAP_MODE_AUTO = 0,
14 EVAS_ENGINE_GL_X11_SWAP_MODE_FULL = 1,
15 EVAS_ENGINE_GL_X11_SWAP_MODE_COPY = 2,
16 EVAS_ENGINE_GL_X11_SWAP_MODE_DOUBLE = 3,
17 EVAS_ENGINE_GL_X11_SWAP_MODE_TRIPLE = 4
18} Evas_Engine_Info_GL_X11_Swap_Mode;
19
8struct _Evas_Engine_Info_GL_X11 20struct _Evas_Engine_Info_GL_X11
9{ 21{
10 /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ 22 /* PRIVATE - don't mess with this baby or evas will poke its tongue out */
@@ -42,5 +54,6 @@ struct _Evas_Engine_Info_GL_X11
42 54
43 unsigned char vsync : 1; // does nothing right now 55 unsigned char vsync : 1; // does nothing right now
44 unsigned char indirect : 1; // use indirect rendering 56 unsigned char indirect : 1; // use indirect rendering
57 unsigned char swap_mode : 4; // what swap mode to assume
45}; 58};
46#endif 59#endif
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
index 8f41290907..0992d505e9 100644
--- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
@@ -782,8 +782,25 @@ eng_setup(Evas *e, void *in)
782// copy (though using those explicitly is more efficient). so let's play with 782// copy (though using those explicitly is more efficient). so let's play with
783// triple buffer mdoe as a default and see. 783// triple buffer mdoe as a default and see.
784// re->mode = MODE_TRIPLE; 784// re->mode = MODE_TRIPLE;
785// XXX: note - the abvoe seems to break on some older intel chipsets and 785// XXX: note - the above seems to break on some older intel chipsets and
786// drivers. it seems we CANT depend on backbuffer staying around. bugger! 786// drivers. it seems we CANT depend on backbuffer staying around. bugger!
787 switch (info->swap_mode)
788 {
789 case EVAS_ENGINE_GL_X11_SWAP_MODE_FULL:
790 re->mode = MODE_FULL;
791 break;
792 case EVAS_ENGINE_GL_X11_SWAP_MODE_COPY:
793 re->mode = MODE_COPY;
794 break;
795 case EVAS_ENGINE_GL_X11_SWAP_MODE_DOUBLE:
796 re->mode = MODE_DOUBLE;
797 break;
798 case EVAS_ENGINE_GL_X11_SWAP_MODE_TRIPLE:
799 re->mode = MODE_TRIPLE;
800 break;
801 default:
802 break;
803 }
787 } 804 }
788 if (!re->win) 805 if (!re->win)
789 { 806 {