[cairo-commit] glitz/src glitz_compose.c,1.7,1.8
David Reveman
commit at pdx.freedesktop.org
Tue Sep 14 14:07:10 PDT 2004
Committed by: davidr
Update of /cvs/cairo/glitz/src
In directory gabe:/tmp/cvs-serv32659/src
Modified Files:
glitz_compose.c
Log Message:
Fixed division by zero bug
Index: glitz_compose.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_compose.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** glitz_compose.c 13 Sep 2004 17:50:38 -0000 1.7
--- glitz_compose.c 14 Sep 2004 21:07:08 -0000 1.8
***************
*** 298,305 ****
op->gl->enable (GLITZ_GL_BLEND);
op->gl->blend_func (GLITZ_GL_CONSTANT_COLOR, GLITZ_GL_ONE_MINUS_SRC_COLOR);
! op->gl->blend_color ((glitz_gl_clampf_t) solid.red / solid.alpha,
! (glitz_gl_clampf_t) solid.green / solid.alpha,
! (glitz_gl_clampf_t) solid.blue / solid.alpha,
! 1.0f);
op->gl->tex_env_f (GLITZ_GL_TEXTURE_ENV, GLITZ_GL_TEXTURE_ENV_MODE,
--- 298,309 ----
op->gl->enable (GLITZ_GL_BLEND);
op->gl->blend_func (GLITZ_GL_CONSTANT_COLOR, GLITZ_GL_ONE_MINUS_SRC_COLOR);
!
! if (solid.alpha > 0)
! op->gl->blend_color ((glitz_gl_clampf_t) solid.red / solid.alpha,
! (glitz_gl_clampf_t) solid.green / solid.alpha,
! (glitz_gl_clampf_t) solid.blue / solid.alpha,
! 1.0f);
! else
! op->gl->blend_color (1.0f, 1.0f, 1.0f, 1.0f);
op->gl->tex_env_f (GLITZ_GL_TEXTURE_ENV, GLITZ_GL_TEXTURE_ENV_MODE,
***************
*** 317,324 ****
op->gl->enable (GLITZ_GL_BLEND);
op->gl->blend_func (GLITZ_GL_CONSTANT_COLOR, GLITZ_GL_ONE_MINUS_SRC_COLOR);
! op->gl->blend_color ((glitz_gl_clampf_t) op->solid->red / op->solid->alpha,
! (glitz_gl_clampf_t) op->solid->green / op->solid->alpha,
! (glitz_gl_clampf_t) op->solid->blue / op->solid->alpha,
! 1.0f);
op->gl->color_4us (SHORT_MULT (op->alpha_mask.red, op->solid->alpha),
--- 321,334 ----
op->gl->enable (GLITZ_GL_BLEND);
op->gl->blend_func (GLITZ_GL_CONSTANT_COLOR, GLITZ_GL_ONE_MINUS_SRC_COLOR);
!
! if (op->solid->alpha > 0)
! op->gl->blend_color ((glitz_gl_clampf_t) op->solid->red / op->solid->alpha,
! (glitz_gl_clampf_t)
! op->solid->green / op->solid->alpha,
! (glitz_gl_clampf_t)
! op->solid->blue / op->solid->alpha,
! 1.0f);
! else
! op->gl->blend_color (1.0f, 1.0f, 1.0f, 1.0f);
op->gl->color_4us (SHORT_MULT (op->alpha_mask.red, op->solid->alpha),
More information about the cairo-commit
mailing list