QString QMeeGoGraphicsSystemHelper::runningGraphicsSystemName()
{
    if (! QApplicationPrivate::instance()) {
        qWarning("Querying graphics system but application not running yet!");
        return QString();
    }

    QString name = QApplicationPrivate::instance()->graphics_system_name;
    if (name == QLatin1String("runtime")) {
        QRuntimeGraphicsSystem *rsystem = (QRuntimeGraphicsSystem *) QApplicationPrivate::instance()->graphics_system;
        name = rsystem->graphicsSystemName();
    }

    return name;
}
Example #2
0
QS60WindowSurface::~QS60WindowSurface()
{
#if defined(QT_GRAPHICSSYSTEM_RUNTIME) && defined(Q_SYMBIAN_SUPPORTS_SURFACES)
    if(QApplicationPrivate::runtime_graphics_system) {
        QRuntimeGraphicsSystem *runtimeGraphicsSystem =
                static_cast<QRuntimeGraphicsSystem*>(QApplicationPrivate::graphics_system);
        if(runtimeGraphicsSystem->graphicsSystemName() == QLatin1String("openvg")) {

            // Graphics system has been switched from raster to openvg.
            // Issue empty redraw to clear the UI surface

            QWidget *w = window();
            if (w->testAttribute(Qt::WA_WState_Created)) {
                RWindow *const window = static_cast<RWindow *>(w->winId()->DrawableWindow());
                window->BeginRedraw();
                window->EndRedraw();
            }
        }
    }
#endif

    delete d_ptr;
}