Results 1 to 3 of 3

Thread: Performance optimizations using Raster backend

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Performance optimizations using Raster backend

    Quote Originally Posted by tothphu View Post
    When I convert an ARGB32 QImage to QPixmap, what is the QPixmap's structure? Is the answer the same when my QImage is ARGB4444_Premultiplied?
    The QPixmap internals are very system specific. For the raster graphics system they might be the same.

    Quote Originally Posted by tothphu View Post
    - as I use a raster device, is there a difference between using drawImage vs drawPixmap? I understand that if I'd have OpenGL QPixmap would be in GPU memory, but not in this case. I'm already underway with testing this, but can I reasonably expect anything?
    Originally the QPixmap object was meant to hold a system specific image buffer, e.g. a X11 Pixmap on X11. potentially living in the process of the windowing system itself, accessed by the application through means like shared memory.

    For raster it could actually be just another image, so drawImage might be more efficient since it doesn't require conversion.

    But as always with performance the only way to tell is to benchmark.

    Quote Originally Posted by tothphu View Post
    - any ideas about potential speed up possible with Qt 4.7.1 -> 5.5 change? (it is a bit of a mission to invest all that time to make the change)
    While I think the the raster implementation in qt5 is more optimized (due to being the default for all platforms now), you should make your own profiling and benchmarks.
    Since you already need a benchmark program for the drawImage vs drawPixmap case, it shouldn't be too difficult to make it also built with Qt5 and get some real world numbers for that case as well.

    Cheers,
    _

  2. #2

    Default Re: Performance optimizations using Raster backend

    Do you mean that the backend might even use ARGB32 not ARGB32_Premultiplied? Although switching everything to ARB32_PM I've managed to reduce calls to convert_ARGB_to_ARGB_PM, but it didn't seem to make a difference in runtimes. I did a bit of searching in Qt source and it seems that only ARGB32_PM format has blending functions (except non transparent formats), which means that no matter what I do it will convert everything to that format. The best I can do is always use ARGB32_PM formats from the beginning. It seems to be same for 5.5 expect there is an A2RGB30 format, which seems to good addition for my case.

    My profiling is quite tricky because I can't do profiling on the target, but I need to do profiling on a different Qt version on X11.... I can do time measuring of some calls.

    I guess drawImage wouldn't make a difference, as the only way to blend images AFAIK is through drawImage calls, which would use the same backend blending functions.

Similar Threads

  1. Replies: 8
    Last Post: 14th June 2013, 10:16
  2. Change phonon backend to vlc backend
    By stereoMatching in forum Newbie
    Replies: 1
    Last Post: 8th September 2012, 05:10
  3. Replies: 0
    Last Post: 17th November 2011, 16:44
  4. Plot Raster chart background
    By jmsbc in forum Qwt
    Replies: 3
    Last Post: 8th August 2010, 19:56
  5. Native vs Raster
    By ArlexBee-871RBO in forum Qt Programming
    Replies: 7
    Last Post: 15th February 2010, 22:22

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.