Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Shared Memory

Shared Memory

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 1 Posters 3.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on last edited by
    #1

    Hi,

    I've been tracing through the Qt for Embedded Linux framework code for the past couple weeks. According to the "architecture overview":http://doc.qt.nokia.com/4.7/qt-embedded-architecture.html the client application is supposed to render its graphics into the shared memory and the server is suppoed to copy the shared memory content to the framebuffer. However, I can't seem to find exactly where in the code the client actually writes to shared memory. I've determined that the shared memory class being used is QWSSharedMemory, and I can see that it's being used by QWSDisplay and QWSSharedMemSurface. However, when I inserted some debugging print statements into the framework, I found that QWSSharedMemSurface actually isn't being used; instead QWSLocalMemSurface is used. I also can't see how QWSDisplay is being used by client applications to write their graphics into memory. Can anyone help me out? Thanks in advance.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jbarron
      wrote on last edited by
      #2

      You're on the right track. The shared memory surface (QWSSharedMemSurface) is only used when you have multiple clients. In QWS, the first application that starts up is the window server so this one doesn't need shared memory, it just uses the local mem surface which just stores the pixel data in a "new uchar[size]" which then gets passed to a QImage. This QImage is what gets painted on when widgets paint themselves to the screen. QWSSharedMemorySurface behaves the same way except instead of a uchar array allocated in process, it uses a shared memory segment to hold the data behind the QImage.

      The window surfaces push their content to the screen in the QWSWindowSurface::flush() function. Here the clients will tell the QWSDisplay that new content is ready for a given region of a given window. In multi-process mode, this will send a command over a UNIX domain socket to the server to compose the new region. In single process mode, it will simply do the composition to the framebuffer in process.

      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on last edited by
        #3

        [quote author="jbarron" date="1306821724"]You're on the right track. The shared memory surface (QWSSharedMemSurface) is only used when you have multiple clients. In QWS, the first application that starts up is the window server so this one doesn't need shared memory, it just uses the local mem surface which just stores the pixel data in a "new uchar[size]" which then gets passed to a QImage. This QImage is what gets painted on when widgets paint themselves to the screen. QWSSharedMemorySurface behaves the same way except instead of a uchar array allocated in process, it uses a shared memory segment to hold the data behind the QImage.

        The window surfaces push their content to the screen in the QWSWindowSurface::flush() function. Here the clients will tell the QWSDisplay that new content is ready for a given region of a given window. In multi-process mode, this will send a command over a UNIX domain socket to the server to compose the new region. In single process mode, it will simply do the composition to the framebuffer in process.[/quote]

        I know this is reviving a really old thread, but thanks for your answer. It was really helpful

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved