After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 736028 - basetextoverlay: cairo transparence setting not needed
basetextoverlay: cairo transparence setting not needed
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.x
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-04 10:17 UTC by Nicola
Modified: 2014-09-08 20:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
remove uneeded cairo transparence (803 bytes, patch)
2014-09-04 10:17 UTC, Nicola
committed Details | Review

Description Nicola 2014-09-04 10:17:56 UTC
Created attachment 285334 [details] [review]
remove uneeded cairo transparence

the code here:

http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/pango/gstbasetextoverlay.c#n1554

should make transparent the box that contains the text, I think this code is not correct, it should be:

if (overlay->want_shading) {
    double alpha = overlay->shading_value / 255.0;
    cairo_paint_with_alpha (cr, alpha);
  }

however I think this code could be removed, we already do a shaded background, why shade the box behind the text with cairo too? only one shading is needed so we must shade with cairo or with methods like these:

http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/pango/gstbasetextoverlay.c#n1642

not both
Comment 1 Sebastian Dröge (slomo) 2014-09-04 11:14:46 UTC
commit 501a295fa12436ffd2f1abc7105b007ecc9f950a
Author: Nicola Murino <nicola.murino@gmail.com>
Date:   Thu Sep 4 12:13:45 2014 +0200

    basetextoverlay: remove unneeded cairo transparence setting
    
    he code here:
    
    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/pango/gstbasetextoverlay.c#n1554
    
    should make transparent the box that contains the text, I think this code is
    not correct, it should be:
    
    if (overlay->want_shading) {
        double alpha = overlay->shading_value / 255.0;
        cairo_paint_with_alpha (cr, alpha);
      }
    
    however I think this code could be removed, we already do a shaded background,
    why shade the box behind the text with cairo too? only one shading is needed so
    we must shade with cairo or with methods like these:
    
    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/pango/gstbasetextoverlay.c#n1642
    
    not both
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736028
Comment 2 Nicola 2014-09-08 20:28:57 UTC
can you please push to 1.4 please?