forked from enlightenment/efl
and avoid some work if there is nothing to flush at all.
SVN revision: 55978
This commit is contained in:
parent
d7e8cfba62
commit
87a0e6575d
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
@ -2285,6 +2286,7 @@ 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
|
||||
|
|
Loading…
Reference in New Issue