forked from enlightenment/efl
parent
236d58f0de
commit
5a35d48384
|
@ -1187,10 +1187,20 @@ evas_gl_common_context_image_push(Evas_GL_Context *gc,
|
|||
|
||||
if (tex_only)
|
||||
{
|
||||
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
|
||||
prog = gc->shared->shader.tex_nomul.prog;
|
||||
if (tex->pt->dyn.img)
|
||||
{
|
||||
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
|
||||
prog = gc->shared->shader.img_nomul.prog;
|
||||
else
|
||||
prog = gc->shared->shader.img.prog;
|
||||
}
|
||||
else
|
||||
prog = gc->shared->shader.tex.prog;
|
||||
{
|
||||
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
|
||||
prog = gc->shared->shader.tex_nomul.prog;
|
||||
else
|
||||
prog = gc->shared->shader.tex.prog;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1769,16 +1779,32 @@ evas_gl_common_context_image_map4_push(Evas_GL_Context *gc,
|
|||
|
||||
if (tex_only)
|
||||
{
|
||||
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
|
||||
if (tex->pt->dyn.img)
|
||||
{
|
||||
if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
|
||||
(p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
|
||||
prog = gc->shared->shader.tex_nomul.prog;
|
||||
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
|
||||
{
|
||||
if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
|
||||
(p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
|
||||
prog = gc->shared->shader.img_nomul.prog;
|
||||
else
|
||||
prog = gc->shared->shader.img.prog;
|
||||
}
|
||||
else
|
||||
prog = gc->shared->shader.tex.prog;
|
||||
prog = gc->shared->shader.img.prog;
|
||||
}
|
||||
else
|
||||
prog = gc->shared->shader.tex.prog;
|
||||
{
|
||||
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
|
||||
{
|
||||
if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
|
||||
(p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
|
||||
prog = gc->shared->shader.tex_nomul.prog;
|
||||
else
|
||||
prog = gc->shared->shader.tex.prog;
|
||||
}
|
||||
else
|
||||
prog = gc->shared->shader.tex.prog;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -280,6 +280,7 @@ evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint)
|
|||
im->content_hint = hint;
|
||||
if (!im->gc) return;
|
||||
if (!im->gc->shared->info.sec_image_map) return;
|
||||
if (!im->gc->shared->info.bgra) return;
|
||||
// does not handle yuv yet.
|
||||
if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return;
|
||||
if (im->content_hint == EVAS_IMAGE_CONTENT_HINT_DYNAMIC)
|
||||
|
|
|
@ -442,12 +442,11 @@ _pool_tex_dynamic_new(Evas_GL_Context *gc, int w, int h, int intformat, int form
|
|||
attr[1] = pt->w;
|
||||
attr[3] = pt->h;
|
||||
|
||||
// FIXME: RGBA/ABGR is swapped.
|
||||
// FIXME: seems a bit slower than i'd like - maybe too many flushes?
|
||||
// FIXME: YCbCr no support as yet
|
||||
// FIXME: stride not fetched or used from engine api
|
||||
// FIXME: have to set dynamic AFTER setting alpha and size. shoudl allow
|
||||
// any order
|
||||
// FIXME: seems a bit slower than i'd like - maybe too many flushes?
|
||||
// FIXME: YCbCr no support as yet
|
||||
pt->dyn.img = secsym_eglCreateImage(egldisplay,
|
||||
EGL_NO_CONTEXT,
|
||||
EGL_MAP_GL_TEXTURE_2D_SEC,
|
||||
|
@ -671,16 +670,16 @@ evas_gl_common_texture_dynamic_new(Evas_GL_Context *gc, Evas_GL_Image *im)
|
|||
if (tex->alpha)
|
||||
{
|
||||
if (gc->shared->info.bgra)
|
||||
tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, rgba_ifmt, rgba_fmt);
|
||||
tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt);
|
||||
else
|
||||
tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, rgba_ifmt, rgba_fmt);
|
||||
tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gc->shared->info.bgra)
|
||||
tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, rgb_ifmt, rgb_fmt);
|
||||
tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt);
|
||||
else
|
||||
tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, rgb_ifmt, rgb_fmt);
|
||||
tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt);
|
||||
}
|
||||
if (!tex->pt)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue