Results 1 to 8 of 8

Thread: Client blit in Qt

  1. #1
    Join Date
    Jan 2010
    Posts
    190
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default Client blit in Qt

    Hi! I was reading this guide and I see they are talking about "client blit". Can someone explain what is it for and if it is possible using it to have both OpenGL and QWS on the screen (assuming I can provide a EGL native window)?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: Client blit in Qt

    Can someone explain what is it for and if it is possible using it to have both OpenGL and QWS on the screen (assuming I can provide a EGL native window)?
    Thanks!
    In the link you posted is stated that:
    It is recommended that Qt for Embedded Linux is configured with the -DQT_QWS_CLIENTBLIT and -DQT_NO_QWS_CURSOR options for optimum performance. OpenGL is rendered direct to the screen and these options prevent Qt for Embedded Linux from trying to do its own non-OpenGL compositing on the QGLWidget contents.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2010
    Posts
    190
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default Re: Client blit in Qt

    Problem was that I needed the cursor. But I tried and in fact that definition is not necessary. Anyway, is there anyone able to explain in more detail what client blit is? I suppose it implies rendering somewhere in the memory and copying everything to the screen. Whereas, without blit operation, Qt would write directly on the screen. Is this correct?
    Do you know of any place where I can get some more information on how Qt implements this?
    Thanks!

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

    Default Re: Client blit in Qt

    My guess is that a client blit means that is the client (the app) that does the blitting instead of QWS (the server).
    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.


  5. #5
    Join Date
    Jan 2010
    Posts
    190
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default Re: Client blit in Qt

    Oh... Is blit performed by Qt in any case? Blit implies a copy of blocks of data for each update right?
    And what is the difference then when blit is performed by the clients instead of by the server? Why is it necessary to let QWS and EGL surfaces to coexist?
    Another question: I noticed client blit reduces the performance. Why?
    Thanks for the information! This is very interesting!

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Client blit in Qt

    Quote Originally Posted by Luc4 View Post
    Oh... Is blit performed by Qt in any case?
    It's performed by Qt in both cases. The difference is where the blit happens.

    And what is the difference then when blit is performed by the clients instead of by the server?
    Read high_flyer's response (or the docs he points to) again, the answer is there.

    Why is it necessary to let QWS and EGL surfaces to coexist?
    QWS does its own compositing but since OpenGL usually paints its whole viewport (so the widget is opaque) there is no point in trying to compose it with what's painted below again. At least that's my guess, I've never used this functionality myself.

    Another question: I noticed client blit reduces the performance. Why?
    I would expect it to improve performance in some cases and reduce it in others.
    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.


  7. #7
    Join Date
    Jan 2010
    Posts
    190
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default Re: Client blit in Qt

    Sorry, but that document is not sufficient to answer some questions that I have in mind. What I'm not understanding is how these two works.

    Without client blit I understand each surface redraws itself in some place of the graphic memory. After that, the QWS server performs the compositing and the necessary blocks of data are copied to the area of memory where the screen is placed. Is this correct, more or less?

    With client blit, each surface redraws itself in some area of the graphic memory, and after that what happens? How can each surface know what part of itself has to be placed on the screen? I suppose anyway that the reason why this is necessary for OpenGL to work is that OpenGL draws directly to the screen, and if the blit was performed by the QWS server, it would require raster data.

    Is, more or less, what I said correct?
    Thanks for your help!

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Client blit in Qt

    Quote Originally Posted by Luc4 View Post
    Sorry, but that document is not sufficient to answer some questions that I have in mind. What I'm not understanding is how these two works.
    Then have a look at the source code.

    Without client blit I understand each surface redraws itself in some place of the graphic memory. After that, the QWS server performs the compositing and the necessary blocks of data are copied to the area of memory where the screen is placed. Is this correct, more or less?
    Yes, more or less.

    With client blit, each surface redraws itself in some area of the graphic memory, and after that what happens?
    I'm assuming the current state of the backbuffer is first copied to the client space if needed and then the currently drawn area is blitted onto it and then copied to the backbuffer again (or the client blits directly into the framebuffer).

    How can each surface know what part of itself has to be placed on the screen?
    I don't understand your question.
    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. Client-Client communication
    By zgulser in forum Newbie
    Replies: 0
    Last Post: 2nd December 2010, 09:07
  2. OPC Client
    By ShamusVW in forum Qt Programming
    Replies: 4
    Last Post: 30th September 2010, 21:47
  3. Get IP from client
    By ruben.rodrigues in forum Newbie
    Replies: 2
    Last Post: 28th June 2010, 15:07
  4. Re-implementing blit() of QScreen class
    By node_ex in forum Qt Programming
    Replies: 0
    Last Post: 16th February 2009, 08:36
  5. OPC client with Qt
    By hafwil in forum Qt Programming
    Replies: 0
    Last Post: 18th May 2006, 19:28

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.