forked from enlightenment/efl
Evas GL common: whitespace fixes
This commit is contained in:
parent
ed157ee67b
commit
2b1e221fd9
|
@ -2930,7 +2930,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
if (gc->pipe[i].array.im->tex->pt->dyn.img)
|
if (gc->pipe[i].array.im->tex->pt->dyn.img)
|
||||||
{
|
{
|
||||||
secsym_glEGLImageTargetTexture2DOES
|
secsym_glEGLImageTargetTexture2DOES
|
||||||
(GL_TEXTURE_2D, gc->pipe[i].array.im->tex->pt->dyn.img);
|
(GL_TEXTURE_2D, gc->pipe[i].array.im->tex->pt->dyn.img);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
@ -2938,8 +2938,8 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
if (!gc->pipe[i].array.im->native.loose)
|
if (!gc->pipe[i].array.im->native.loose)
|
||||||
{
|
{
|
||||||
if (gc->pipe[i].array.im->native.func.bind)
|
if (gc->pipe[i].array.im->native.func.bind)
|
||||||
gc->pipe[i].array.im->native.func.bind(gc->pipe[i].array.im->native.func.data,
|
gc->pipe[i].array.im->native.func.bind(gc->pipe[i].array.im->native.func.data,
|
||||||
gc->pipe[i].array.im);
|
gc->pipe[i].array.im);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2948,40 +2948,40 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
{
|
{
|
||||||
switch (gc->pipe[i].shader.render_op)
|
switch (gc->pipe[i].shader.render_op)
|
||||||
{
|
{
|
||||||
case EVAS_RENDER_BLEND: /**< default op: d = d*(1-sa) + s */
|
case EVAS_RENDER_BLEND: /**< default op: d = d*(1-sa) + s */
|
||||||
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
break;
|
break;
|
||||||
case EVAS_RENDER_BLEND_REL: /**< d = d*(1 - sa) + s*da */
|
case EVAS_RENDER_BLEND_REL: /**< d = d*(1 - sa) + s*da */
|
||||||
glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
break;
|
break;
|
||||||
case EVAS_RENDER_COPY: /**< d = s */
|
case EVAS_RENDER_COPY: /**< d = s */
|
||||||
gc->pipe[i].shader.blend = 0;
|
gc->pipe[i].shader.blend = 0;
|
||||||
// just disable blend mode. no need to set blend func
|
// just disable blend mode. no need to set blend func
|
||||||
//glBlendFunc(GL_ONE, GL_ZERO);
|
//glBlendFunc(GL_ONE, GL_ZERO);
|
||||||
break;
|
break;
|
||||||
case EVAS_RENDER_COPY_REL: /**< d = s*da */
|
case EVAS_RENDER_COPY_REL: /**< d = s*da */
|
||||||
glBlendFunc(GL_DST_ALPHA, GL_ZERO);
|
glBlendFunc(GL_DST_ALPHA, GL_ZERO);
|
||||||
break;
|
break;
|
||||||
case EVAS_RENDER_ADD: /**< d = d + s */
|
case EVAS_RENDER_ADD: /**< d = d + s */
|
||||||
glBlendFunc(GL_ONE, GL_ONE);
|
glBlendFunc(GL_ONE, GL_ONE);
|
||||||
break;
|
break;
|
||||||
case EVAS_RENDER_ADD_REL: /**< d = d + s*da */
|
case EVAS_RENDER_ADD_REL: /**< d = d + s*da */
|
||||||
glBlendFunc(GL_DST_ALPHA, GL_ONE);
|
glBlendFunc(GL_DST_ALPHA, GL_ONE);
|
||||||
break;
|
break;
|
||||||
case EVAS_RENDER_SUB: /**< d = d - s */
|
case EVAS_RENDER_SUB: /**< d = d - s */
|
||||||
glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR);
|
glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR);
|
||||||
break;
|
break;
|
||||||
case EVAS_RENDER_SUB_REL: /**< d = d - s*da */
|
case EVAS_RENDER_SUB_REL: /**< d = d - s*da */
|
||||||
glBlendFunc(GL_ZERO, GL_ONE_MINUS_DST_ALPHA);
|
glBlendFunc(GL_ZERO, GL_ONE_MINUS_DST_ALPHA);
|
||||||
break;
|
break;
|
||||||
case EVAS_RENDER_MASK: /**< d = d*sa */
|
case EVAS_RENDER_MASK: /**< d = d*sa */
|
||||||
glBlendFunc(GL_ZERO, GL_SRC_ALPHA);
|
glBlendFunc(GL_ZERO, GL_SRC_ALPHA);
|
||||||
break;
|
break;
|
||||||
// FIXME: fix blend funcs below!
|
// FIXME: fix blend funcs below!
|
||||||
case EVAS_RENDER_TINT: /**< d = d*s + d*(1 - sa) + s*(1 - da) */
|
case EVAS_RENDER_TINT: /**< d = d*s + d*(1 - sa) + s*(1 - da) */
|
||||||
case EVAS_RENDER_TINT_REL: /**< d = d*(1 - sa + s) */
|
case EVAS_RENDER_TINT_REL: /**< d = d*(1 - sa + s) */
|
||||||
case EVAS_RENDER_MUL: /**< d = d*s */
|
case EVAS_RENDER_MUL: /**< d = d*s */
|
||||||
default:
|
default:
|
||||||
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3058,7 +3058,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
gc->preserve_bit);
|
gc->preserve_bit);
|
||||||
|
|
||||||
if (!gc->preserve_bit)
|
if (!gc->preserve_bit)
|
||||||
gc->preserve_bit = GL_COLOR_BUFFER_BIT0_QCOM;
|
gc->preserve_bit = GL_COLOR_BUFFER_BIT0_QCOM;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
start_tiling(gc, 0, gw, gh,
|
start_tiling(gc, 0, gw, gh,
|
||||||
|
@ -3074,7 +3074,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
if (!fbo)
|
if (!fbo)
|
||||||
scissor_rot(gc, gc->rot, gw, gh, cx, gh - cy - ch, cw, ch);
|
scissor_rot(gc, gc->rot, gw, gh, cx, gh - cy - ch, cw, ch);
|
||||||
else
|
else
|
||||||
glScissor(cx, cy, cw, ch);
|
glScissor(cx, cy, cw, ch);
|
||||||
setclip = EINA_TRUE;
|
setclip = EINA_TRUE;
|
||||||
gc->state.current.cx = cx;
|
gc->state.current.cx = cx;
|
||||||
gc->state.current.cy = cy;
|
gc->state.current.cy = cy;
|
||||||
|
@ -3190,7 +3190,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
memcpy(x + (unsigned long)texsam_ptr, gc->pipe[i].array.texsam, TEX_SIZE);
|
memcpy(x + (unsigned long)texsam_ptr, gc->pipe[i].array.texsam, TEX_SIZE);
|
||||||
if (gc->pipe[i].array.use_mask)
|
if (gc->pipe[i].array.use_mask)
|
||||||
memcpy(x + (unsigned long)mask_ptr, gc->pipe[i].array.mask, MASK_SIZE);
|
memcpy(x + (unsigned long)mask_ptr, gc->pipe[i].array.mask, MASK_SIZE);
|
||||||
/*
|
/*
|
||||||
fprintf(stderr, "copy %i bytes [%i/%i slots] [%i + %i + %i + %i + %i + %i + %i] <%i %i %i %i %i %i %i>\n",
|
fprintf(stderr, "copy %i bytes [%i/%i slots] [%i + %i + %i + %i + %i + %i + %i] <%i %i %i %i %i %i %i>\n",
|
||||||
(int)((unsigned char *)END_POINTER),
|
(int)((unsigned char *)END_POINTER),
|
||||||
gc->pipe[i].array.num,
|
gc->pipe[i].array.num,
|
||||||
|
@ -3288,30 +3288,30 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
|
|
||||||
/* Alpha plane */
|
/* Alpha plane */
|
||||||
if (gc->pipe[i].array.use_texa)
|
if (gc->pipe[i].array.use_texa)
|
||||||
{
|
{
|
||||||
glEnableVertexAttribArray(SHAD_TEXA);
|
glEnableVertexAttribArray(SHAD_TEXA);
|
||||||
glVertexAttribPointer(SHAD_TEXA, TEX_CNT, GL_FLOAT, GL_FALSE, 0, texa_ptr);
|
glVertexAttribPointer(SHAD_TEXA, TEX_CNT, GL_FLOAT, GL_FALSE, 0, texa_ptr);
|
||||||
glActiveTexture(GL_TEXTURE1);
|
glActiveTexture(GL_TEXTURE1);
|
||||||
glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texa);
|
glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texa);
|
||||||
#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT
|
#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT
|
||||||
if (shared->info.anisotropic > 0.0)
|
if (shared->info.anisotropic > 0.0)
|
||||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, shared->info.anisotropic);
|
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, shared->info.anisotropic);
|
||||||
#endif
|
#endif
|
||||||
if (gc->pipe[i].shader.smooth)
|
if (gc->pipe[i].shader.smooth)
|
||||||
{
|
{
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
}
|
}
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
|
|
||||||
MASK_TEXTURE += 1;
|
MASK_TEXTURE += 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3370,7 +3370,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
#ifdef GL_GLES
|
#ifdef GL_GLES
|
||||||
if (gc->pipe[i].shader.cur_texu_dyn)
|
if (gc->pipe[i].shader.cur_texu_dyn)
|
||||||
secsym_glEGLImageTargetTexture2DOES
|
secsym_glEGLImageTargetTexture2DOES
|
||||||
(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn);
|
(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn);
|
||||||
#endif
|
#endif
|
||||||
if (gc->pipe[i].shader.smooth)
|
if (gc->pipe[i].shader.smooth)
|
||||||
{
|
{
|
||||||
|
@ -3398,28 +3398,28 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
|
|
||||||
/* Mask surface */
|
/* Mask surface */
|
||||||
if (gc->pipe[i].array.use_mask)
|
if (gc->pipe[i].array.use_mask)
|
||||||
{
|
{
|
||||||
glEnableVertexAttribArray(SHAD_MASK);
|
glEnableVertexAttribArray(SHAD_MASK);
|
||||||
glVertexAttribPointer(SHAD_MASK, MASK_CNT, GL_FLOAT, GL_FALSE, 0, mask_ptr);
|
glVertexAttribPointer(SHAD_MASK, MASK_CNT, GL_FLOAT, GL_FALSE, 0, mask_ptr);
|
||||||
glActiveTexture(MASK_TEXTURE);
|
glActiveTexture(MASK_TEXTURE);
|
||||||
glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texm);
|
glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texm);
|
||||||
#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT
|
#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT
|
||||||
if (shared->info.anisotropic > 0.0)
|
if (shared->info.anisotropic > 0.0)
|
||||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, shared->info.anisotropic);
|
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, shared->info.anisotropic);
|
||||||
#endif
|
#endif
|
||||||
if (gc->pipe[i].shader.mask_smooth)
|
if (gc->pipe[i].shader.mask_smooth)
|
||||||
{
|
{
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
}
|
}
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3448,8 +3448,8 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
if (!gc->pipe[i].array.im->native.loose)
|
if (!gc->pipe[i].array.im->native.loose)
|
||||||
{
|
{
|
||||||
if (gc->pipe[i].array.im->native.func.unbind)
|
if (gc->pipe[i].array.im->native.func.unbind)
|
||||||
gc->pipe[i].array.im->native.func.unbind(gc->pipe[i].array.im->native.func.data,
|
gc->pipe[i].array.im->native.func.unbind(gc->pipe[i].array.im->native.func.data,
|
||||||
gc->pipe[i].array.im);
|
gc->pipe[i].array.im);
|
||||||
}
|
}
|
||||||
gc->pipe[i].array.im = NULL;
|
gc->pipe[i].array.im = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue