Bug 50508

Summary: [uxa] cairo 1.12 slows bitmap fonts rendering
Product: xorg Reporter: Oleksandr Natalenko <oleksandr>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: csaba+freedeskbugs
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
X log none

Description Oleksandr Natalenko 2012-05-30 08:59:49 UTC
After updating from cairo 1.10 branch to cairo 1.12 branch it's almost impossible to use bitmap fonts (such as Terminus) in terminal emulators (such as guake or tilda). Font rendering is extremely slow as like as I work via ssh on server that is located on the Moon.

Changing font to Liberation Mono (non-bitmap) fixes the issue, but this is not desired solution.

I've read several bugreports that mention Nvidia drivers/graphic cards, but I'm the owner of Intel card, and face this problem too.

Ready to post any required logs.
Comment 1 Chris Wilson 2012-05-30 12:50:54 UTC
This is a driver bug. Can you attach Xorg.log so we can bring this to the attention of the appropriate developers?
Comment 2 Oleksandr Natalenko 2012-05-30 13:08:19 UTC
Created attachment 62302 [details]
X log

Sure, attached.
Comment 3 Chris Wilson 2012-05-30 13:18:34 UTC
That would be me then. SNA has been engineered to avoid the fallbacks in UXA, and not falling back here was a big motivation for rewriting UXA.
Comment 4 Chris Wilson 2012-06-19 07:24:28 UTC
I believe this should be fixed/much-improved by 
commit 0a43d425670b883b04565296c0510e7ba03ba6de
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jun 19 14:46:58 2012 +0100

    uxa: Implement glyphs-to-dst to avoid fallbacks
    
    An earlier version was buggy and introduced corruption as it failed to
    fallback gracefully with ComponentAlpha glpyhs. This is a much simpler
    implementation that composites each glyph individually, leaving it to the
    backend to optimise away state changes. It should still be many times
    faster than incurring the fallback...
    
    Reported-by: Oleksandr Natalenko <pfactum@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50508
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 5 Oleksandr Natalenko 2012-06-19 08:02:58 UTC
I've cherry-picked that commit, applied to 2.19.0 and compiled. Bug is fixed, thanks.
Comment 6 Chris Wilson 2012-06-20 02:28:33 UTC
*** Bug 51251 has been marked as a duplicate of this bug. ***
Comment 7 Csaba Henk 2012-07-01 08:14:19 UTC
(In reply to comment #6)
> *** Bug 51251 has been marked as a duplicate of this bug. ***

- Switching to SNA does fix the problem (so, /me moves to works4me state).

- However, 0a43d425 does not seem to be a fully satisfying fix wrt. UXA.
  It is an improvement, but an annoying flicker is still there. See
  http://youtu.be/xjhHd-bB-LM (gvim shown with UXA + 0a43d425, first with
  Cairo 1.10.*, then with Cairo 1.12.*).
Comment 8 Chris Wilson 2012-07-01 08:20:39 UTC
The flicker is ultimately due to the background being rendered twice. The question though is why is that more visible in cairo-1.12, to which I have no immediate answer.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.