Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Flash is working too slow using QGraphicsWebView
Forum Updated to NodeBB v4.3 + New Features

Flash is working too slow using QGraphicsWebView

Scheduled Pinned Locked Moved Qt WebKit
15 Posts 7 Posters 10.1k 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.
  • T Offline
    T Offline
    tom_t42
    wrote on last edited by
    #5

    I tried a couple of the options:

    I removed the "force Flash to be windowless" hack and let flash paint into its own window. After some fiddling I also was able to move the Flash window together with the web-page, but as soon as I zoomed, Flash crashed. I have no idea why (maybe bacause Flash only works properly in windowed mode with QWebView), but as I am not quite keen on searching the reason for this in code I don't have, I gave up on this.

    I saw however that for Meamo Flash is able to paint into a QImage. Would it be possible to do the same under X11? I have a constrained environment, so I would probably be able to find out the default visual used by flash in order to provide it to Flash. Would that improve performance for the OpenGL case? Additionally, I could as well override gdk_default_visual as discussed in http://trac.webkit.org/wiki/QtWebKitPlugins (as I only want to support my compiler/device compination), but again, would OpenGL performance be improved?

    I also tried to replace the QPixmap-buffers in the TiledBackingStore by QImages, but zooming with the raster engine is still rather slow.
    Additionally, when enabling the TiledBackingStore, Flash-videos get somewhat slower. I guess that's because of the frequent update of the backing store.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tiftof
      wrote on last edited by
      #6

      I'm also experiencing slow flash in a QGraphicsWebView in QGraphicsView on linux. Is there any progress on performance increase in this situation?

      I've been looking into overriding gdk_default_visual as this will also let the flash have transparency, but this seems rather drastic and I have no idea what the influence could be for other item in the qgraphicsview. Has this method been tested yet for increased performance with the opengl backend?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bunjee
        wrote on last edited by
        #7

        Greetings,

        I'm also working with a QGraphicsScene + QGraphicsWebView. I'm on Windows Vista + 4.7.2.

        I have to say embedded flash is still slower than in the QWebView, see here: http://developer.qt.nokia.com/forums/viewthread/3937/

        Any insight on why the flash is slower inside a QGraphicsView ? Any workaround ?

        Is the 4.8 likely to improve the situation ?

        Update: on OS-X performance seems slightly better.

        Thanks.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tiftof
          wrote on last edited by
          #8

          I've submitted a patch to webkit which solves the problem of flashes being slow in a QGraphicsWebView when using opengl: https://bugs.webkit.org/show_bug.cgi?id=66650

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bunjee
            wrote on last edited by
            #9

            Awesome tiftof !

            Is this going be merged in Qt 4.8 ?

            Also it would be interesting to investigate why QGraphicsWebView is slower than QWebView in rendering flash in some configurations.

            See here : http://developer.qt.nokia.com/forums/viewthread/3937/

            B.A.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tiftof
              wrote on last edited by
              #10

              I have no idea yet :p I don't know if patches for webkit are still in time for Qt 4.8. And more importantly: the patch isn't accepted yet in webkit :)

              1 Reply Last reply
              0
              • B Offline
                B Offline
                bunjee
                wrote on last edited by
                #11

                Hey tiftof, any news about your patch ? I'm looking forward to use it myself.

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tiftof
                  wrote on last edited by
                  #12

                  Bunjee, I lost track of my patch because I got rid of my performance problems. Because of your reply here, I updated my patch and asked for a review but it got rejected and needs more investigation.

                  I solved my issue without the patch by forcing the opengl engine to opengl 2 instead of 1: http://doc.qt.nokia.com/latest/qgl.html#setPreferredPaintEngine This solved my performance issue with QGraphicsWebView (see the link to webkit bug report for more info on what was my original performance problem).

                  With my problem being solved by switching to the opengl 2 engine, I have to be honest that I don't have much time anymore to investigate this problem further. Hopefully you can solve your problem in the same way. If it doesn't and profiling your application doesn't show that every paint of the QGraphicsWebView triggers a QImage::fromPixmap() call to draw a plugin (which causes my bad flash performance), then our problems probably have a different cause anyway.

                  [EDIT: fixed link, Volker]

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    bunjee
                    wrote on last edited by
                    #13

                    Hello tiftof !

                    Thanks for the reply.

                    According to Qt documentation:

                    bq. By default, the QPaintEngine::OpenGL2 engine is used

                    You had to set this flag anyway ?

                    Thanks.

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      tiftof
                      wrote on last edited by
                      #14

                      Yes, because I'm using an Intel i915 platform running Linux and Mesa is reporting 1.4 compatibility and not 2.0 because of some missing implementations => Qt will use OpenGl 1 by default on that platform.

                      1 Reply Last reply
                      0
                      • Q Offline
                        Q Offline
                        qtnext
                        wrote on last edited by
                        #15

                        I have also the same issue in a webview in qml (windows) .. It's far slower than in wekbit (I render my qml in a qglwidget as viewport). Is there any workaround : I have tryed 4.8RC1 but it's the same issue.

                        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