QML is rendered in a way that has a significant update compared to the previous version (CPU threads are responsible for drawing, GPU threads are responsible for rendering), and a lot more frequent comments good

Source: Internet
Author: User

Qyvlik
Links: http://www.zhihu.com/question/38867614/answer/78583440
Source: Know
Copyright belongs to the author, please contact the author for authorization.

Do the UI ah. If it's a desktop app, QML can be faster. If it is mobile phone ui,h5 absolute advantage.


After all, the set of control libraries provided by QT is more suitable for desktop applications, while Nokia developed the QML Mobile Control library for Symbian and rice fruit, and now Ubuntu, Swordfish and BlackBerry have their own QML mobile control library.


Rendering performance. The QML has an absolutely uniform interface specification and rendering mechanism. (This is the case across platforms). H5 Desktop System A set, on Google do good. Mobile WebKit Yes, but the system's support for WebKit is not as expressive.


Next, let me say qml. QML's execution engine is a QT-based V4 engine, and V4 's biggest change is the addition of a type. (For source analysis, please go to qtdeclarative source skimming) added a type to allow QML property binding compared to the previous version (Qt4 Qtquick 1.x) has an extremely large increase. Property bindings (data binding, expression binding). Well, there are properties bindings that are ubiquitous in qml, although there are JS libraries in the H5 that have similar data bindings. But QML is supported in grammar.

QML's rendering is also a significant update compared to previous versions. The previous version (Qt4 Qtquick 1.x) was closer to the widget, although it was griphics/view, but the rendering was more of a priority for CPU processing. Of course, in N9 (well, the first system that completely uses the QML construction application), it uses the GPU and has hardware acceleration.


The QML rendering style now prefers to use video cards first. (so using QML now requires good graphics support, such as installing the video driver correctly).
Simply pull the QML rendering mechanism now.


1. Event-based, Griphics/secen based


2. There are two threads, one drawing, one rendering.


3. The CPU is responsible for drawing and the GPU is responsible for rendering.


4. When a redraw is required, the drawing thread pauses, the render thread renders, the rendering completes, the drawing thread starts, draws.


Well, I read the QT English document, I understand it, and the narrative is not the same. In addition, QT is developing Qt3d, an analogy to WebGL, whose performance and scalability is much larger than H5 's WebGL, well, is a heavy weapon. In fact, it also reflects the efficiency of qml rendering and drawing.

QML is rendered in a way that has a significant update compared to the previous version (CPU threads are responsible for drawing, GPU threads are responsible for rendering), and a lot more frequent comments good

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.