[Interest] animation on font.pixelSize

Thomas Senyk thomas.senyk at pelagicore.com
Fri Jan 11 16:59:21 CET 2013


Hi,

as with Quick2.0 we got the very nice DistanceField-font-rendering.
So in theory animations on Text{ font.pixelSize } should be fairly cheap, 
right?

With the following code snipped I got performance problems never the less:

import QtQuick 2.0
Text {
    id: text
    width: 500
    height: 100
    text: "Test font.pixelSize animation"
    NumberAnimation {
        running: true
        loops: Animation.Infinite
        duration: 2000
        target: text
        property: "font.pixelSize"
        from: 10
        to: 90
    }
}


The strange thing is, on my desktop he has 100% cpu load for the first 2-4 
loops. 
... I wild guess: It looks like it needs to render the font-glyphs for each(?) 
size and after a few cycles it got all of them rendered and cached...?
(it can't render all of them in the first loop as he jumps due to bad 
performance)

On embedded (raspberry pi) I get <20% load all the time.

On desktop I got:
 - intel xeon 3ghz
 - nvidia 8600gts
 - Qt5 checkout from this week, branch: stable 
 - xcb as platform backend (using freetype and fontconfig)

On the raspberry  I got:
  - BCM 2835 (slow ARM11 cpu, fast VideoCore IV GPU)
  - eglfs as platform backend
  - no fontconfig -> QBasicFontDatabase
(If it helps I can do a fontconfig build)

Is this know? Can anyone verify?
And possible explanation? .. maybe my Qt5 build on desktop is flawed?


(If this belongs to development at qt-project.org, feel free to move)

Greets
Thomas



More information about the Interest mailing list