and avoid some work if there is nothing to flush at all.

SVN revision: 55978
This commit is contained in:
Carsten Haitzler 2011-01-07 10:22:22 +00:00
parent d7e8cfba62
commit 87a0e6575d
2 changed files with 6 additions and 1 deletions

View File

@ -277,6 +277,8 @@ struct _Evas_GL_Context
Eina_Bool size : 1;
} change;
Eina_Bool havestuff : 1;
Evas_GL_Image *def_surface;
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)

View File

@ -1009,6 +1009,7 @@ evas_gl_common_context_target_surface_set(Evas_GL_Context *gc,
static inline void
array_alloc(Evas_GL_Context *gc, int n)
{
gc->havestuff = EINA_TRUE;
if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc) return;
gc->pipe[n].array.alloc += 6 * 1024;
if (gc->pipe[n].array.use_vertex)
@ -2284,7 +2285,8 @@ static void
shader_array_flush(Evas_GL_Context *gc)
{
int i, gw, gh, setclip, cy, fbo = 0, done = 0;
if (!gc->havestuff) return;
gw = gc->w;
gh = gc->h;
if (!((gc->pipe[0].shader.surface == gc->def_surface) ||
@ -2591,6 +2593,7 @@ shader_array_flush(Evas_GL_Context *gc)
{
if (done > 0) printf("DONE (pipes): %i\n", done);
}
gc->havestuff = EINA_FALSE;
}
Eina_Bool