diff options
author | Adam Jackson <ajax@redhat.com> | 2012-12-07 09:47:50 -0500 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2012-12-07 15:52:51 +0000 |
commit | f32640109469a47b9725b736be61e15ff46f9fee (patch) | |
tree | 0d87b82f4aad89b4900b48b068cbb4c1f3ea0935 | |
parent | 491618a74c46eb492bba3afb7e33c6d1de2a1224 (diff) | |
download | cogl-f32640109469a47b9725b736be61e15ff46f9fee.tar.gz |
opengl: Fix conditional call of BlendFuncSeparate
Checking whether src_rgb != src_alpha twice is pointless; not checking
whether dst_rgb != dst_alpha is clearly wrong.
Found by Coverity.
Signed-off-by: Adam Jackson <ajax@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=689850
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit fc292c25db3004543e277d92693ab9cb388d2121)
-rw-r--r-- | cogl/cogl-pipeline-opengl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cogl/cogl-pipeline-opengl.c b/cogl/cogl-pipeline-opengl.c index a047e81e..cb34cb9a 100644 --- a/cogl/cogl-pipeline-opengl.c +++ b/cogl/cogl-pipeline-opengl.c @@ -516,8 +516,8 @@ _cogl_pipeline_flush_color_blend_alpha_depth_state ( if (ctx->glBlendFuncSeparate && (blend_state->blend_src_factor_rgb != blend_state->blend_src_factor_alpha || - (blend_state->blend_src_factor_rgb != - blend_state->blend_src_factor_alpha))) + (blend_state->blend_dst_factor_rgb != + blend_state->blend_dst_factor_alpha))) GE (ctx, glBlendFuncSeparate (blend_state->blend_src_factor_rgb, blend_state->blend_dst_factor_rgb, blend_state->blend_src_factor_alpha, |