diff options
Diffstat (limited to 'tools')
22 files changed, 325 insertions, 37 deletions
diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 18baa24..1189b99 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -2498,8 +2498,8 @@ void MainWindow::updateDanger(const MultiDataIndex &index, bool verbose) } if (m_ui.actionPlaceMarkerMatches->isChecked()) { - // Stores the occurence count of the place markers in the map placeMarkerIndexes. - // i.e. the occurence count of %1 is stored at placeMarkerIndexes[1], + // Stores the occurrence count of the place markers in the map placeMarkerIndexes. + // i.e. the occurrence count of %1 is stored at placeMarkerIndexes[1], // count of %2 is stored at placeMarkerIndexes[2] etc. // In the first pass, it counts all place markers in the sourcetext. // In the second pass it (de)counts all place markers in the translation. diff --git a/tools/linguist/linguist/printout.cpp b/tools/linguist/linguist/printout.cpp index 581dc00..7ec6875 100644 --- a/tools/linguist/linguist/printout.cpp +++ b/tools/linguist/linguist/printout.cpp @@ -130,7 +130,7 @@ void PrintOut::addBox(int percent, const QString &text, Style style, Qt::Alignme cp.rect.setSize(QSize(cp.rect.width() + wd, qMax(cp.rect.height(), ht))); } -// use init if inital vsize should be calculated (first breakPage call) +// use init if initial vsize should be calculated (first breakPage call) void PrintOut::breakPage(bool init) { static const int LeftAlign = Qt::AlignLeft | Qt::AlignTop; diff --git a/tools/macdeployqt/shared/shared.cpp b/tools/macdeployqt/shared/shared.cpp index 52cf04b..c7d23c0 100644 --- a/tools/macdeployqt/shared/shared.cpp +++ b/tools/macdeployqt/shared/shared.cpp @@ -388,7 +388,7 @@ DeploymentInfo deployQtFrameworks(QList<FrameworkInfo> frameworks, foreach (FrameworkInfo dependency, dependencies) { changeInstallName(dependency.installName, dependency.deployedInstallName, deployedBinaryPath); - // Deploy framework if neccesary. + // Deploy framework if necessary. if (copiedFrameworks.contains(dependency.frameworkName) == false && frameworks.contains(dependency) == false) { frameworks.append(dependency); } diff --git a/tools/porting/src/preprocessorcontrol.cpp b/tools/porting/src/preprocessorcontrol.cpp index 673ed08..31adc32 100644 --- a/tools/porting/src/preprocessorcontrol.cpp +++ b/tools/porting/src/preprocessorcontrol.cpp @@ -154,7 +154,7 @@ QByteArray PreprocessorCache::readFile(const QString &filename) const // read the file for us. if (receivers(SIGNAL(readFile(QByteArray&,QString))) > 0) { QByteArray array; - // Workaround for "not beeing able to emit from const function" + // Workaround for "not being able to emit from const function" PreprocessorCache *cache = const_cast<PreprocessorCache *>(this); emit cache->readFile(array, filename); return array; diff --git a/tools/porting/src/textreplacement.h b/tools/porting/src/textreplacement.h index f90fb82..f351552 100644 --- a/tools/porting/src/textreplacement.h +++ b/tools/porting/src/textreplacement.h @@ -53,7 +53,7 @@ class TextReplacement public: QByteArray newText; int insertPosition; - int currentLenght; //lenght of the text that is going to be replaced. + int currentLenght; //length of the text that is going to be replaced. bool operator<(const TextReplacement &other) const { return (insertPosition < other.insertPosition); @@ -70,7 +70,7 @@ public: insert maintains the TextReplacement list in sorted order. - Returns true if the insert was successfull, false otherwise; + Returns true if the insert was successful, false otherwise; */ bool insert(QByteArray newText, int insertPosition, int currentLenght); void clear(); diff --git a/tools/qconfig/qconfig.pro b/tools/qconfig/qconfig.pro index efbfcf2..171924f 100644 --- a/tools/qconfig/qconfig.pro +++ b/tools/qconfig/qconfig.pro @@ -6,5 +6,4 @@ build_all:!build_pass { } HEADERS = feature.h featuretreemodel.h graphics.h SOURCES = main.cpp feature.cpp featuretreemodel.cpp -INTERFACES = TARGET = qconfig diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index a83a321..d43ad96 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -2015,7 +2015,7 @@ void DitaXmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *mark } /*! - Generates a table of contents begining at \a node. + Generates a table of contents beginning at \a node. */ void DitaXmlGenerator::generateTableOfContents(const Node *node, CodeMarker *marker, @@ -2101,7 +2101,7 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node, /*! Revised for the new doc format. - Generates a table of contents begining at \a node. + Generates a table of contents beginning at \a node. */ void DitaXmlGenerator::generateTableOfContents(const Node *node, CodeMarker *marker, diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp index 98246c4..63e8df7 100644 --- a/tools/qdoc3/helpprojectwriter.cpp +++ b/tools/qdoc3/helpprojectwriter.cpp @@ -49,6 +49,7 @@ #include "config.h" #include "node.h" #include "tree.h" +#include <qdebug.h> QT_BEGIN_NAMESPACE @@ -250,8 +251,9 @@ bool HelpProjectWriter::generateSection(HelpProject &project, foreach (const QString &name, project.subprojects.keys()) { SubProject subproject = project.subprojects[name]; // No selectors: accept all nodes. - if (subproject.selectors.isEmpty()) + if (subproject.selectors.isEmpty()) { project.subprojects[name].nodes[objName] = node; + } else if (subproject.selectors.contains(node->type())) { // Accept only the node types in the selectors hash. if (node->type() != Node::Fake) @@ -262,9 +264,10 @@ bool HelpProjectWriter::generateSection(HelpProject &project, const FakeNode *fakeNode = static_cast<const FakeNode *>(node); if (subproject.selectors[node->type()].contains(fakeNode->subType()) && fakeNode->subType() != Node::ExternalPage && - !fakeNode->fullTitle().isEmpty()) + !fakeNode->fullTitle().isEmpty()) { project.subprojects[name].nodes[objName] = node; + } } } } @@ -527,13 +530,11 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer writer.writeStartElement("section"); writer.writeAttribute("ref", href); writer.writeAttribute("title", fakeNode->fullTitle()); - // qDebug() << "Title:" << fakeNode->fullTitle(); - if (fakeNode->subType() == Node::HeaderFile) { - + if ((fakeNode->subType() == Node::HeaderFile) || (fakeNode->subType() == Node::QmlClass)) { // Write subsections for all members, obsolete members and Qt 3 // members. - if (!project.memberStatus[node].isEmpty()) { + if (!project.memberStatus[node].isEmpty() || (fakeNode->subType() == Node::QmlClass)) { QString membersPath = href.left(href.size()-5) + "-members.html"; writer.writeStartElement("section"); writer.writeAttribute("ref", membersPath); @@ -690,8 +691,9 @@ void HelpProjectWriter::generateProject(HelpProject &project) if (subproject.sortPages) { QStringList titles = subproject.nodes.keys(); titles.sort(); - foreach (const QString &title, titles) + foreach (const QString &title, titles) { writeNode(project, writer, subproject.nodes[title]); + } } else { // Find a contents node and navigate from there, using the NextLink values. foreach (const Node *node, subproject.nodes) { diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 9e45f8c..76ee4e8 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -3413,7 +3413,7 @@ QString HtmlGenerator::protect(const QString &string, const QString &outputEncod #undef APPEND } -QString HtmlGenerator::fileBase(const Node *node) +QString HtmlGenerator::fileBase(const Node *node) const { QString result; @@ -3544,8 +3544,11 @@ QString HtmlGenerator::linkForNode(const Node *node, const Node *relative) return QString(); fn = fileName(node); -/* if (!node->url().isEmpty()) - return fn;*/ +#if 0 + if (!node->url().isEmpty()) + return fn; +#endif + #if 0 // ### reintroduce this test, without breaking .dcf files if (fn != outFileName()) diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index d885ada..b96d737 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -241,7 +241,7 @@ class HtmlGenerator : public PageGenerator void generateStatus(const Node *node, CodeMarker *marker); QString registerRef(const QString& ref); - QString fileBase(const Node *node); + virtual QString fileBase(const Node *node) const; #if 0 QString fileBase(const Node *node, const SectionIterator& section); #endif diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index dcabeb4..358f17f 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -62,11 +62,15 @@ qhp.Qt.extraFiles = index.html \ qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc qhp.Qt.customFilters.Qt.name = Qt 4.7.1 qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 -qhp.Qt.subprojects = classes overviews examples +qhp.Qt.subprojects = classes qmlelements overviews examples qhp.Qt.subprojects.classes.title = Classes -qhp.Qt.subprojects.classes.indexTitle = Qt's Classes +qhp.Qt.subprojects.classes.indexTitle = All Classes qhp.Qt.subprojects.classes.selectors = class fake:headerfile qhp.Qt.subprojects.classes.sortPages = true +qhp.Qt.subprojects.qmlelements.title = QML Elements +qhp.Qt.subprojects.qmlelements.indexTitle = QML Elements +qhp.Qt.subprojects.qmlelements.selectors = fake:qmlclass +qhp.Qt.subprojects.qmlelements.sortPages = true qhp.Qt.subprojects.overviews.title = Overviews qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs qhp.Qt.subprojects.overviews.selectors = fake:page,group,module diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index ea97205..947beb2 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -62,11 +62,15 @@ qhp.Qt.extraFiles = index.html \ qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc qhp.Qt.customFilters.Qt.name = Qt 4.7.1 qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 -qhp.Qt.subprojects = classes overviews examples +qhp.Qt.subprojects = classes qmlelements overviews examples qhp.Qt.subprojects.classes.title = Classes qhp.Qt.subprojects.classes.indexTitle = Qt's Classes qhp.Qt.subprojects.classes.selectors = class fake:headerfile qhp.Qt.subprojects.classes.sortPages = true +qhp.Qt.subprojects.qmlelements.title = QML Elements +qhp.Qt.subprojects.qmlelements.indexTitle = QML Elements +qhp.Qt.subprojects.qmlelements.selectors = fake:qmlclass +qhp.Qt.subprojects.qmlelements.sortPages = true qhp.Qt.subprojects.overviews.title = Overviews qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs qhp.Qt.subprojects.overviews.selectors = fake:page,group,module diff --git a/tools/qdoc3/tokenizer.h b/tools/qdoc3/tokenizer.h index bd35965..1b33f6f 100644 --- a/tools/qdoc3/tokenizer.h +++ b/tools/qdoc3/tokenizer.h @@ -145,7 +145,7 @@ class Tokenizer int ch = getch(); if (ch == EOF) return EOF; - // cast explicitely to make sure the value of ch + // cast explicitly to make sure the value of ch // is in range [0..255] to avoid assert messages // when using debug CRT that checks its input. return int(uint(uchar(ch))); diff --git a/tools/qmeegographicssystemhelper/qmeegofencesync.cpp b/tools/qmeegographicssystemhelper/qmeegofencesync.cpp new file mode 100644 index 0000000..499e102 --- /dev/null +++ b/tools/qmeegographicssystemhelper/qmeegofencesync.cpp @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmeegofencesync.h" +#include "qmeegofencesync_p.h" +#include "qmeegoruntime.h" + +/* QMeeGoFenceSyncPrivate */ + +QMeeGoFenceSyncPrivate::QMeeGoFenceSyncPrivate() : syncObject(NULL) +{ +} + +QMeeGoFenceSyncPrivate::~QMeeGoFenceSyncPrivate() +{ + if (syncObject) { + QMeeGoRuntime::destroyFenceSync(syncObject); + syncObject = NULL; + } +} + +/* QMeeGoFenceSync */ + +QMeeGoFenceSync::QMeeGoFenceSync(QWidget *parent) : QObject(parent), d_ptr(new QMeeGoFenceSyncPrivate()) +{ + Q_D(QMeeGoFenceSync); + d->q_ptr = this; +} + +QMeeGoFenceSync::~QMeeGoFenceSync() +{ +} + +void QMeeGoFenceSync::setSyncPoint() +{ + Q_D(QMeeGoFenceSync); + if (d->syncObject) + QMeeGoRuntime::destroyFenceSync(d->syncObject); + + d->syncObject = QMeeGoRuntime::createFenceSync(); +} diff --git a/tools/qmeegographicssystemhelper/qmeegofencesync.h b/tools/qmeegographicssystemhelper/qmeegofencesync.h new file mode 100644 index 0000000..2d3f5c5 --- /dev/null +++ b/tools/qmeegographicssystemhelper/qmeegofencesync.h @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMEEGOFENCESYNC_H +#define QMEEGOFENCESYNC_H + +#include <QWidget> + +class QMeeGoFenceSyncPrivate; + +//! A synchronization helper for GL pipeline. +/*! + Fence syncs provide a mechanism for synchronizing access to certain GL primitives + and make it possible for the application developer to be sure that a certain point + in the GL processing pipeline has been already executed before continuing operation. + + Currently fence syncs are only useful in conjunction with QMeeGoLivePixmaps. + \code + ... + // In your paint/expose event: + QImage *image = livePixmap->lock(&someGlobalFenceSync); + // Modify the image... + livePixmap->release(image); + + painter->drawPixmap(0, 0, *livePixmap); + someGlobalFenceSync.setSyncPoint(); + ... + \endcode + + Assuming the paint/expose events come repeatedly, the lock operation + will block till the previous event completed painting the livePixmap. +*/ + +class Q_DECL_EXPORT QMeeGoFenceSync : public QObject +{ +public: + //! Constructs a new fence sync. + /*! + The fence sync is created without a sync point. You need to set the sync point manually. + */ + QMeeGoFenceSync(QWidget *parent = 0); + + //! Destructor for the fence sync. + virtual ~QMeeGoFenceSync(); + + //! Sets the fence sync. + /*! + The fence sync synchronization point should be set after all drawing has been scheduled. + Setting a synchronization point always overrides the previous point -- whetver is was + used (waited upon) or not. + */ + void setSyncPoint(); + +private: + Q_DISABLE_COPY(QMeeGoFenceSync) + Q_DECLARE_PRIVATE(QMeeGoFenceSync) + +protected: + QScopedPointer<QMeeGoFenceSyncPrivate> d_ptr; //! Private bits. + friend class QMeeGoLivePixmap; +}; + +#endif diff --git a/tools/qmeegographicssystemhelper/qmeegofencesync_p.h b/tools/qmeegographicssystemhelper/qmeegofencesync_p.h new file mode 100644 index 0000000..8a5d26e --- /dev/null +++ b/tools/qmeegographicssystemhelper/qmeegofencesync_p.h @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmeegofencesync.h" + +#ifndef QMEEGOFENCESYNC_P_H +#define QMEEGOFENCESYNC_P_H + +class QMeeGoFenceSyncPrivate +{ +public: + Q_DECLARE_PUBLIC(QMeeGoFenceSync); + QMeeGoFenceSyncPrivate(); + + virtual ~QMeeGoFenceSyncPrivate(); + + void* syncObject; + + QMeeGoFenceSync *q_ptr; +}; + +#endif diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro index 7412fc3..161a31b 100644 --- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro +++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro @@ -6,5 +6,5 @@ include(../../src/qbase.pri) QT += gui INCLUDEPATH += '../../src/plugins/graphicssystems/meego' -HEADERS = qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h -SOURCES = qmeegographicssystemhelper.cpp qmeegooverlaywidget.cpp qmeegoruntime.cpp qmeegolivepixmap.cpp qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h +HEADERS = qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h qmeegofencesync.h qmeegofencesync_p.h +SOURCES = qmeegographicssystemhelper.cpp qmeegooverlaywidget.cpp qmeegoruntime.cpp qmeegolivepixmap.cpp qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h qmeegofencesync.h qmeegofencesync_p.h qmeegofencesync.cpp diff --git a/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp b/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp index d43efe2..9700581f 100644 --- a/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp +++ b/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp @@ -41,6 +41,7 @@ #include "qmeegolivepixmap.h" #include "qmeegolivepixmap_p.h" +#include "qmeegofencesync_p.h" #include "qmeegoruntime.h" /* QMeeGoLivePixmapPrivate */ @@ -102,10 +103,12 @@ QMeeGoLivePixmap::~QMeeGoLivePixmap() { } -QImage* QMeeGoLivePixmap::lock() +QImage* QMeeGoLivePixmap::lock(QMeeGoFenceSync *fenceSync) { - return QMeeGoRuntime::lockLiveTexture(this); - + if (fenceSync) + return QMeeGoRuntime::lockLiveTexture(this, fenceSync->d_func()->syncObject); + else + return QMeeGoRuntime::lockLiveTexture(this, NULL); } void QMeeGoLivePixmap::release(QImage *img) diff --git a/tools/qmeegographicssystemhelper/qmeegolivepixmap.h b/tools/qmeegographicssystemhelper/qmeegolivepixmap.h index 7be2c4b..51b5976 100644 --- a/tools/qmeegographicssystemhelper/qmeegolivepixmap.h +++ b/tools/qmeegographicssystemhelper/qmeegolivepixmap.h @@ -43,6 +43,7 @@ #define QMEEGOLIVEPIXMAP_H #include <QPixmap> +#include "qmeegofencesync.h" class QMeeGoLivePixmapPrivate; class QSharedMemory; @@ -82,8 +83,12 @@ public: //! Locks the access to the pixmap. /*! The returned image can be used for direct access. + You can optionally specify a fence sync to wait upon before unlocking. When + you specify a fence sync, you can be sure that this function will return only + when the previsouly set QMeeGoFenceSync synchronization point has been executed/passed + by the GL processing pipeline. */ - QImage* lock(); + QImage* lock(QMeeGoFenceSync *fenceSync = NULL); //! Unlocks the access to the pixmap. /*! diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp index ac627e5..2d3ee3c 100644 --- a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp +++ b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp @@ -60,9 +60,11 @@ typedef void (*QMeeGoSetSurfaceScalingFunc) (int x, int y, int w, int h); typedef void (*QMeeGoSetTranslucentFunc) (bool translucent); typedef QPixmapData* (*QMeeGoPixmapDataWithNewLiveTextureFunc) (int w, int h, QImage::Format format); typedef QPixmapData* (*QMeeGoPixmapDataFromLiveTextureHandleFunc) (Qt::HANDLE h); -typedef QImage* (*QMeeGoLiveTextureLockFunc) (QPixmap*); +typedef QImage* (*QMeeGoLiveTextureLockFunc) (QPixmap*, void* fenceSync); typedef bool (*QMeeGoLiveTextureReleaseFunc) (QPixmap*, QImage *i); typedef Qt::HANDLE (*QMeeGoLiveTextureGetHandleFunc) (QPixmap*); +typedef void* (*QMeeGoCreateFenceSyncFunc) (void); +typedef void (*QMeeGoDestroyFenceSyncFunc) (void *fs); static QMeeGoImageToEglSharedImageFunc qt_meego_image_to_egl_shared_image = NULL; static QMeeGoPixmapDataFromEglSharedImageFunc qt_meego_pixmapdata_from_egl_shared_image = NULL; @@ -77,6 +79,8 @@ static QMeeGoPixmapDataFromLiveTextureHandleFunc qt_meego_pixmapdata_from_live_t static QMeeGoLiveTextureLockFunc qt_meego_live_texture_lock = NULL; static QMeeGoLiveTextureReleaseFunc qt_meego_live_texture_release = NULL; static QMeeGoLiveTextureGetHandleFunc qt_meego_live_texture_get_handle = NULL; +static QMeeGoCreateFenceSyncFunc qt_meego_create_fence_sync = NULL; +static QMeeGoDestroyFenceSyncFunc qt_meego_destroy_fence_sync = NULL; void QMeeGoRuntime::initialize() { @@ -103,12 +107,15 @@ void QMeeGoRuntime::initialize() qt_meego_live_texture_lock = (QMeeGoLiveTextureLockFunc) library.resolve("qt_meego_live_texture_lock"); qt_meego_live_texture_release = (QMeeGoLiveTextureReleaseFunc) library.resolve("qt_meego_live_texture_release"); qt_meego_live_texture_get_handle = (QMeeGoLiveTextureGetHandleFunc) library.resolve("qt_meego_live_texture_get_handle"); + qt_meego_create_fence_sync = (QMeeGoCreateFenceSyncFunc) library.resolve("qt_meego_create_fence_sync"); + qt_meego_destroy_fence_sync = (QMeeGoDestroyFenceSyncFunc) library.resolve("qt_meego_destroy_fence_sync"); if (qt_meego_image_to_egl_shared_image && qt_meego_pixmapdata_from_egl_shared_image && qt_meego_pixmapdata_with_gl_texture && qt_meego_destroy_egl_shared_image && qt_meego_update_egl_shared_image_pixmap && qt_meego_set_surface_fixed_size && qt_meego_set_surface_scaling && qt_meego_set_translucent && qt_meego_pixmapdata_with_new_live_texture && qt_meego_pixmapdata_from_live_texture_handle && - qt_meego_live_texture_lock && qt_meego_live_texture_release && qt_meego_live_texture_get_handle) + qt_meego_live_texture_lock && qt_meego_live_texture_release && qt_meego_live_texture_get_handle && + qt_meego_create_fence_sync && qt_meego_destroy_fence_sync) { qDebug("Successfully resolved MeeGo graphics system: %s %s\n", qPrintable(libraryPrivate->fileName), qPrintable(libraryPrivate->fullVersion)); } else { @@ -191,11 +198,11 @@ QPixmapData* QMeeGoRuntime::pixmapDataFromLiveTextureHandle(Qt::HANDLE h) return qt_meego_pixmapdata_from_live_texture_handle(h); } -QImage* QMeeGoRuntime::lockLiveTexture(QPixmap *p) +QImage* QMeeGoRuntime::lockLiveTexture(QPixmap *p, void* fenceSync) { ENSURE_INITIALIZED; Q_ASSERT(qt_meego_live_texture_lock); - return qt_meego_live_texture_lock(p); + return qt_meego_live_texture_lock(p, fenceSync); } bool QMeeGoRuntime::releaseLiveTexture(QPixmap *p, QImage *i) @@ -211,3 +218,17 @@ Qt::HANDLE QMeeGoRuntime::getLiveTextureHandle(QPixmap *pixmap) Q_ASSERT(qt_meego_live_texture_get_handle); return qt_meego_live_texture_get_handle(pixmap); } + +void* QMeeGoRuntime::createFenceSync() +{ + ENSURE_INITIALIZED; + Q_ASSERT(qt_meego_create_fence_sync); + return qt_meego_create_fence_sync(); +} + +void QMeeGoRuntime::destroyFenceSync(void *fs) +{ + ENSURE_INITIALIZED; + Q_ASSERT(qt_meego_destroy_fence_sync); + qt_meego_destroy_fence_sync(fs); +} diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.h b/tools/qmeegographicssystemhelper/qmeegoruntime.h index 6b34836..be6ff6b 100644 --- a/tools/qmeegographicssystemhelper/qmeegoruntime.h +++ b/tools/qmeegographicssystemhelper/qmeegoruntime.h @@ -57,9 +57,11 @@ public: static void setTranslucent(bool translucent); static QPixmapData* pixmapDataWithNewLiveTexture(int w, int h, QImage::Format format); static QPixmapData* pixmapDataFromLiveTextureHandle(Qt::HANDLE h); - static QImage* lockLiveTexture(QPixmap *pixmap); + static QImage* lockLiveTexture(QPixmap *pixmap, void *fenceSync); static bool releaseLiveTexture(QPixmap *pixmap, QImage *image); static Qt::HANDLE getLiveTextureHandle(QPixmap *pixmap); + static void* createFenceSync(); + static void destroyFenceSync(void *fs); private: static bool initialized; diff --git a/tools/qml/qdeclarativetester.cpp b/tools/qml/qdeclarativetester.cpp index eaf3403..499822a 100644 --- a/tools/qml/qdeclarativetester.cpp +++ b/tools/qml/qdeclarativetester.cpp @@ -286,7 +286,7 @@ void QDeclarativeTester::updateCurrentTime(int msec) fe.msec = msec; if (msec == 0 || !(options & QDeclarativeViewer::TestImages)) { // Skip first frame, skip if not doing images - } else if (0 == (m_savedFrameEvents.count() % 60) || snapshot) { + } else if (0 == (m_savedFrameEvents.count()-1 % 60) || snapshot) { fe.image = img; } else { QCryptographicHash hash(QCryptographicHash::Md5); @@ -356,6 +356,11 @@ void QDeclarativeTester::updateCurrentTime(int msec) if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record) && !frame->image().isEmpty()) { QImage goodImage(frame->image().toLocalFile()); + if (frame->msec() == 16 && goodImage.size() != img.size()){ + //Also an image mismatch, but this warning is more informative. Only checked at start though. + qWarning() << "QDeclarativeTester(" << m_script << "): Size mismatch. This test must be run at " << goodImage.size(); + imagefailure(); + } if (goodImage != img) { QString reject(frame->image().toLocalFile() + ".reject.png"); qWarning() << "QDeclarativeTester: Image mismatch. Reject saved to:" |