Home Fast UI With Qt 4 on Mobile

Fast UI With Qt 4 on Mobile

Difference-between-560
For device manufacturers, and those targeting device manufacturers like us in the Mer¹ and Nemo Mobile².communities, we need a performant base, and Qt’s default configuration on Linux is ..not really that performant. It uses what is known as the ‘native’ graphics system, which uses X (and XRender) to do a lot of the grunt work. Unfortunately, XRender isn’t exactly what you’d call speedy in many cases, and making loads of round trips to ask X to draw things probably doesn’t help either.
There’s another option in the ‘raster’ graphics system, which does all rendering client-side in your application using (as you’d expect) Qt’s software rasterizer, which is adequate enough for performance on most desktops, but still not quite optimal on desktops: hardware acceleration is the missing goodie.
Qt as of 4.8 also includes what’s known as the MeeGo graphics system – as the name implies, it’s used on the Nokia N9. It uses hardware acceleration (plus some additional EGL extensions) to perform absolute magic and make your pixels (especially QML :)) fly, so if you’re working on getting a device together using Qt 4, I’d highly recommend you look at it.
Because no blog post is complete without a video, here’s one:

 

(comparing the performance of raster and MeeGo graphics systems on a Lenovo S10-3t)

This sounds great, but there’s one caveat. If you’re on certain types of graphics hardware (SGX in particular), then you’ll probably not to just want to enable the MeeGo graphics system for everything, because you’ll end up with a lot of GL contexts allocated, which is not good for two reasons; they’re scarce resources, and they take up a large chunk of RAM (something in the order of 5-10mb, depending on your PVR configuration file. I never actually looked).
There is good news at hand, though! Qt has *another* graphics system, specifically designed to proxy everything through another system, and allow for runtime switching back to raster. In our case, obviously, we want it to use MeeGo’s graphics system by default, but fall back to raster to avoid taking extra resources when not needed.
There’s also some bad news: it didn’t work out of the box with Qt 4.8 RC1.
But some more good news: I fixed it (and yes, I upstreamed the patches)!
http://qt.gitorious.org/qt/qt/commit/a7c77bd46ef85bae624e829cb2a02110ec60b318
and
http://qt.gitorious.org/qt/qt/commit/0ceab866c76e0d9eb17bc1f3d42af06c0033560b
are the two commits you’ll want.
After that, configure Qt with -graphicssystem runtime, and -runtimegraphicssystem meego (or set QT_DEFAULT_RUNTIME_SYSTEM=meego), and it’ll work beautifully, provided your system has the required GL extensions.
Alternatively, you can use Mer, which already includes these patches right now, and, as of this week, has this beautiful magic enabled by default on the Nokia N900/N950/N9 hardware ports, where this is really needed (and works well). I’m working on getting it enabled by default on other systems that can support it, too, like the Lenovo S10-3t, as time permits.
Source blog.rburchell.com

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the gambling and blockchain industries for major developments, new product and brand launches, game releases and other newsworthy events. Editors assign relevant stories to in-house staff writers with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Get the biggest iGaming headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Gambling News

    Explore the latest in online gambling with our curated updates. We cut through the noise to deliver concise, relevant insights, keeping you informed about the ever-changing world of iGaming and its most important trends.

    In-Depth Strategy Guides

    Elevate your game with tailored strategies for sports betting, table games, slots, and poker. Learn how to maximize bonuses, refine your tactics, and boost your chances to beat the house.

    Unbiased Expert Reviews

    Honest and transparent reviews of sportsbooks, casinos and poker rooms crafted through industry expertise and in-depth analysis. Delve into intricacies, get the best bonus deals, and stay ahead with our trustworthy guides.