forked from enlightenment/efl
can't reproduce but try avoid possible alloc bug in native surface
handling. SVN revision: 74993
This commit is contained in:
parent
20f5fcaa3e
commit
6cfcf9ef49
|
@ -2135,6 +2135,7 @@ eng_image_native_set(void *data, void *image, void *native)
|
||||||
EVAS_COLORSPACE_ARGB8888);
|
EVAS_COLORSPACE_ARGB8888);
|
||||||
evas_gl_common_image_free(im);
|
evas_gl_common_image_free(im);
|
||||||
im = im2;
|
im = im2;
|
||||||
|
if (!im) return NULL;
|
||||||
if (ns->type == EVAS_NATIVE_SURFACE_X11)
|
if (ns->type == EVAS_NATIVE_SURFACE_X11)
|
||||||
{
|
{
|
||||||
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
||||||
|
@ -2149,6 +2150,7 @@ eng_image_native_set(void *data, void *image, void *native)
|
||||||
|
|
||||||
eina_hash_add(re->win->gl_context->shared->native_pm_hash, &pmid, im);
|
eina_hash_add(re->win->gl_context->shared->native_pm_hash, &pmid, im);
|
||||||
|
|
||||||
|
// assume 32bit pixmap! :)
|
||||||
config_attrs[i++] = EGL_RED_SIZE;
|
config_attrs[i++] = EGL_RED_SIZE;
|
||||||
config_attrs[i++] = 8;
|
config_attrs[i++] = 8;
|
||||||
config_attrs[i++] = EGL_GREEN_SIZE;
|
config_attrs[i++] = EGL_GREEN_SIZE;
|
||||||
|
@ -2206,6 +2208,8 @@ eng_image_native_set(void *data, void *image, void *native)
|
||||||
// fixme: round trip :(
|
// fixme: round trip :(
|
||||||
XGetGeometry(re->win->disp, pm, &wdummy, &dummy, &dummy,
|
XGetGeometry(re->win->disp, pm, &wdummy, &dummy, &dummy,
|
||||||
&w, &h, &border, &depth);
|
&w, &h, &border, &depth);
|
||||||
|
if (depth <= 32)
|
||||||
|
{
|
||||||
n = calloc(1, sizeof(Native));
|
n = calloc(1, sizeof(Native));
|
||||||
if (n)
|
if (n)
|
||||||
{
|
{
|
||||||
|
@ -2215,10 +2219,7 @@ eng_image_native_set(void *data, void *image, void *native)
|
||||||
|
|
||||||
eina_hash_add(re->win->gl_context->shared->native_pm_hash, &pmid, im);
|
eina_hash_add(re->win->gl_context->shared->native_pm_hash, &pmid, im);
|
||||||
if ((re->win->depth_cfg[depth].tex_target &
|
if ((re->win->depth_cfg[depth].tex_target &
|
||||||
GLX_TEXTURE_2D_BIT_EXT)
|
GLX_TEXTURE_2D_BIT_EXT))
|
||||||
// && (1) // we assume npo2 for now
|
|
||||||
// size is pow2 || mnpo2 supported
|
|
||||||
)
|
|
||||||
target = GLX_TEXTURE_2D_EXT;
|
target = GLX_TEXTURE_2D_EXT;
|
||||||
else if ((re->win->depth_cfg[depth].tex_target &
|
else if ((re->win->depth_cfg[depth].tex_target &
|
||||||
GLX_TEXTURE_RECTANGLE_BIT_EXT))
|
GLX_TEXTURE_RECTANGLE_BIT_EXT))
|
||||||
|
@ -2228,7 +2229,7 @@ eng_image_native_set(void *data, void *image, void *native)
|
||||||
}
|
}
|
||||||
if (!target)
|
if (!target)
|
||||||
{
|
{
|
||||||
ERR("broken text-from-pixmap");
|
ERR("broken tex-from-pixmap");
|
||||||
if (!(re->win->depth_cfg[depth].tex_target &
|
if (!(re->win->depth_cfg[depth].tex_target &
|
||||||
GLX_TEXTURE_2D_BIT_EXT))
|
GLX_TEXTURE_2D_BIT_EXT))
|
||||||
target = GLX_TEXTURE_RECTANGLE_EXT;
|
target = GLX_TEXTURE_RECTANGLE_EXT;
|
||||||
|
@ -2237,7 +2238,6 @@ eng_image_native_set(void *data, void *image, void *native)
|
||||||
target = GLX_TEXTURE_2D_EXT;
|
target = GLX_TEXTURE_2D_EXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pixmap_att[i++] = GLX_TEXTURE_FORMAT_EXT;
|
pixmap_att[i++] = GLX_TEXTURE_FORMAT_EXT;
|
||||||
pixmap_att[i++] = re->win->depth_cfg[depth].tex_format;
|
pixmap_att[i++] = re->win->depth_cfg[depth].tex_format;
|
||||||
pixmap_att[i++] = GLX_MIPMAP_TEXTURE_EXT;
|
pixmap_att[i++] = GLX_MIPMAP_TEXTURE_EXT;
|
||||||
|
@ -2307,6 +2307,7 @@ eng_image_native_set(void *data, void *image, void *native)
|
||||||
evas_gl_common_image_native_enable(im);
|
evas_gl_common_image_native_enable(im);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue