forked from enlightenment/efl
parent
9d7a3a2bfc
commit
7ccee2cfe9
|
@ -506,12 +506,12 @@ evas_gl_common_context_new(void)
|
||||||
do { \
|
do { \
|
||||||
const char *__v = getenv(name); \
|
const char *__v = getenv(name); \
|
||||||
if (__v) { \
|
if (__v) { \
|
||||||
shared->info.tune.tune_param = atoi(__v); \
|
shared->info.tune.tune_param = atoi(__v); \
|
||||||
if (shared->info.tune.tune_param > max) \
|
if (shared->info.tune.tune_param > max) \
|
||||||
shared->info.tune.tune_param = max; \
|
shared->info.tune.tune_param = max; \
|
||||||
else if (shared->info.tune.tune_param < min) \
|
else if (shared->info.tune.tune_param < min) \
|
||||||
shared->info.tune.tune_param = min; \
|
shared->info.tune.tune_param = min; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
GETENVOPT("EVAS_GL_CUTOUT_MAX", cutout.max, -1, 0x7fffffff);
|
GETENVOPT("EVAS_GL_CUTOUT_MAX", cutout.max, -1, 0x7fffffff);
|
||||||
|
|
|
@ -180,7 +180,7 @@ _pool_tex_find(Evas_GL_Context *gc, int w, int h,
|
||||||
Evas_GL_Texture_Pool *pt = NULL;
|
Evas_GL_Texture_Pool *pt = NULL;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
int th, th2;
|
int th, th2;
|
||||||
|
|
||||||
if (atlas_w > gc->shared->info.max_texture_size)
|
if (atlas_w > gc->shared->info.max_texture_size)
|
||||||
atlas_w = gc->shared->info.max_texture_size;
|
atlas_w = gc->shared->info.max_texture_size;
|
||||||
if ((w > gc->shared->info.tune.atlas.max_w) ||
|
if ((w > gc->shared->info.tune.atlas.max_w) ||
|
||||||
|
@ -239,13 +239,13 @@ evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im)
|
||||||
if (gc->shared->info.bgra)
|
if (gc->shared->info.bgra)
|
||||||
tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2,
|
tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2,
|
||||||
im->cache_entry.h + 1, bgra_ifmt, bgra_fmt,
|
im->cache_entry.h + 1, bgra_ifmt, bgra_fmt,
|
||||||
&u, &v, &l_after,
|
&u, &v, &l_after,
|
||||||
gc->shared->info.tune.atlas.max_alloc_alpha_size);
|
gc->shared->info.tune.atlas.max_alloc_size);
|
||||||
else
|
else
|
||||||
tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2,
|
tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2,
|
||||||
im->cache_entry.h + 1, rgba_ifmt, rgba_fmt,
|
im->cache_entry.h + 1, rgba_ifmt, rgba_fmt,
|
||||||
&u, &v, &l_after,
|
&u, &v, &l_after,
|
||||||
gc->shared->info.tune.atlas.max_alloc_alpha_size);
|
gc->shared->info.tune.atlas.max_alloc_size);
|
||||||
tex->alpha = 1;
|
tex->alpha = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -270,7 +270,10 @@ evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im)
|
||||||
}
|
}
|
||||||
if (!tex->pt)
|
if (!tex->pt)
|
||||||
{
|
{
|
||||||
memset(tex, 0x11, sizeof(Evas_GL_Texture)); // mark as freed
|
// FIXME: mark as freed for now with 0x66, but this is me TRYING to
|
||||||
|
// find some mysterious bug i simply have been unable to catch or
|
||||||
|
// reproduce - so leave a trail and see how it goes.
|
||||||
|
memset(tex, 0x11, sizeof(Evas_GL_Texture));
|
||||||
free(tex);
|
free(tex);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -423,8 +426,7 @@ _pool_tex_dynamic_new(Evas_GL_Context *gc, int w, int h, int intformat, int form
|
||||||
|
|
||||||
pt = calloc(1, sizeof(Evas_GL_Texture_Pool));
|
pt = calloc(1, sizeof(Evas_GL_Texture_Pool));
|
||||||
if (!pt) return NULL;
|
if (!pt) return NULL;
|
||||||
// no atlas pools/sharing here
|
h = _tex_round_slot(gc, h) * gc->shared->info.tune.atlas.slot_size;
|
||||||
// h = _tex_round_slot(gc, h) * gc->shared->info.tune.atlas.slot_size;
|
|
||||||
_tex_adjust(gc, &w, &h);
|
_tex_adjust(gc, &w, &h);
|
||||||
pt->gc = gc;
|
pt->gc = gc;
|
||||||
pt->w = w;
|
pt->w = w;
|
||||||
|
@ -577,7 +579,10 @@ pt_unref(Evas_GL_Texture_Pool *pt)
|
||||||
glsym_glDeleteFramebuffers(1, &(pt->fb));
|
glsym_glDeleteFramebuffers(1, &(pt->fb));
|
||||||
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
|
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
|
||||||
}
|
}
|
||||||
memset(pt, 0x22, sizeof(Evas_GL_Texture_Pool)); // mark as freed
|
// FIXME: mark as freed for now with 0x66, but this is me TRYING to
|
||||||
|
// find some mysterious bug i simply have been unable to catch or
|
||||||
|
// reproduce - so leave a trail and see how it goes.
|
||||||
|
memset(pt, 0x22, sizeof(Evas_GL_Texture_Pool));
|
||||||
free(pt);
|
free(pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -608,7 +613,10 @@ evas_gl_common_texture_native_new(Evas_GL_Context *gc, int w, int h, int alpha,
|
||||||
}
|
}
|
||||||
if (!tex->pt)
|
if (!tex->pt)
|
||||||
{
|
{
|
||||||
memset(tex, 0x33, sizeof(Evas_GL_Texture)); // mark as freed
|
// FIXME: mark as freed for now with 0x66, but this is me TRYING to
|
||||||
|
// find some mysterious bug i simply have been unable to catch or
|
||||||
|
// reproduce - so leave a trail and see how it goes.
|
||||||
|
memset(tex, 0x33, sizeof(Evas_GL_Texture));
|
||||||
free(tex);
|
free(tex);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -647,7 +655,10 @@ evas_gl_common_texture_render_new(Evas_GL_Context *gc, int w, int h, int alpha)
|
||||||
}
|
}
|
||||||
if (!tex->pt)
|
if (!tex->pt)
|
||||||
{
|
{
|
||||||
memset(tex, 0x44, sizeof(Evas_GL_Texture)); // mark as freed
|
// FIXME: mark as freed for now with 0x66, but this is me TRYING to
|
||||||
|
// find some mysterious bug i simply have been unable to catch or
|
||||||
|
// reproduce - so leave a trail and see how it goes.
|
||||||
|
memset(tex, 0x44, sizeof(Evas_GL_Texture));
|
||||||
free(tex);
|
free(tex);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -690,7 +701,10 @@ evas_gl_common_texture_dynamic_new(Evas_GL_Context *gc, Evas_GL_Image *im)
|
||||||
}
|
}
|
||||||
if (!tex->pt)
|
if (!tex->pt)
|
||||||
{
|
{
|
||||||
memset(tex, 0x44, sizeof(Evas_GL_Texture)); // mark as freed
|
// FIXME: mark as freed for now with 0x66, but this is me TRYING to
|
||||||
|
// find some mysterious bug i simply have been unable to catch or
|
||||||
|
// reproduce - so leave a trail and see how it goes.
|
||||||
|
memset(tex, 0x55, sizeof(Evas_GL_Texture));
|
||||||
free(tex);
|
free(tex);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -800,7 +814,10 @@ evas_gl_common_texture_free(Evas_GL_Texture *tex)
|
||||||
}
|
}
|
||||||
if (tex->ptu) pt_unref(tex->ptu);
|
if (tex->ptu) pt_unref(tex->ptu);
|
||||||
if (tex->ptv) pt_unref(tex->ptv);
|
if (tex->ptv) pt_unref(tex->ptv);
|
||||||
memset(tex, 0x55, sizeof(Evas_GL_Texture)); // mark as freed
|
// FIXME: mark as freed for now with 0x66, but this is me TRYING to
|
||||||
|
// find some mysterious bug i simply have been unable to catch or
|
||||||
|
// reproduce - so leave a trail and see how it goes.
|
||||||
|
memset(tex, 0x66, sizeof(Evas_GL_Texture));
|
||||||
free(tex);
|
free(tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,15 +834,15 @@ evas_gl_common_texture_alpha_new(Evas_GL_Context *gc, DATA8 *pixels,
|
||||||
|
|
||||||
tex->gc = gc;
|
tex->gc = gc;
|
||||||
tex->references = 1;
|
tex->references = 1;
|
||||||
tex->pt = _pool_tex_find(gc, w + 3, fh, alpha_ifmt, alpha_fmt, &u, &v,
|
tex->pt = _pool_tex_find(gc, w + 3, fh, alpha_ifmt, alpha_fmt, &u, &v,
|
||||||
&l_after,
|
&l_after,
|
||||||
gc->shared->info.tune.atlas.max_alloc_alpha_size);
|
gc->shared->info.tune.atlas.max_alloc_alpha_size);
|
||||||
if (!tex->pt)
|
if (!tex->pt)
|
||||||
{
|
{
|
||||||
// FIXME: mark as freed for now with 0x66, but this is me TRYING to
|
// FIXME: mark as freed for now with 0x66, but this is me TRYING to
|
||||||
// find some mysterious bug i simply have been unable to catch or
|
// find some mysterious bug i simply have been unable to catch or
|
||||||
// reproduce - so leave a trail and see how it goes.
|
// reproduce - so leave a trail and see how it goes.
|
||||||
memset(tex, 0x66, sizeof(Evas_GL_Texture));
|
memset(tex, 0x77, sizeof(Evas_GL_Texture));
|
||||||
free(tex);
|
free(tex);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -880,7 +897,10 @@ evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, int w, int h)
|
||||||
tex->pt = _pool_tex_new(gc, w + 1, h + 1, lum_ifmt, lum_fmt);
|
tex->pt = _pool_tex_new(gc, w + 1, h + 1, lum_ifmt, lum_fmt);
|
||||||
if (!tex->pt)
|
if (!tex->pt)
|
||||||
{
|
{
|
||||||
memset(tex, 0x77, sizeof(Evas_GL_Texture)); // mark as freed
|
// FIXME: mark as freed for now with 0x66, but this is me TRYING to
|
||||||
|
// find some mysterious bug i simply have been unable to catch or
|
||||||
|
// reproduce - so leave a trail and see how it goes.
|
||||||
|
memset(tex, 0x88, sizeof(Evas_GL_Texture));
|
||||||
free(tex);
|
free(tex);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -892,7 +912,10 @@ evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, int w, int h)
|
||||||
if (!tex->ptu)
|
if (!tex->ptu)
|
||||||
{
|
{
|
||||||
pt_unref(tex->pt);
|
pt_unref(tex->pt);
|
||||||
memset(tex, 0x88, sizeof(Evas_GL_Texture)); // mark as freed
|
// FIXME: mark as freed for now with 0x66, but this is me TRYING to
|
||||||
|
// find some mysterious bug i simply have been unable to catch or
|
||||||
|
// reproduce - so leave a trail and see how it goes.
|
||||||
|
memset(tex, 0x99, sizeof(Evas_GL_Texture));
|
||||||
free(tex);
|
free(tex);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -905,7 +928,10 @@ evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, int w, int h)
|
||||||
{
|
{
|
||||||
pt_unref(tex->pt);
|
pt_unref(tex->pt);
|
||||||
pt_unref(tex->ptu);
|
pt_unref(tex->ptu);
|
||||||
memset(tex, 0x99, sizeof(Evas_GL_Texture)); // mark as freed
|
// FIXME: mark as freed for now with 0x66, but this is me TRYING to
|
||||||
|
// find some mysterious bug i simply have been unable to catch or
|
||||||
|
// reproduce - so leave a trail and see how it goes.
|
||||||
|
memset(tex, 0xaa, sizeof(Evas_GL_Texture));
|
||||||
free(tex);
|
free(tex);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,7 +216,6 @@ eng_window_new(Display *disp,
|
||||||
fprintf(stderr, "renderer: %s\n", renderer);
|
fprintf(stderr, "renderer: %s\n", renderer);
|
||||||
fprintf(stderr, "version: %s\n", version);
|
fprintf(stderr, "version: %s\n", version);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GLX
|
// GLX
|
||||||
#else
|
#else
|
||||||
if (!context)
|
if (!context)
|
||||||
|
@ -286,7 +285,6 @@ eng_window_new(Display *disp,
|
||||||
vendor = glGetString(GL_VENDOR);
|
vendor = glGetString(GL_VENDOR);
|
||||||
renderer = glGetString(GL_RENDERER);
|
renderer = glGetString(GL_RENDERER);
|
||||||
version = glGetString(GL_VERSION);
|
version = glGetString(GL_VERSION);
|
||||||
|
|
||||||
if (getenv("EVAS_GL_INFO"))
|
if (getenv("EVAS_GL_INFO"))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "vendor: %s\n", vendor);
|
fprintf(stderr, "vendor: %s\n", vendor);
|
||||||
|
|
Loading…
Reference in New Issue