forked from enlightenment/efl
add environemnt vars to switch bounding box to full region list calcs
and an env var to show debug for partial updates.
This commit is contained in:
parent
9a649bc07a
commit
8f73a2bd0e
|
@ -17,6 +17,14 @@
|
||||||
#define EVAS_GL_NO_GL_H_CHECK 1
|
#define EVAS_GL_NO_GL_H_CHECK 1
|
||||||
#include "Evas_GL.h"
|
#include "Evas_GL.h"
|
||||||
|
|
||||||
|
enum {
|
||||||
|
MERGE_BOUNDING,
|
||||||
|
MERGE_FULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static int partial_render_debug = -1;
|
||||||
|
static int partial_rect_union_mode = -1;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
MODE_FULL,
|
MODE_FULL,
|
||||||
MODE_COPY,
|
MODE_COPY,
|
||||||
|
@ -1133,6 +1141,23 @@ _merge_rects(Tilebuf *tb, Tilebuf_Rect *r1, Tilebuf_Rect *r2, Tilebuf_Rect *r3)
|
||||||
}
|
}
|
||||||
rects = evas_common_tilebuf_get_render_rects(tb);
|
rects = evas_common_tilebuf_get_render_rects(tb);
|
||||||
|
|
||||||
|
if (partial_rect_union_mode == -1)
|
||||||
|
{
|
||||||
|
const char *s = getenv("EVAS_GL_PARTIAL_MERGE");
|
||||||
|
if (s)
|
||||||
|
{
|
||||||
|
if ((!strcmp(s, "bounding")) ||
|
||||||
|
(!strcmp(s, "b")))
|
||||||
|
partial_rect_union_mode = MERGE_BOUNDING;
|
||||||
|
else if ((!strcmp(s, "full")) ||
|
||||||
|
(!strcmp(s, "f")))
|
||||||
|
partial_rect_union_mode = MERGE_FULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
partial_rect_union_mode = MERGE_BOUNDING;
|
||||||
|
}
|
||||||
|
if (partial_rect_union_mode == MERGE_BOUNDING)
|
||||||
|
{
|
||||||
// bounding box -> make a bounding box single region update of all regions.
|
// bounding box -> make a bounding box single region update of all regions.
|
||||||
// yes we could try and be smart and figure out size of regions, how far
|
// yes we could try and be smart and figure out size of regions, how far
|
||||||
// apart etc. etc. to try and figure out an optimal "set". this is a tradeoff
|
// apart etc. etc. to try and figure out an optimal "set". this is a tradeoff
|
||||||
|
@ -1158,6 +1183,7 @@ _merge_rects(Tilebuf *tb, Tilebuf_Rect *r1, Tilebuf_Rect *r2, Tilebuf_Rect *r3)
|
||||||
rects->h = p2.y - p1.y;
|
rects->h = p2.y - p1.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
evas_common_tilebuf_clear(tb);
|
evas_common_tilebuf_clear(tb);
|
||||||
return rects;
|
return rects;
|
||||||
}
|
}
|
||||||
|
@ -1299,9 +1325,16 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
|
||||||
|
|
||||||
evas_gl_common_context_flush(re->win->gl_context);
|
evas_gl_common_context_flush(re->win->gl_context);
|
||||||
evas_gl_common_context_newframe(re->win->gl_context);
|
evas_gl_common_context_newframe(re->win->gl_context);
|
||||||
//// debug partial updates :)
|
if (partial_render_debug == -1)
|
||||||
// glClearColor(1.0, 0.5, 0.2, 1.0);
|
{
|
||||||
// glClear(GL_COLOR_BUFFER_BIT);
|
if (getenv("EVAS_GL_PARTIAL_DEBUG")) partial_render_debug = 1;
|
||||||
|
else partial_render_debug = 0;
|
||||||
|
}
|
||||||
|
if (partial_render_debug == 1)
|
||||||
|
{
|
||||||
|
glClearColor(0.2, 0.5, 1.0, 1.0);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!re->cur_rect)
|
if (!re->cur_rect)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue