aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-14 11:35:11 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-14 11:35:30 +0200
commit809b5e2fc1cc5935c2dd7d63992c7a94dfce4dd8 (patch)
treec0f08d106a16f12a89e13550d58d424d0f9cba6a
parentdc4e537d4cfe16aaa88b6edd911571317241ab32 (diff)
parentda7df10b3d5769d1da7851895d27257a0d930012 (diff)
Merge remote-tracking branch 'origin/5.3' into 5.4
-rw-r--r--src/qml/jit/qv4assembler_p.h5
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp12
-rw-r--r--tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp5
-rw-r--r--tests/benchmarks/particles/affectors/affectors.pro2
-rw-r--r--tests/benchmarks/particles/emission/emission.pro2
-rw-r--r--tests/benchmarks/qml/compilation/tst_compilation.cpp31
-rw-r--r--tests/benchmarks/qml/js/js.pro2
-rw-r--r--tests/benchmarks/qml/qml.pro3
8 files changed, 20 insertions, 42 deletions
diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h
index 32f709c5d2..5e868c3b11 100644
--- a/src/qml/jit/qv4assembler_p.h
+++ b/src/qml/jit/qv4assembler_p.h
@@ -225,11 +225,10 @@ public:
return frameSize;
}
+ /// \return the stack frame size in number of Value items.
int calculateJSStackFrameSize() const
{
- const int locals = (localCount + sizeof(QV4::CallData)/sizeof(QV4::Value) - 1 + maxOutgoingArgumentCount) + 1;
- int frameSize = locals * sizeof(QV4::Value);
- return frameSize;
+ return (localCount + sizeof(QV4::CallData)/sizeof(QV4::Value) - 1 + maxOutgoingArgumentCount) + 1;
}
Address stackSlotPointer(int idx) const
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index 1a0d6287aa..a3644c313b 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -70,6 +70,9 @@
#include <private/qv4objectproto_p.h>
#include <private/qv4scopedvalue_p.h>
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
+
#include <QtCore/QRunnable>
#if defined(Q_OS_QNX) || defined(Q_OS_ANDROID)
@@ -2119,7 +2122,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_fillRect(QV4::CallContext
}
/*!
- \qmlmethod object QtQuick::Context2D::fillRect(real x, real y, real w, real h)
+ \qmlmethod object QtQuick::Context2D::strokeRect(real x, real y, real w, real h)
Stroke the specified rectangle's path using the strokeStyle, lineWidth, lineJoin,
and (if appropriate) miterLimit attributes.
@@ -4109,6 +4112,13 @@ void QQuickContext2D::init(QQuickCanvasItem *canvasItem, const QVariantMap &args
}
#endif
+ // Disable threaded background rendering if the platform has issues with it
+ if (m_renderTarget == QQuickCanvasItem::FramebufferObject
+ && m_renderStrategy == QQuickCanvasItem::Threaded
+ && !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)) {
+ m_renderTarget = QQuickCanvasItem::Image;
+ }
+
switch (m_renderTarget) {
case QQuickCanvasItem::Image:
m_texture = new QQuickContext2DImageTexture;
diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
index f8fc4c10da..00aa1dbe10 100644
--- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
@@ -2389,10 +2389,9 @@ void tst_qquicktextedit::positionAt()
break;
}
- qreal xoff;
+ qreal xoff = 0;
switch (horizontalAlignment) {
case QQuickTextEdit::AlignLeft:
- xoff = 0;
break;
case QQuickTextEdit::AlignHCenter:
xoff = (texteditObject->width() - secondLine.naturalTextWidth()) / 2;
@@ -2400,7 +2399,7 @@ void tst_qquicktextedit::positionAt()
case QQuickTextEdit::AlignRight:
xoff = texteditObject->width() - secondLine.naturalTextWidth();
break;
- case QQuickTextEdit::AlignJustify:
+ default:
break;
}
int pos = texteditObject->positionAt(texteditObject->width()/2, y0);
diff --git a/tests/benchmarks/particles/affectors/affectors.pro b/tests/benchmarks/particles/affectors/affectors.pro
index 51d65d7243..112c4ea3ec 100644
--- a/tests/benchmarks/particles/affectors/affectors.pro
+++ b/tests/benchmarks/particles/affectors/affectors.pro
@@ -7,5 +7,5 @@ testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
-QT += core-private gui-private qml-private quick-private opengl-private testlib
+QT += quickparticles-private testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/benchmarks/particles/emission/emission.pro b/tests/benchmarks/particles/emission/emission.pro
index f4445f7d8a..0ebd75b738 100644
--- a/tests/benchmarks/particles/emission/emission.pro
+++ b/tests/benchmarks/particles/emission/emission.pro
@@ -7,5 +7,5 @@ testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
-QT += core-private gui-private qml-private quick-private opengl-private testlib
+QT += quickparticles-private testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/benchmarks/qml/compilation/tst_compilation.cpp b/tests/benchmarks/qml/compilation/tst_compilation.cpp
index eac3dcc2dd..5c9017a3c8 100644
--- a/tests/benchmarks/qml/compilation/tst_compilation.cpp
+++ b/tests/benchmarks/qml/compilation/tst_compilation.cpp
@@ -47,7 +47,6 @@
#include <QtQml/private/qqmljsmemorypool_p.h>
#include <QtQml/private/qqmljsparser_p.h>
#include <QtQml/private/qqmljslexer_p.h>
-#include <QtQml/private/qqmlscript_p.h>
#include <QFile>
#include <QDebug>
@@ -65,9 +64,6 @@ private slots:
void jsparser_data();
void jsparser();
- void scriptparser_data();
- void scriptparser();
-
private:
QQmlEngine engine;
};
@@ -130,33 +126,6 @@ void tst_compilation::jsparser()
}
}
-void tst_compilation::scriptparser_data()
-{
- QTest::addColumn<QString>("file");
-
- QTest::newRow("boomblock") << QString(SRCDIR + QLatin1String("/data/BoomBlock.qml"));
-}
-
-void tst_compilation::scriptparser()
-{
- QFETCH(QString, file);
-
- QFile f(file);
- QVERIFY(f.open(QIODevice::ReadOnly));
- QByteArray data = f.readAll();
-
- //TODO(pvarga): check preparseData
- QByteArray preparseData;
- QUrl url = QUrl::fromLocalFile(file);
- QString urlString = url.toString();
-
- QBENCHMARK {
- QQmlScript::Parser parser;
- parser.parse(data, preparseData, url, urlString);
- parser.tree();
- }
-}
-
QTEST_MAIN(tst_compilation)
#include "tst_compilation.moc"
diff --git a/tests/benchmarks/qml/js/js.pro b/tests/benchmarks/qml/js/js.pro
index b1448d8eb8..7711e7130d 100644
--- a/tests/benchmarks/qml/js/js.pro
+++ b/tests/benchmarks/qml/js/js.pro
@@ -1,7 +1,7 @@
TEMPLATE = subdirs
SUBDIRS = \
qjsengine \
- qjsvalue \
+# qjsvalue \ ### FIXME: doesn't build
qjsvalueiterator \
TRUSTED_BENCHMARKS += \
diff --git a/tests/benchmarks/qml/qml.pro b/tests/benchmarks/qml/qml.pro
index c50f57b655..9c7583cd3b 100644
--- a/tests/benchmarks/qml/qml.pro
+++ b/tests/benchmarks/qml/qml.pro
@@ -3,13 +3,14 @@ TEMPLATE = subdirs
SUBDIRS += \
binding \
creation \
+ compilation \
javascript \
holistic \
pointers \
qqmlcomponent \
qqmlimage \
qqmlmetaproperty \
- script \
+# script \ ### FIXME: doesn't build
qmltime \
js \
qquickwindow