summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2018-10-05 00:03:09 +1000
committerMatthew Waters <matthew@centricular.com>2018-10-05 00:03:09 +1000
commit452d90a88c6e68a3daa38e02213782836788236a (patch)
tree6798fb5f25144bcb22329d30e5f987c065e9309e
parent779d028f27b7bc6eb7abe841fe2cda97de3be983 (diff)
downloadgst-plugins-base-452d90a88c6e68a3daa38e02213782836788236a.tar.gz
gst-plugins-base-452d90a88c6e68a3daa38e02213782836788236a.tar.xz
Revert "gl: use correct blend functions for unpremultiplied alpha"
This reverts commit 779d028f27b7bc6eb7abe841fe2cda97de3be983.
-rw-r--r--ext/gl/gstglimagesink.c9
-rw-r--r--ext/gl/gstgloverlay.c6
2 files changed, 2 insertions, 13 deletions
diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c
index 14e1c950a..c70cd5510 100644
--- a/ext/gl/gstglimagesink.c
+++ b/ext/gl/gstglimagesink.c
@@ -2237,14 +2237,7 @@ gst_glimage_sink_on_draw (GstGLImageSink * gl_sink)
if (gl_sink->ignore_alpha) {
gl->BlendColor (0.0, 0.0, 0.0, alpha);
- if (gl->BlendFuncSeparate) {
- gl->BlendFuncSeparate (GL_SRC_ALPHA, GL_CONSTANT_COLOR, GL_ONE,
- GL_ONE_MINUS_SRC_ALPHA);
- } else {
- /* we don't have separate blend modes, perform something close to
- * correct instead */
- gl->BlendFunc (GL_SRC_ALPHA, GL_CONSTANT_COLOR);
- }
+ gl->BlendFunc (GL_SRC_ALPHA, GL_CONSTANT_COLOR);
gl->BlendEquation (GL_FUNC_ADD);
gl->Enable (GL_BLEND);
}
diff --git a/ext/gl/gstgloverlay.c b/ext/gl/gstgloverlay.c
index 59096cb32..864ea64da 100644
--- a/ext/gl/gstgloverlay.c
+++ b/ext/gl/gstgloverlay.c
@@ -530,11 +530,7 @@ gst_gl_overlay_callback (GstGLFilter * filter, GstGLMemory * in_tex,
gst_gl_shader_set_uniform_1f (overlay->shader, "alpha", overlay->alpha);
gl->Enable (GL_BLEND);
- if (gl->BlendFuncSeparate)
- gl->BlendFuncSeparate (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE,
- GL_ONE_MINUS_SRC_ALPHA);
- else
- gl->BlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ gl->BlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
gl->BlendEquation (GL_FUNC_ADD);
gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);