GNOME Bugzilla – Bug 693612
cogl-pango: wrong rendering on the second line of an underlined layout
Last modified: 2013-03-06 20:00:14 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
Yeah that seems to happen when we wrap the url (i.e when it does not fit).
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.
*** Bug 691871 has been marked as a duplicate of this bug. ***
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.
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.
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 on attachment 236651 [details] [review] Add a test to check interleaving primitives and the journal This looks good to land to me
Comment on attachment 236652 [details] [review] journal: Dirty the modelview matrix state when flushing This also looks good to me
Ok, thanks. I've pushed them to master and the cogl-1.14 branch.
*** Bug 685901 has been marked as a duplicate of this bug. ***