forked from enlightenment/efl
Evas masking: Minor fixes in GL masking
This commit is contained in:
parent
f876cf31f8
commit
bb923d5586
|
@ -630,39 +630,6 @@ struct _Evas_GL_Texture_Async_Preload
|
|||
Eina_Bool unpack_row_length;
|
||||
};
|
||||
|
||||
#if 0
|
||||
extern Evas_GL_Program_Source shader_rect_frag_src;
|
||||
extern Evas_GL_Program_Source shader_rect_vert_src;
|
||||
extern Evas_GL_Program_Source shader_font_frag_src;
|
||||
extern Evas_GL_Program_Source shader_font_vert_src;
|
||||
|
||||
extern Evas_GL_Program_Source shader_img_frag_src;
|
||||
extern Evas_GL_Program_Source shader_img_vert_src;
|
||||
extern Evas_GL_Program_Source shader_img_nomul_frag_src;
|
||||
extern Evas_GL_Program_Source shader_img_nomul_vert_src;
|
||||
extern Evas_GL_Program_Source shader_img_bgra_frag_src;
|
||||
extern Evas_GL_Program_Source shader_img_bgra_vert_src;
|
||||
extern Evas_GL_Program_Source shader_img_bgra_nomul_frag_src;
|
||||
extern Evas_GL_Program_Source shader_img_bgra_nomul_vert_src;
|
||||
extern Evas_GL_Program_Source shader_img_mask_frag_src;
|
||||
extern Evas_GL_Program_Source shader_img_mask_vert_src;
|
||||
|
||||
extern Evas_GL_Program_Source shader_yuv_frag_src;
|
||||
extern Evas_GL_Program_Source shader_yuv_vert_src;
|
||||
extern Evas_GL_Program_Source shader_yuv_nomul_frag_src;
|
||||
extern Evas_GL_Program_Source shader_yuv_nomul_vert_src;
|
||||
|
||||
extern Evas_GL_Program_Source shader_yuy2_frag_src;
|
||||
extern Evas_GL_Program_Source shader_yuy2_vert_src;
|
||||
extern Evas_GL_Program_Source shader_yuy2_nomul_frag_src;
|
||||
extern Evas_GL_Program_Source shader_yuy2_nomul_vert_src;
|
||||
|
||||
extern Evas_GL_Program_Source shader_tex_frag_src;
|
||||
extern Evas_GL_Program_Source shader_tex_vert_src;
|
||||
extern Evas_GL_Program_Source shader_tex_nomul_frag_src;
|
||||
extern Evas_GL_Program_Source shader_tex_nomul_vert_src;
|
||||
#endif
|
||||
|
||||
/* GL_Common function that are used by gl_generic inherited module */
|
||||
EAPI void evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc);
|
||||
EAPI void evas_gl_common_image_ref(Evas_GL_Image *im);
|
||||
|
|
|
@ -1414,6 +1414,7 @@ static int
|
|||
_evas_gl_common_context_push(int rtype,
|
||||
Evas_Engine_GL_Context *gc,
|
||||
Evas_GL_Texture *tex,
|
||||
Evas_GL_Texture *texm,
|
||||
GLuint prog,
|
||||
int x, int y, int w, int h,
|
||||
Eina_Bool blend,
|
||||
|
@ -1442,6 +1443,7 @@ _evas_gl_common_context_push(int rtype,
|
|||
{
|
||||
if ((gc->pipe[i].region.type == rtype)
|
||||
&& (!tex || gc->pipe[i].shader.cur_tex == current_tex)
|
||||
&& (!texm || gc->pipe[i].shader.cur_texm == texm->pt->texture)
|
||||
&& (gc->pipe[i].shader.cur_prog == prog)
|
||||
&& (gc->pipe[i].shader.smooth == smooth)
|
||||
&& (gc->pipe[i].shader.blend == blend)
|
||||
|
@ -1519,6 +1521,8 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
|
|||
GLuint prog = gc->shared->shader[SHADER_RECT].prog;
|
||||
int pn = 0, i;
|
||||
|
||||
// FIXME: Line masking is not implemented
|
||||
|
||||
if (!(gc->dc->render_op == EVAS_RENDER_COPY) && (a < 255))
|
||||
blend = EINA_TRUE;
|
||||
|
||||
|
@ -1910,7 +1914,7 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
|
|||
}
|
||||
|
||||
pn = _evas_gl_common_context_push(RTYPE_IMAGE,
|
||||
gc, tex,
|
||||
gc, tex, mtex,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
blend,
|
||||
|
@ -1981,7 +1985,7 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
|
|||
PUSH_TEXSAM(pn, samx, samy);
|
||||
PUSH_TEXSAM(pn, samx, samy);
|
||||
PUSH_TEXSAM(pn, samx, samy);
|
||||
|
||||
|
||||
PUSH_TEXSAM(pn, samx, samy);
|
||||
PUSH_TEXSAM(pn, samx, samy);
|
||||
PUSH_TEXSAM(pn, samx, samy);
|
||||
|
@ -2011,7 +2015,7 @@ evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
|
|||
prog = gc->shared->shader[SHADER_FONT_MASK].prog;
|
||||
|
||||
pn = _evas_gl_common_context_push(RTYPE_FONT,
|
||||
gc, tex,
|
||||
gc, tex, mtex,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
1,
|
||||
|
@ -2100,7 +2104,7 @@ evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
|
|||
SHADER_YUV_MASK, SHADER_YUV_MASK)].prog;
|
||||
|
||||
pn = _evas_gl_common_context_push(RTYPE_YUV,
|
||||
gc, tex,
|
||||
gc, tex, mtex,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
blend,
|
||||
|
@ -2202,7 +2206,7 @@ evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
|
|||
SHADER_YUY2_MASK, SHADER_YUY2_MASK)].prog;
|
||||
|
||||
pn = _evas_gl_common_context_push(RTYPE_YUY2,
|
||||
gc, tex,
|
||||
gc, tex, mtex,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
blend,
|
||||
|
@ -2295,7 +2299,7 @@ evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
|
|||
SHADER_NV12_MASK, SHADER_NV12_MASK)].prog;
|
||||
|
||||
pn = _evas_gl_common_context_push(RTYPE_NV12,
|
||||
gc, tex,
|
||||
gc, tex, mtex,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
blend,
|
||||
|
@ -2396,7 +2400,7 @@ evas_gl_common_context_rgb_a_pair_push(Evas_Engine_GL_Context *gc,
|
|||
SHADER_RGB_A_PAIR_MASK, SHADER_RGB_A_PAIR_MASK)].prog;
|
||||
|
||||
pn = _evas_gl_common_context_push(RTYPE_IMAGE,
|
||||
gc, tex,
|
||||
gc, tex, mtex,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
EINA_TRUE,
|
||||
|
@ -2630,7 +2634,7 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
|
|||
}
|
||||
|
||||
pn = _evas_gl_common_context_push(RTYPE_MAP,
|
||||
gc, tex,
|
||||
gc, tex, mtex,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
blend,
|
||||
|
|
|
@ -1117,7 +1117,7 @@ evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx,
|
|||
mask_y = dc->clip.mask_y;
|
||||
if (mask)
|
||||
{
|
||||
evas_gl_common_image_update(gc, im);
|
||||
evas_gl_common_image_update(gc, mask);
|
||||
if (!mask->tex)
|
||||
{
|
||||
ERR("Failed to apply mask image");
|
||||
|
@ -1160,19 +1160,7 @@ evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx,
|
|||
((gc->shared->info.tune.cutout.max > 0) &&
|
||||
(gc->dc->cutout.active > gc->shared->info.tune.cutout.max)))
|
||||
{
|
||||
if (mask)
|
||||
{
|
||||
_evas_gl_common_image_push(gc, im,
|
||||
dx, dy, dw, dh,
|
||||
sx, sy, sw, sh,
|
||||
gc->dc->clip.x, gc->dc->clip.y,
|
||||
gc->dc->clip.w, gc->dc->clip.h,
|
||||
r, g, b, a,
|
||||
mask, mask_x, mask_y,
|
||||
smooth,
|
||||
yuv, yuy2, nv12, rgb_a_pair);
|
||||
}
|
||||
else if (gc->dc->clip.use)
|
||||
if (mask || gc->dc->clip.use)
|
||||
{
|
||||
_evas_gl_common_image_push(gc, im,
|
||||
dx, dy, dw, dh,
|
||||
|
|
Loading…
Reference in New Issue