[Development] iMX6 EGLGS 2D (QtWidgets) painting acceleration

Denis Shienkov denis.shienkov at gmail.com
Wed Aug 29 12:21:18 CEST 2018


I even have created a simple test app, which re-fill the 1280x800 rect
every 50 msec with the 'red' and 'green' colors.

[code]

#include <QApplication>

#include <QWidget>

#include <QPaintEvent>

#include <QPainter>


class Widget final : public QWidget

{

public:

    explicit Widget(QWidget *parent = nullptr);

private:

    void paintEvent(QPaintEvent *event) final;

    void timerEvent(QTimerEvent *event) final;

};


Widget::Widget(QWidget *parent)

    : QWidget(parent)

{

    startTimer(50);

}


void Widget::paintEvent(QPaintEvent *event)

{

    QPainter p(this);

    static bool toggled = false;

    const auto color = (toggled) ? QColor(Qt::red) : QColor(Qt::green);

    const auto rect = event->rect();

    p.fillRect(rect, color);

    toggled = !toggled;

}


void Widget::timerEvent(QTimerEvent *event)

{

    Q_UNUSED(event);

    update();

}


int main(int argc, char *argv[])

{

    QApplication app(argc, argv);

    Widget w;

    w.setMinimumSize(1280, 800);

    w.show();

    return app.exec();

}

[/code]

And then I see that the Desktop PC has the ~0% CPU load, but the iMX6 has
~50% CPU load. WTF?

BR,
Denis



ср, 29 авг. 2018 г. в 12:39, Denis Shienkov <denis.shienkov at gmail.com>:

> Hi all.
>
> I have an Apalis iMX6 board with the Yocto's image with the working
> 'eglfs' and 'linuxfb'  backends (without of X11 support).
>
> I need to create a 'pure' QtWidgets application, where I need to use a
> real-time plotting with the Qwt library (using the Qt Quick is not an
> option, as there the QtCharts is not ready for usage) .
>
> But, I'm sadly surprised that a 2D painting takes ~100% CPU loading as
> with the 'eglfs' and as with 'linuxfb' backends. It is not an acceptable,
> because, e.g. on Desktop Linux/Windows it takes ~4-5% CPU loading.
>
> Is any workarounds for this? Maybe I need to re-build the Yocto's image to
> enable the X11 'xcb' support?
>
> BR,
> Denis
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20180829/f932bfd9/attachment.html>


More information about the Development mailing list