Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to accelerate a widgets rendering?
Forum Updated to NodeBB v4.3 + New Features

How to accelerate a widgets rendering?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.2k 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.
  • V Offline
    V Offline
    Voronar
    wrote on last edited by
    #1

    Hello everyone!

    I've been searching for a method to accelerating of WebView (WebEngineView) widget rendering in order to use more faster Web Canvas API in result.
    I've tried "this method":http://doc.qt.digia.com/qq/qq26-openglcanvas.html, but I didn't get the desired result.
    It's my code:
    @#include <QApplication>
    #include <QGraphicsScene>
    #include <QGraphicsView>
    #include <QGLWidget>

    int main(int argv, char **args)
    {
    QApplication app(argv, args);
    QGraphicsScene scene;

    QWebView* webkit = new QWebView;
    webkit->load(QUrl("http://www.smashcat.org/av/canvas_test/"));

    scene.addWidget(webkit);
    QGraphicsView view(&scene);

    view.setViewport(new QGLWidget(QGLFormat(QGL::DoubleBuffer)));
    view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
    view.show();
    return app.exec();
    }@

    In result I have low FPS (70 avg) value of web-canvas test in my qt-app.
    A result of the same test in google chrome is 180 avg.
    Furthermore I tried to implement QGLWidget based class. I got the same low FPS.

    Are there any ways to accelerate the widgets rendering?

    P.S. My working PC configuration:
    OS: Ubuntu 14.04 32-bit
    Memory: 1,9 GiB
    Processor: Intel® Core™2 Duo CPU E7600 @ 3.06GHz × 2
    Graphics: Intel® G45/G43 x86/MMX/SSE2

    1 Reply Last reply
    0
    • M Offline
      M Offline
      msue
      wrote on last edited by
      #2

      You can try to use QGraphicsView::MinimalViewportUpdate instead of FullViewportUpdate, or SmartViewportUpdate.

      You can also try to use the new class QOpenGLWidget of Qt 5.4.

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Voronar
        wrote on last edited by
        #3

        First variant hasn't been helped.
        I tried to implement QGLWidget and new version. May be I did something wrong because there are few examples of widgets accelerating with OpenGL.

        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