forked from enlightenment/efl
reduce binds when things get clipped and split.
SVN revision: 45928
This commit is contained in:
parent
ff3c762ba5
commit
353f4bb6ec
|
@ -555,16 +555,19 @@ evas_gl_common_context_image_push(Evas_GL_Context *gc,
|
|||
}
|
||||
if ((tex->im) && (tex->im->native.data))
|
||||
{
|
||||
shader_array_flush(gc);
|
||||
gc->array.im = tex->im;
|
||||
if (gc->array.im != tex->im)
|
||||
{
|
||||
shader_array_flush(gc);
|
||||
gc->array.im = tex->im;
|
||||
}
|
||||
}
|
||||
|
||||
gc->array.line = 0;
|
||||
gc->array.use_vertex = 1;
|
||||
gc->array.use_color = 1;
|
||||
gc->array.use_texuv = 1;
|
||||
gc->array.use_texuv2 = 1;
|
||||
gc->array.use_texuv3 = 0;
|
||||
|
||||
|
||||
pnum = gc->array.num;
|
||||
nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nu2 = pnum * 2;
|
||||
|
@ -617,12 +620,6 @@ evas_gl_common_context_image_push(Evas_GL_Context *gc,
|
|||
{
|
||||
PUSH_COLOR(r, g, b, a);
|
||||
}
|
||||
|
||||
if ((tex->im) && (tex->im->native.data))
|
||||
{
|
||||
shader_array_flush(gc);
|
||||
gc->array.im = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -846,6 +843,14 @@ evas_gl_common_context_image_map4_push(Evas_GL_Context *gc,
|
|||
gc->shader.cw = cw;
|
||||
gc->shader.ch = ch;
|
||||
}
|
||||
if ((tex->im) && (tex->im->native.data))
|
||||
{
|
||||
if (gc->array.im != tex->im)
|
||||
{
|
||||
shader_array_flush(gc);
|
||||
gc->array.im = tex->im;
|
||||
}
|
||||
}
|
||||
gc->array.line = 0;
|
||||
gc->array.use_vertex = 1;
|
||||
gc->array.use_color = 1;
|
||||
|
@ -859,7 +864,6 @@ evas_gl_common_context_image_map4_push(Evas_GL_Context *gc,
|
|||
gc->array.num += 6;
|
||||
_evas_gl_common_context_array_alloc(gc);
|
||||
|
||||
// FIXME: handle yinvert
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
tx[i] = ((double)(tex->x) + (((double)p[i].u) / FP1)) /
|
||||
|
@ -867,6 +871,10 @@ evas_gl_common_context_image_map4_push(Evas_GL_Context *gc,
|
|||
ty[i] = ((double)(tex->y) + (((double)p[i].v) / FP1)) /
|
||||
(double)tex->pt->h;
|
||||
}
|
||||
if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert))
|
||||
{
|
||||
// FIXME: handle yinvert
|
||||
}
|
||||
|
||||
if (blend) bl = 0.0;
|
||||
|
||||
|
@ -1017,7 +1025,7 @@ shader_array_flush(Evas_GL_Context *gc)
|
|||
}
|
||||
else
|
||||
glDisableVertexAttribArray(SHAD_TEXUV);
|
||||
|
||||
|
||||
if (gc->array.line)
|
||||
{
|
||||
glDisableVertexAttribArray(SHAD_TEXUV);
|
||||
|
@ -1060,6 +1068,7 @@ shader_array_flush(Evas_GL_Context *gc)
|
|||
gc->array.im->native.func.unbind(gc->array.im->native.func.data,
|
||||
gc->array.im);
|
||||
}
|
||||
gc->array.im = NULL;
|
||||
/*
|
||||
gc->shader.cur_tex = 0;
|
||||
glBindTexture(GL_TEXTURE_2D, gc->shader.cur_tex);
|
||||
|
|
|
@ -408,7 +408,7 @@ evas_gl_common_image_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int sx, int sy
|
|||
yuv = 1;
|
||||
|
||||
im->tex->im = im;
|
||||
if ((!gc->dc->cutout.rects) || (gc->dc->cutout.active > 8))
|
||||
if ((!gc->dc->cutout.rects) || (gc->dc->cutout.active > 16))
|
||||
{
|
||||
if (gc->dc->clip.use)
|
||||
{
|
||||
|
|
|
@ -430,9 +430,9 @@ eng_output_redraws_next_update_push(void *data, void *surface __UNUSED__, int x
|
|||
re->win->draw.drew = 1;
|
||||
evas_gl_common_context_flush(re->win->gl_context);
|
||||
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
||||
// no neeed - eglSwapBuffers() should waitnative at end of swap...
|
||||
// this also may flush cpu+gpu caches etc. thus performancce hit
|
||||
// eglWaitNative(EGL_CORE_NATIVE_ENGINE); // previous rendering should be done and swapped
|
||||
// this is needed to make sure all previous rendering is flushed to
|
||||
// buffers/surfaces
|
||||
eglWaitNative(EGL_CORE_NATIVE_ENGINE); // previous rendering should be done and swapped
|
||||
#else
|
||||
glXWaitGL();
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue