forked from enlightenment/efl
Support an environment variable to set the number of buffers (double
buffer by default). Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 83281
This commit is contained in:
parent
18ba710320
commit
f785c9fc21
|
@ -53,6 +53,7 @@ evas_swapper_setup(int w, int h, Outbuf_Depth depth, Eina_Bool alpha, struct wl_
|
|||
{
|
||||
Wl_Swapper *ws;
|
||||
int i = 0;
|
||||
char *num_buffers;
|
||||
|
||||
/* try to allocate a new swapper */
|
||||
if (!(ws = calloc(1, sizeof(Wl_Swapper))))
|
||||
|
@ -69,6 +70,19 @@ evas_swapper_setup(int w, int h, Outbuf_Depth depth, Eina_Bool alpha, struct wl_
|
|||
/* double buffer by default */
|
||||
ws->buff_num = 2;
|
||||
|
||||
/* check for buffer override number */
|
||||
if ((num_buffers = getenv("EVAS_WAYLAND_SHM_BUFFERS")))
|
||||
{
|
||||
int num = 0;
|
||||
|
||||
num = atoi(num_buffers);
|
||||
|
||||
if (num <= 0) num = 1;
|
||||
if (num > 3) num = 3;
|
||||
|
||||
ws->buff_num = num;
|
||||
}
|
||||
|
||||
for (i = 0; i < ws->buff_num; i++)
|
||||
{
|
||||
/* try to create new internal Wl_Buffer */
|
||||
|
|
Loading…
Reference in New Issue