diff --git a/0001-Fix-crash-with-cleanup-of-animators.patch b/0001-Fix-crash-with-cleanup-of-animators.patch deleted file mode 100644 index 69a1b7f..0000000 --- a/0001-Fix-crash-with-cleanup-of-animators.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 8f3311276e4ca44acb69c8870ccfc3167682b898 Mon Sep 17 00:00:00 2001 -From: Gunnar Sletta -Date: Thu, 28 Aug 2014 11:27:02 +0200 -Subject: [PATCH 1/6] Fix crash with cleanup of animators. - -We had several separate issues relating to how the jobs were cleaned up. - -The first was that upon getting setWindow(0), the animator did not -reset m_controller to 0, leading to the starts() coming after that to -post null jobs to the controller. This would later crash in -beforeNodeSync as the starting job was null. - -The second issue was that during shutdown, QQuickAnimatorProxy -would try to delete jobs on the controller which was already -deleted. The controller is deleted on the GUI thread regardless -of render loop, so this was solved with a QPointer. - -The third was that we were a bit too aggressive in trying to clean up -jobs on the GUI thread, so we introduced a new bool which gets set to -true in startJob() so that Proxy::deleteJob() knows who owns the job. - -Task-number: QTBUG-37833 -Change-Id: I1b6221a2c1ce2bfd0758801b950cda00ff6899d0 -Reviewed-by: Michael Brasser ---- - src/quick/util/qquickanimatorcontroller.cpp | 1 + - src/quick/util/qquickanimatorjob.cpp | 14 ++++++++++---- - src/quick/util/qquickanimatorjob_p.h | 4 +++- - 3 files changed, 14 insertions(+), 5 deletions(-) - -diff --git a/src/quick/util/qquickanimatorcontroller.cpp b/src/quick/util/qquickanimatorcontroller.cpp -index 697c25b..f8e24bf 100644 ---- a/src/quick/util/qquickanimatorcontroller.cpp -+++ b/src/quick/util/qquickanimatorcontroller.cpp -@@ -262,6 +262,7 @@ void QQuickAnimatorController::requestSync() - // These functions are called on the GUI thread. - void QQuickAnimatorController::startJob(QQuickAnimatorProxyJob *proxy, QAbstractAnimationJob *job) - { -+ proxy->markJobManagedByController(); - m_starting[job] = proxy; - requestSync(); - } -diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp -index 9f81f28..d61066b 100644 ---- a/src/quick/util/qquickanimatorjob.cpp -+++ b/src/quick/util/qquickanimatorjob.cpp -@@ -57,6 +57,7 @@ QQuickAnimatorProxyJob::QQuickAnimatorProxyJob(QAbstractAnimationJob *job, QObje - : m_controller(0) - , m_job(job) - , m_internalState(State_Stopped) -+ , m_jobManagedByController(false) - { - m_isRenderThreadProxy = true; - m_animation = qobject_cast(item); -@@ -101,7 +102,10 @@ void QQuickAnimatorProxyJob::deleteJob() - // so delete it through the controller to clean up properly. - if (m_controller) - m_controller->deleteJob(m_job); -- else -+ -+ // We explicitly delete the job if the animator controller has never touched -+ // it. If it has, it will have ownership as well. -+ else if (!m_jobManagedByController) - delete m_job; - m_job = 0; - } -@@ -149,11 +153,13 @@ void QQuickAnimatorProxyJob::controllerWasDeleted() - void QQuickAnimatorProxyJob::setWindow(QQuickWindow *window) - { - if (!window) { -- // Stop will trigger syncBackCurrentValues so best to do it before -- // we delete m_job. - stop(); - deleteJob(); -- return; -+ -+ // Upon leaving a window, we reset the controller. This means that -+ // animators will only enter the Starting phase and won't be making -+ // calls to QQuickAnimatorController::startjob(). -+ m_controller = 0; - - } else if (!m_controller && m_job) { - m_controller = QQuickWindowPrivate::get(window)->animationController; -diff --git a/src/quick/util/qquickanimatorjob_p.h b/src/quick/util/qquickanimatorjob_p.h -index 03b13bc..1ebf12f 100644 ---- a/src/quick/util/qquickanimatorjob_p.h -+++ b/src/quick/util/qquickanimatorjob_p.h -@@ -77,6 +77,7 @@ public: - - void startedByController(); - void controllerWasDeleted(); -+ void markJobManagedByController() { m_jobManagedByController = true; } - - protected: - bool event(QEvent *); -@@ -95,7 +96,7 @@ private: - void setWindow(QQuickWindow *window); - static QObject *findAnimationContext(QQuickAbstractAnimation *); - -- QQuickAnimatorController *m_controller; -+ QPointer m_controller; - QQuickAbstractAnimation *m_animation; - QAbstractAnimationJob *m_job; - int m_duration; -@@ -108,6 +109,7 @@ private: - }; - - InternalState m_internalState; -+ bool m_jobManagedByController; - }; - - class Q_QUICK_PRIVATE_EXPORT QQuickAnimatorJob : public QAbstractAnimationJob --- -2.1.0 - diff --git a/0002-Support-padding-in-images-stored-in-atlas-texture.patch b/0002-Support-padding-in-images-stored-in-atlas-texture.patch deleted file mode 100644 index bf41506..0000000 --- a/0002-Support-padding-in-images-stored-in-atlas-texture.patch +++ /dev/null @@ -1,39 +0,0 @@ -From cf44ee7761f2e4175f9193b42ee7296a2f3b694a Mon Sep 17 00:00:00 2001 -From: Eskil Abrahamsen Blomfeldt -Date: Fri, 29 Aug 2014 15:40:52 +0200 -Subject: [PATCH 2/6] Support padding in images stored in atlas texture - -If the stride does not match the width of the image, we upload -it line-by-line instead of as one big rect. - -Change-Id: I5e08afcf5c35dc810fed25e45255d55d932b2a4c -Reviewed-by: Gunnar Sletta ---- - src/quick/scenegraph/util/qsgatlastexture.cpp | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp -index 782beca..53b3110 100644 ---- a/src/quick/scenegraph/util/qsgatlastexture.cpp -+++ b/src/quick/scenegraph/util/qsgatlastexture.cpp -@@ -319,7 +319,16 @@ void Atlas::uploadBgra(Texture *texture) - glTexSubImage2D(GL_TEXTURE_2D, 0, r.x() + iw + 1, r.y() + 1, 1, ih, m_externalFormat, GL_UNSIGNED_BYTE, dst); - - // Inner part of the image.... -- glTexSubImage2D(GL_TEXTURE_2D, 0, r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2, m_externalFormat, GL_UNSIGNED_BYTE, src); -+ if (bpl != iw) { -+ int sy = r.y() + 1; -+ int ey = sy + r.height() - 2; -+ for (int y = sy; y < ey; ++y) { -+ glTexSubImage2D(GL_TEXTURE_2D, 0, r.x() + 1, y, r.width() - 2, 1, m_externalFormat, GL_UNSIGNED_BYTE, src); -+ src += bpl; -+ } -+ } else { -+ glTexSubImage2D(GL_TEXTURE_2D, 0, r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2, m_externalFormat, GL_UNSIGNED_BYTE, src); -+ } - - } - --- -2.1.0 - diff --git a/0003-Fix-crashes-when-calling-Array.sort-with-imperfect-s.patch b/0003-Fix-crashes-when-calling-Array.sort-with-imperfect-s.patch deleted file mode 100644 index 374c4d4..0000000 --- a/0003-Fix-crashes-when-calling-Array.sort-with-imperfect-s.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 210475565969ca5381174016b47cd32ddc96eaed Mon Sep 17 00:00:00 2001 -From: Lars Knoll -Date: Thu, 12 Jun 2014 14:35:53 +0200 -Subject: [PATCH 3/6] Fix crashes when calling Array.sort with imperfect sort - functions - -We can't use std::sort to implement Array.sort. The reason is that -std::sort expects a conformant compare function, and can do weird -things (esp. crash) when the sort function isn't conformant. - -Falling back to qSort is not possible, as the method has been -deprecated. So add a copy of the qSort implementation here, and -use that one instead. - -Fix the sortint test in tst_qqmlecmascript to have a consistent -sort function for strings, as the result of calling sort is -otherwise undefined according to the ecma standard. - -Task-number: QTBUG-39072 -Change-Id: I0602b3aa1ffa4de5006da58396f166805cf4a5e2 -Reviewed-by: Robin Burchell -Reviewed-by: Simon Hausmann ---- - src/qml/jsruntime/qv4arraydata.cpp | 56 +++++++++++++++++++++- - tests/auto/qml/qjsengine/tst_qjsengine.cpp | 19 ++++++++ - .../auto/qml/qqmlecmascript/data/sequenceSort.qml | 2 +- - 3 files changed, 75 insertions(+), 2 deletions(-) - -diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp -index 7d76a10..9627848 100644 ---- a/src/qml/jsruntime/qv4arraydata.cpp -+++ b/src/qml/jsruntime/qv4arraydata.cpp -@@ -674,6 +674,60 @@ bool ArrayElementLessThan::operator()(Value v1, Value v2) const - return p1s->toQString() < p2s->toQString(); - } - -+template -+void sortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan) -+{ -+top: -+ int span = int(end - start); -+ if (span < 2) -+ return; -+ -+ --end; -+ RandomAccessIterator low = start, high = end - 1; -+ RandomAccessIterator pivot = start + span / 2; -+ -+ if (lessThan(*end, *start)) -+ qSwap(*end, *start); -+ if (span == 2) -+ return; -+ -+ if (lessThan(*pivot, *start)) -+ qSwap(*pivot, *start); -+ if (lessThan(*end, *pivot)) -+ qSwap(*end, *pivot); -+ if (span == 3) -+ return; -+ -+ qSwap(*pivot, *end); -+ -+ while (low < high) { -+ while (low < high && lessThan(*low, *end)) -+ ++low; -+ -+ while (high > low && lessThan(*end, *high)) -+ --high; -+ -+ if (low < high) { -+ qSwap(*low, *high); -+ ++low; -+ --high; -+ } else { -+ break; -+ } -+ } -+ -+ if (lessThan(*low, *end)) -+ ++low; -+ -+ qSwap(*end, *low); -+ sortHelper(start, low, t, lessThan); -+ -+ start = low + 1; -+ ++end; -+ goto top; -+} -+ -+ - void ArrayData::sort(ExecutionContext *context, ObjectRef thisObject, const ValueRef comparefn, uint len) - { - if (!len) -@@ -765,7 +819,7 @@ void ArrayData::sort(ExecutionContext *context, ObjectRef thisObject, const Valu - ArrayElementLessThan lessThan(context, thisObject, comparefn); - - Value *begin = thisObject->arrayData->data; -- std::sort(begin, begin + len, lessThan); -+ sortHelper(begin, begin + len, *begin, lessThan); - - #ifdef CHECK_SPARSE_ARRAYS - thisObject->initSparseArray(); -diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp -index 51cd699..4b47e55 100644 ---- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp -+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp -@@ -135,6 +135,7 @@ private slots: - void reentrancy_objectCreation(); - void jsIncDecNonObjectProperty(); - void JSONparse(); -+ void arraySort(); - - void qRegExpInport_data(); - void qRegExpInport(); -@@ -2729,6 +2730,24 @@ void tst_QJSEngine::JSONparse() - QVERIFY(ret.isObject()); - } - -+void tst_QJSEngine::arraySort() -+{ -+ // tests that calling Array.sort with a bad sort function doesn't cause issues -+ // Using std::sort is e.g. not safe when used with a bad sort function and causes -+ // crashes -+ QJSEngine eng; -+ eng.evaluate("function crashMe() {" -+ " var data = [];" -+ " for (var i = 0; i < 50; i++) {" -+ " data[i] = 'whatever';" -+ " }" -+ " data.sort(function(a, b) {" -+ " return -1;" -+ " });" -+ "}" -+ "crashMe();"); -+} -+ - static QRegExp minimal(QRegExp r) { r.setMinimal(true); return r; } - - void tst_QJSEngine::qRegExpInport_data() -diff --git a/tests/auto/qml/qqmlecmascript/data/sequenceSort.qml b/tests/auto/qml/qqmlecmascript/data/sequenceSort.qml -index 5e2892a..b130408 100644 ---- a/tests/auto/qml/qqmlecmascript/data/sequenceSort.qml -+++ b/tests/auto/qml/qqmlecmascript/data/sequenceSort.qml -@@ -23,7 +23,7 @@ Item { - } - - function compareStrings(a, b) { -- return (a < b) ? 1 : -1; -+ return (a == b) ? 0 : ((a < b) ? 1 : -1); - } - - function compareNumbers(a, b) { --- -2.1.0 - diff --git a/0004-QML-parse-.js-files-as-JavaScript-not-QML.patch b/0004-QML-parse-.js-files-as-JavaScript-not-QML.patch deleted file mode 100644 index 12e16e7..0000000 --- a/0004-QML-parse-.js-files-as-JavaScript-not-QML.patch +++ /dev/null @@ -1,94 +0,0 @@ -From f7c3035fa1d965dceb36892122683a5ceb6cab89 Mon Sep 17 00:00:00 2001 -From: Erik Verbruggen -Date: Thu, 28 Aug 2014 13:12:53 +0200 -Subject: [PATCH 4/6] QML: parse .js files as JavaScript, not QML. - -When importing a JS library into a QML file with the "import" keyword, -that JS file was parsed in QML mode, disallowing QML keywords like "as". - -Task-number: QTBUG-40143 -Change-Id: Ie98adceb27544732c2e96657d41170db36bff288 -Reviewed-by: Simon Hausmann ---- - src/qml/jsruntime/qv4script.cpp | 2 +- - .../qml/qqmlecmascript/data/importScriptsWithoutQmlMode.js | 7 +++++++ - .../qml/qqmlecmascript/data/importScriptsWithoutQmlMode.qml | 10 ++++++++++ - tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 11 +++++++++++ - 4 files changed, 29 insertions(+), 1 deletion(-) - create mode 100644 tests/auto/qml/qqmlecmascript/data/importScriptsWithoutQmlMode.js - create mode 100644 tests/auto/qml/qqmlecmascript/data/importScriptsWithoutQmlMode.qml - -diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp -index 36f61a1..4d6e069 100644 ---- a/src/qml/jsruntime/qv4script.cpp -+++ b/src/qml/jsruntime/qv4script.cpp -@@ -349,7 +349,7 @@ QV4::CompiledData::CompilationUnit *Script::precompile(IR::Module *module, Compi - - QQmlJS::Engine ee; - QQmlJS::Lexer lexer(&ee); -- lexer.setCode(source, /*line*/1, /*qml mode*/true); -+ lexer.setCode(source, /*line*/1, /*qml mode*/false); - QQmlJS::Parser parser(&ee); - - parser.parseProgram(); -diff --git a/tests/auto/qml/qqmlecmascript/data/importScriptsWithoutQmlMode.js b/tests/auto/qml/qqmlecmascript/data/importScriptsWithoutQmlMode.js -new file mode 100644 -index 0000000..aabcc9f ---- /dev/null -+++ b/tests/auto/qml/qqmlecmascript/data/importScriptsWithoutQmlMode.js -@@ -0,0 +1,7 @@ -+.pragma library -+ -+var as = undefined -+function isLegal() { -+ var as = true; -+ return as; -+} -diff --git a/tests/auto/qml/qqmlecmascript/data/importScriptsWithoutQmlMode.qml b/tests/auto/qml/qqmlecmascript/data/importScriptsWithoutQmlMode.qml -new file mode 100644 -index 0000000..17d1219 ---- /dev/null -+++ b/tests/auto/qml/qqmlecmascript/data/importScriptsWithoutQmlMode.qml -@@ -0,0 +1,10 @@ -+import QtQuick 2.0 -+ -+import "importScriptsWithoutQmlMode.js" as Export -+ -+Rectangle { -+ id: root -+ property bool success: false -+ -+ Component.onCompleted: success = Export.isLegal() -+} -diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp -index 34413b2..7e9adea 100644 ---- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp -+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp -@@ -321,6 +321,7 @@ private slots: - void lazyBindingEvaluation(); - void varPropertyAccessOnObjectWithInvalidContext(); - void importedScriptsAccessOnObjectWithInvalidContext(); -+ void importedScriptsWithoutQmlMode(); - void contextObjectOnLazyBindings(); - void garbageCollectionDuringCreation(); - -@@ -7609,6 +7610,16 @@ void tst_qqmlecmascript::importedScriptsAccessOnObjectWithInvalidContext() - QTRY_VERIFY(obj->property("success") == true); - } - -+void tst_qqmlecmascript::importedScriptsWithoutQmlMode() -+{ -+ QQmlComponent component(&engine, testFileUrl("importScriptsWithoutQmlMode.qml")); -+ QScopedPointer obj(component.create()); -+ if (obj.isNull()) -+ qDebug() << component.errors().first().toString(); -+ QVERIFY(!obj.isNull()); -+ QTRY_VERIFY(obj->property("success") == true); -+} -+ - void tst_qqmlecmascript::contextObjectOnLazyBindings() - { - QQmlComponent component(&engine, testFileUrl("contextObjectOnLazyBindings.qml")); --- -2.1.0 - diff --git a/0005-Fix-crash-with-foreach-on-arguments-object.patch b/0005-Fix-crash-with-foreach-on-arguments-object.patch deleted file mode 100644 index e31e192..0000000 --- a/0005-Fix-crash-with-foreach-on-arguments-object.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 4d07bf91ed2d36aee9178ef48508c16277fbb318 Mon Sep 17 00:00:00 2001 -From: Simon Hausmann -Date: Thu, 21 Aug 2014 16:24:54 +0200 -Subject: [PATCH 5/6] Fix crash with foreach on arguments object - -We call fullyCreate() on the arguments object when it's initialized -on an foreach iterator. That itself however might trigger an allocation, -which in turn might collect the ForEachIteratorObject, which is missing -a "ProtectThis" in its constructor. - -Change-Id: Ib8f7e39201e727cde91cbbe8a82cba78aa980f0d -Task-number: QTBUG-40844 -Reviewed-by: Albert Astals Cid -Reviewed-by: Lars Knoll ---- - src/qml/jsruntime/qv4objectiterator.cpp | 40 +++++++++++++++++++++++++-------- - src/qml/jsruntime/qv4objectiterator_p.h | 11 ++++----- - 2 files changed, 37 insertions(+), 14 deletions(-) - -diff --git a/src/qml/jsruntime/qv4objectiterator.cpp b/src/qml/jsruntime/qv4objectiterator.cpp -index e5f693c..0efd304 100644 ---- a/src/qml/jsruntime/qv4objectiterator.cpp -+++ b/src/qml/jsruntime/qv4objectiterator.cpp -@@ -54,13 +54,7 @@ ObjectIterator::ObjectIterator(Value *scratch1, Value *scratch2, const ObjectRef - , memberIndex(0) - , flags(flags) - { -- object = o.getPointer(); -- current = o.getPointer(); -- -- if (!!object && object->asArgumentsObject()) { -- Scope scope(object->engine()); -- Scoped (scope, object->asReturnedValue())->fullyCreate(); -- } -+ init(o); - } - - ObjectIterator::ObjectIterator(Scope &scope, const ObjectRef o, uint flags) -@@ -71,8 +65,26 @@ ObjectIterator::ObjectIterator(Scope &scope, const ObjectRef o, uint flags) - , memberIndex(0) - , flags(flags) - { -- object = o; -- current = o; -+ init(o); -+} -+ -+ObjectIterator::ObjectIterator(Value *scratch1, Value *scratch2, uint flags) -+ : object(ObjectRef::fromValuePointer(scratch1)) -+ , current(ObjectRef::fromValuePointer(scratch2)) -+ , arrayNode(0) -+ , arrayIndex(0) -+ , memberIndex(0) -+ , flags(flags) -+{ -+ object = (Object*)0; -+ current = (Object*)0; -+ // Caller needs to call init! -+} -+ -+void ObjectIterator::init(const ObjectRef o) -+{ -+ object = o.getPointer(); -+ current = o.getPointer(); - - if (!!object && object->asArgumentsObject()) { - Scope scope(object->engine()); -@@ -194,6 +206,16 @@ ReturnedValue ObjectIterator::nextPropertyNameAsString() - - DEFINE_OBJECT_VTABLE(ForEachIteratorObject); - -+ForEachIteratorObject::ForEachIteratorObject(ExecutionContext *ctx, const ObjectRef o) -+ : Object(ctx->engine), it(workArea, workArea + 1, ObjectIterator::EnumerableOnly|ObjectIterator::WithProtoChain) -+{ -+ Scope scope(ctx); -+ ScopedObject protectThis(scope, this); -+ -+ setVTable(staticVTable()); -+ it.init(o); -+} -+ - void ForEachIteratorObject::markObjects(Managed *that, ExecutionEngine *e) - { - ForEachIteratorObject *o = static_cast(that); -diff --git a/src/qml/jsruntime/qv4objectiterator_p.h b/src/qml/jsruntime/qv4objectiterator_p.h -index c87f284..5ead1f5 100644 ---- a/src/qml/jsruntime/qv4objectiterator_p.h -+++ b/src/qml/jsruntime/qv4objectiterator_p.h -@@ -58,6 +58,7 @@ struct ExecutionContext; - struct Property; - struct String; - struct InternalClass; -+struct ForEachIteratorObject; - - struct Q_QML_EXPORT ObjectIterator - { -@@ -76,21 +77,21 @@ struct Q_QML_EXPORT ObjectIterator - - ObjectIterator(Value *scratch1, Value *scratch2, const ObjectRef o, uint flags); - ObjectIterator(Scope &scope, const ObjectRef o, uint flags); -+ void init(const ObjectRef o); - void next(StringRef name, uint *index, Property *pd, PropertyAttributes *attributes = 0); - ReturnedValue nextPropertyName(ValueRef value); - ReturnedValue nextPropertyNameAsString(ValueRef value); - ReturnedValue nextPropertyNameAsString(); -+private: -+ friend struct ForEachIteratorObject; -+ ObjectIterator(Value *scratch1, Value *scratch2, uint flags); // Constructor that requires calling init() - }; - - struct ForEachIteratorObject: Object { - V4_OBJECT - Q_MANAGED_TYPE(ForeachIteratorObject) - ObjectIterator it; -- ForEachIteratorObject(ExecutionContext *ctx, const ObjectRef o) -- : Object(ctx->engine), it(workArea, workArea + 1, -- o, ObjectIterator::EnumerableOnly|ObjectIterator::WithProtoChain) { -- setVTable(staticVTable()); -- } -+ ForEachIteratorObject(ExecutionContext *ctx, const ObjectRef o); - - ReturnedValue nextPropertyName() { return it.nextPropertyNameAsString(); } - --- -2.1.0 - diff --git a/0006-Move-syncTimer-measurment-to-the-correct-place.patch b/0006-Move-syncTimer-measurment-to-the-correct-place.patch deleted file mode 100644 index a07288d..0000000 --- a/0006-Move-syncTimer-measurment-to-the-correct-place.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 5a9f0131f8c0b7424a4d323b0f65237206be45ea Mon Sep 17 00:00:00 2001 -From: Josh Arenson -Date: Mon, 4 Aug 2014 09:42:27 -0700 -Subject: [PATCH 6/6] Move syncTimer measurment to the correct place. - -syncTimer was including the time spent waiting for VSYNC on unchanged -frames. This was causing the reported value to be much higher than expected. - -Task-number: QTBUG-40556 -Change-Id: Ife759b4e27faf2124ab330be8d1f42d15c4d2d33 -Reviewed-by: Gunnar Sletta ---- - src/quick/scenegraph/qsgthreadedrenderloop.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp -index c17eb91..1cfc689 100644 ---- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp -+++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp -@@ -586,6 +586,10 @@ void QSGRenderThread::syncAndRender() - QSG_RT_DEBUG(" - update pending, doing sync"); - sync(); - } -+#ifndef QSG_NO_RENDER_TIMING -+ if (profileFrames) -+ syncTime = threadTimer.nsecsElapsed(); -+#endif - - if (!syncResultedInChanges && !(repaintRequested)) { - QSG_RT_DEBUG(" - no changes, rendering aborted"); -@@ -595,10 +599,6 @@ void QSGRenderThread::syncAndRender() - return; - } - --#ifndef QSG_NO_RENDER_TIMING -- if (profileFrames) -- syncTime = threadTimer.nsecsElapsed(); --#endif - QSG_RT_DEBUG(" - rendering starting"); - - QQuickWindowPrivate *d = QQuickWindowPrivate::get(window); --- -2.1.0 - diff --git a/libqt5-qtdeclarative.changes b/libqt5-qtdeclarative.changes index 325a4f8..2752758 100644 --- a/libqt5-qtdeclarative.changes +++ b/libqt5-qtdeclarative.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Wed Dec 10 11:00:06 UTC 2014 - hrvoje.senjan@gmail.com + +- Update to 5.4 Final + * For more details please see: + http://blog.qt.digia.com/blog/2014/12/10/qt-5-4-released/ + and http://qt-project.org/wiki/New-Features-in-Qt-5.4 + +------------------------------------------------------------------- +Thu Nov 27 15:58:41 UTC 2014 - hrvoje.senjan@gmail.com + +- Update to 5.4 RC + * For more details please see: + http://blog.qt.digia.com/blog/2014/11/27/qt-5-4-release-candidate-available/ + and http://qt-project.org/wiki/New-Features-in-Qt-5.4 +- Drop patches merged upstream: + 0005-Fix-crash-with-foreach-on-arguments-object.patch + 0004-QML-parse-.js-files-as-JavaScript-not-QML.patch + 0006-Move-syncTimer-measurment-to-the-correct-place.patch + 0003-Fix-crashes-when-calling-Array.sort-with-imperfect-s.patch + 0001-Fix-crash-with-cleanup-of-animators.patch + 0002-Support-padding-in-images-stored-in-atlas-texture.patch + ------------------------------------------------------------------- Mon Sep 22 18:11:03 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/libqt5-qtdeclarative.spec b/libqt5-qtdeclarative.spec index 435bd86..59d5ab0 100644 --- a/libqt5-qtdeclarative.spec +++ b/libqt5-qtdeclarative.spec @@ -21,25 +21,18 @@ %define libname libQtQuick5 Name: libqt5-qtdeclarative -Version: 5.3.2 +Version: 5.4.0 Release: 0 Summary: Qt 5 Declarative Library License: SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0 Group: Development/Libraries/X11 Url: http://qt.digia.com %define base_name libqt5 -%define real_version 5.3.2 -%define so_version 5.3.2 +%define real_version 5.4.0 +%define so_version 5.4.0 %define tar_version qtdeclarative-opensource-src-%{real_version} Source: %{tar_version}.tar.xz Source1: baselibs.conf -# PATCHES FROM UPSTREAM 5.3 branch -Patch0: 0001-Fix-crash-with-cleanup-of-animators.patch -Patch1: 0002-Support-padding-in-images-stored-in-atlas-texture.patch -Patch2: 0003-Fix-crashes-when-calling-Array.sort-with-imperfect-s.patch -Patch3: 0004-QML-parse-.js-files-as-JavaScript-not-QML.patch -Patch4: 0005-Fix-crash-with-foreach-on-arguments-object.patch -Patch5: 0006-Move-syncTimer-measurment-to-the-correct-place.patch # PATCH-FIX-OPENSUSE sse2_nojit.patch -- enable JIT and sse2 only on sse2 case Patch100: sse2_nojit.patch BuildRequires: fdupes @@ -71,12 +64,6 @@ handling. %prep %setup -q -n qtdeclarative-opensource-src-%{real_version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 %patch100 -p1 %package -n %libname @@ -200,7 +187,7 @@ popd %files -n %libname %defattr(-,root,root,755) -%doc LGPL_EXCEPTION.txt LICENSE.FDL LICENSE.GPL LICENSE.LGPL +%doc LGPL_EXCEPTION.txt LICENSE.* %{_libqt5_libdir}/libQt5Q*.so.* %ifarch %ix86 %{_libqt5_libdir}/sse2/libQt5Q*.so.* @@ -208,29 +195,29 @@ popd %{_libqt5_archdatadir}/qml/QtQuick %{_libqt5_archdatadir}/qml/QtQuick.2 %{_libqt5_archdatadir}/qml/QtQml/Models.2 +%{_libqt5_archdatadir}/qml/QtQml/StateMachine/ %dir %{_libqt5_archdatadir}/qml %dir %{_libqt5_archdatadir}/qml/Qt %dir %{_libqt5_archdatadir}/qml/Qt/labs %dir %{_libqt5_archdatadir}/qml/QtQml %{_libqt5_archdatadir}/qml/Qt/labs/folderlistmodel %{_libqt5_archdatadir}/qml/Qt/labs/settings/ -%{_libqt5_plugindir}/accessible %{_libqt5_plugindir}/qmltooling %files private-headers-devel %defattr(-,root,root,755) -%doc LGPL_EXCEPTION.txt LICENSE.FDL LICENSE.GPL LICENSE.LGPL +%doc LGPL_EXCEPTION.txt LICENSE.* %{_libqt5_includedir}/Qt*/%{so_version} %files tools %defattr(-,root,root,755) -%doc LGPL_EXCEPTION.txt LICENSE.FDL LICENSE.GPL LICENSE.LGPL +%doc LGPL_EXCEPTION.txt LICENSE.* %{_bindir}/* %{_libqt5_bindir}/* %files devel %defattr(-,root,root,755) -%doc LGPL_EXCEPTION.txt LICENSE.FDL LICENSE.GPL LICENSE.LGPL +%doc LGPL_EXCEPTION.txt LICENSE.* %exclude %{_libqt5_includedir}/Qt*/%{so_version} %{_libqt5_includedir}/Qt* %{_libqt5_libdir}/cmake/Qt5* @@ -244,7 +231,7 @@ popd %files examples %defattr(-,root,root,755) -%doc LGPL_EXCEPTION.txt LICENSE.FDL LICENSE.GPL LICENSE.LGPL +%doc LGPL_EXCEPTION.txt LICENSE.* %{_libqt5_examplesdir}/ %changelog diff --git a/qtdeclarative-opensource-src-5.3.2.tar.xz b/qtdeclarative-opensource-src-5.3.2.tar.xz deleted file mode 100644 index 688fb85..0000000 --- a/qtdeclarative-opensource-src-5.3.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:04108193b9642c0394c157e98b5c1d81f555f9f495289e07ebfb6f03448b2382 -size 18171760 diff --git a/qtdeclarative-opensource-src-5.4.0.tar.xz b/qtdeclarative-opensource-src-5.4.0.tar.xz new file mode 100644 index 0000000..c294780 --- /dev/null +++ b/qtdeclarative-opensource-src-5.4.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e67c9275b0f6869a7c1e8023ad7c0a23fb19f8a8d2f350371e954ead0cfad7b6 +size 18401844 diff --git a/sse2_nojit.patch b/sse2_nojit.patch index 3afbee5..0242ae3 100644 --- a/sse2_nojit.patch +++ b/sse2_nojit.patch @@ -1,26 +1,13 @@ -diff --git a/src/qml/jsruntime/jsruntime.pri b/src/qml/jsruntime/jsruntime.pri -index 72010d3..2bd5acb 100644 ---- a/src/qml/jsruntime/jsruntime.pri -+++ b/src/qml/jsruntime/jsruntime.pri -@@ -107,7 +107,7 @@ SOURCES += \ - - # Use SSE2 floating point math on 32 bit instead of the default - # 387 to make test results pass on 32 and on 64 bit builds. --linux-g++*:isEqual(QT_ARCH,i386) { -+linux-g++*:isEqual(QT_ARCH,i386):!no_sse2 { - QMAKE_CFLAGS += -march=pentium4 -msse2 -mfpmath=sse - QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse - } diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h index a00231c..2a8f5d3 100644 --- a/src/qml/jsruntime/qv4global_p.h +++ b/src/qml/jsruntime/qv4global_p.h -@@ -75,7 +75,7 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); } +@@ -85,7 +85,7 @@ inline double trunc(double d) { return d - // White list architectures - --#if defined(Q_PROCESSOR_X86) -+#if defined(Q_PROCESSOR_X86) && defined(__SSE2__) - #define V4_ENABLE_JIT - #elif defined(Q_PROCESSOR_X86_64) - #define V4_ENABLE_JIT + // Black list some platforms + #if defined(V4_ENABLE_JIT) +-#if defined(Q_OS_IOS) || defined(Q_OS_WINRT) ++#if defined(Q_OS_IOS) || defined(Q_OS_WINRT) || (defined(Q_PROCESSOR_X86) && !defined(__SSE2__)) + # undef V4_ENABLE_JIT + #endif + #endif