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;
|
Eina_Bool size : 1;
|
||||||
} change;
|
} change;
|
||||||
|
|
||||||
|
Eina_Bool havestuff : 1;
|
||||||
|
|
||||||
Evas_GL_Image *def_surface;
|
Evas_GL_Image *def_surface;
|
||||||
|
|
||||||
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
#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
|
static inline void
|
||||||
array_alloc(Evas_GL_Context *gc, int n)
|
array_alloc(Evas_GL_Context *gc, int n)
|
||||||
{
|
{
|
||||||
|
gc->havestuff = EINA_TRUE;
|
||||||
if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc) return;
|
if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc) return;
|
||||||
gc->pipe[n].array.alloc += 6 * 1024;
|
gc->pipe[n].array.alloc += 6 * 1024;
|
||||||
if (gc->pipe[n].array.use_vertex)
|
if (gc->pipe[n].array.use_vertex)
|
||||||
|
@ -2284,7 +2285,8 @@ static void
|
||||||
shader_array_flush(Evas_GL_Context *gc)
|
shader_array_flush(Evas_GL_Context *gc)
|
||||||
{
|
{
|
||||||
int i, gw, gh, setclip, cy, fbo = 0, done = 0;
|
int i, gw, gh, setclip, cy, fbo = 0, done = 0;
|
||||||
|
|
||||||
|
if (!gc->havestuff) return;
|
||||||
gw = gc->w;
|
gw = gc->w;
|
||||||
gh = gc->h;
|
gh = gc->h;
|
||||||
if (!((gc->pipe[0].shader.surface == gc->def_surface) ||
|
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);
|
if (done > 0) printf("DONE (pipes): %i\n", done);
|
||||||
}
|
}
|
||||||
|
gc->havestuff = EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
|
|
Loading…
Reference in New Issue