Results 1 to 7 of 7

Thread: How Qt writes to the frame buffer

  1. #1
    Join Date
    Oct 2010
    Posts
    13
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default How Qt writes to the frame buffer

    Hi All,

    I have been using Qt with Linux for last one month. I have also managed to develop quite a few applications. Now the thing I don't know is how Qt writes to the frame buffer. What is the refreshing rate at which the Qt writes to the FB. This information is required to do a comparison study between Qt and other UI framewroks. So please let me know about any details or documents available for this.

    Regards,
    Siva

  2. #2
    Join Date
    Nov 2010
    Posts
    16
    Thanked 1 Time in 1 Post

    Default Re: How Qt writes to the frame buffer

    It only draws to the frame buffer as needed. If your code does qlabel->setText("updated"); and the text was not 'updated' previous and the widget and all parents have called show(), then it will draw to the frame buffer. After that, the frame buffer memory refreshes the screen. You can also 'batch' updates. This might make sense to avoid flicker if you are drawing a complicated scene.

    When you call 'qlabel->setText('newer text'), then the code goes and updates the frame buffer. You should be careful in comparing graphic frame works. Some are object oriented others just do blitting operations. They operate at different levels. Most 'object oriented' (have buttons, menus, lists, etc) also have the primitives to draw lines, display text, etc. However, they also have a framework to react and update the screen according to mouse and key events. WindML, Zinc, Peg, NanoX, etc all have different features. Having graphics acceleration to draw lines, text, fill areas, etc will increase the frame rates possible with some of these systems.

  3. #3
    Join Date
    Nov 2010
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How Qt writes to the frame buffer

    I also has similar question. Test Qt4.5 on ARM Linux. I used painter to draw a sin wave with 600 points, but found refresh rate has only about 5~7Hz, cannot be higher. Then I try QWT curvdemo2 example (>300 data points) on ARM linux for comparison and found refresh rate also very slow, is it normal? How to increase refresh rate with same data points? Does QT provide class to directly write to framebuffer?

  4. #4
    Join Date
    Nov 2010
    Posts
    16
    Thanked 1 Time in 1 Post

    Default Re: How Qt writes to the frame buffer

    Quote Originally Posted by DavidC View Post
    Does QT provide class to directly write to framebuffer?
    Follow these instructions,
    http://doc.qt.nokia.com/4.7/qt-perfo...-backing-store

    You should compare Qt to direct writes to the frame buffer. Your linux frame buffer driver might not be high performance. Some fb drivers may transfer data across and SPI bus, etc. You can open '/dev/fb0', mmap the file and run a standard memory benchmarking algorithm against that memory.

    Other possibilities are to use 'mplayer -benchmark' with an mjpeg video of you sine wave. I have an ARM 926 running at about 200MHz and video rates are approx. 30fps with the 'demo/embedded/raycasting' example in the Qt directory. You should also try this demo and see if it gets better frame rates. If so, then your Qt programming could be improved by looking at the source for the raycasting demo.

  5. #5
    Join Date
    Apr 2012
    Posts
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: How Qt writes to the frame buffer

    raycasting at 30fps ... at what resolution ? On my Gumstix Overo (OMAP3530) at 500mHz
    I get 4fps at 1024x768, 10fps at 640x480 and 30fps+ only at much smaller resolution.
    What I dont understand is that even without moving into the maze using the key ... the
    program eats lots of CPU ... if there are no actions from the user ... should not eat so
    much CPU ... is the refreshment need so much ! (note that my system has no SGX
    acceleration yet)

    Regards

    Brahim

  6. #6
    Join Date
    Sep 2013
    Posts
    1
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Symbian S60 Android Maemo/MeeGo

    Default Re: How Qt writes to the frame buffer

    Quote Originally Posted by Shiva View Post
    Hi All,

    I have been using Qt with Linux for last one month. I have also managed to develop quite a few applications. Now the thing I don't know is how Qt writes to the frame buffer. What is the refreshing rate at which the Qt writes to the FB. This information is required to do a comparison study between Qt and other UI framewroks. So please let me know about any details or documents available for this.

    Regards,
    Siva
    Hi All,

    I have also been been using Qt with Linux for last 6 months, i want to capture all the output(RGB) data and need to send server, if i got to know how qt writes data into frame buffer then its easy to capture those data, so please let me konw the display mechanisum of qt.

    Thanks & Regards,
    Sriraj

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How Qt writes to the frame buffer

    Which Qt version, what platform?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QGLWidget and GL Frame Buffer Object
    By ArlexBee-871RBO in forum Qt Programming
    Replies: 0
    Last Post: 17th August 2010, 23:49
  2. How to draw a widget directly on the frame buffer
    By kapoorsudhish in forum Qt Programming
    Replies: 8
    Last Post: 12th November 2009, 06:59
  3. Frame buffer background during splash screen
    By Micawber in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 23rd January 2009, 19:38
  4. Port from QT4/X11 to Qtopia/Frame buffer
    By Sheng in forum Qt Programming
    Replies: 2
    Last Post: 18th September 2008, 03:21
  5. No output on frame buffer (arm target board)
    By devendra in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 29th November 2006, 20:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.