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 693612 - cogl-pango: wrong rendering on the second line of an underlined layout
cogl-pango: wrong rendering on the second line of an underlined layout
Status: RESOLVED FIXED
Product: cogl
Classification: Platform
Component: CoglJournal
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
: 685901 691871 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-02-11 18:55 UTC by William Jon McCann
Modified: 2013-03-06 20:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a test to check interleaving primitives and the journal (6.20 KB, patch)
2013-02-18 19:06 UTC, Neil Roberts
committed Details | Review
journal: Dirty the modelview matrix state when flushing (1.67 KB, patch)
2013-02-18 19:06 UTC, Neil Roberts
committed Details | Review

Description William Jon McCann 2013-02-11 18:55:53 UTC
If I receive a link like the following in a chat in the message tray it appears like an underline after "wiki/":

http://en.wikipedia.org/wiki/File:Chrome_OS_21.0.1172_Aura_Dev.png
Comment 1 drago01 2013-02-11 20:01:52 UTC
Yeah that seems to happen when we wrap the url (i.e when it does not fit).
Comment 2 Giovanni Campagna 2013-02-17 17:42:29 UTC
After some investigation, I found that:
notify-send test http://www.example.com/long/long/long/long/long/long_long_long_long_long_
fails, while
notify-send test http://www.example.com/long/long/long/long/long/long_long_long_long_long
works

The difference is the number of characters in the second line, and the magic number is 25, which causes cogl to switch from software to hardware vertex processing (cogl-pango/cogl-pango-display-list.c:391).
Interesting enough, the bug is in the HW (CoglPrimitive) path, but forcing CoglJournal to do HW transform fixes it, so my interpretation is that CoglJournal is leaving some stale state behind. For the record, what's happening here is a primitive for the first line, a rectangle through the journal for the first underline and then the problematic second line.
(All the upper layers appear to behave correctly from what I could see)

My knowledge of Cogl ends here, so I'm reassigning it to Cogl developers.
Comment 3 Giovanni Campagna 2013-02-17 17:46:07 UTC
*** Bug 691871 has been marked as a duplicate of this bug. ***
Comment 4 Neil Roberts 2013-02-18 19:05:41 UTC
Thanks for the detailed bug report. I think I've tracked the issue down so I'm about to attach some patches which fix it for me.
Comment 5 Neil Roberts 2013-02-18 19:06:31 UTC
Created attachment 236651 [details] [review]
Add a test to check interleaving primitives and the journal

This adds a conformance test which draws a rectangle using the journal
in-between two rectangles drawn with primitives without changing any
other state. Currently this is failing because the modelview matrix
state is not correctly flushed.

The journal also flushes in own clip state so the test additionally
puts everything in a clip and verifies that that worked. This is not
currently broken but we might as well test it.
Comment 6 Neil Roberts 2013-02-18 19:06:34 UTC
Created attachment 236652 [details] [review]
journal: Dirty the modelview matrix state when flushing

The journal manually flushes its own modelview matrix state so it
needs to mark the state as dirty so that if a primitive is drawn with
the same matrix state as the last primitive it will correctly reflush
it.
Comment 7 Robert Bragg 2013-02-19 01:15:08 UTC
Comment on attachment 236651 [details] [review]
Add a test to check interleaving primitives and the journal

This looks good to land to me
Comment 8 Robert Bragg 2013-02-19 01:15:50 UTC
Comment on attachment 236652 [details] [review]
journal: Dirty the modelview matrix state when flushing

This also looks good to me
Comment 9 Neil Roberts 2013-02-19 11:13:51 UTC
Ok, thanks. I've pushed them to master and the cogl-1.14 branch.
Comment 10 Jasper St. Pierre (not reading bugmail) 2013-03-06 20:00:14 UTC
*** Bug 685901 has been marked as a duplicate of this bug. ***