aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
diff options
context:
space:
mode:
authorMichael Brasser <mbrasser@ford.com>2016-03-21 21:31:03 -0500
committerMichael Brasser <michael.brasser@live.com>2016-05-06 18:25:43 +0000
commit69b7ba225007d68e113ee425ad58ce7e186a92c2 (patch)
tree72d4723b85085d901c785ae933294c83c6119ccf /tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
parent8997e00269d8748a366d84d234dba555fc9548ce (diff)
Introduce BorderImageMesh.
BorderImageMesh provides an optimized way to use BorderImage-type images with ShaderEffect. [ChangeLog][QtQuick][ShaderEffect] Add new mesh type BorderImageMesh. BorderImageMesh provides an optimized way to use BorderImage-type images with ShaderEffect. Change-Id: I73bdc8318a0facba6edc2634b5f4614996b39c1b Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp')
-rw-r--r--tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp b/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
index c11ae1e8c9..e1435e739f 100644
--- a/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
+++ b/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
@@ -44,6 +44,7 @@
#include "../../shared/testhttpserver.h"
#include "../../shared/util.h"
+#include "../shared/visualtestutil.h"
Q_DECLARE_METATYPE(QQuickImageBase::Status)
@@ -75,6 +76,7 @@ private slots:
void statusChanges_data();
void sourceSizeChanges();
void progressAndStatusChanges();
+ void borderImageMesh();
private:
QQmlEngine engine;
@@ -575,6 +577,21 @@ void tst_qquickborderimage::progressAndStatusChanges()
delete obj;
}
+void tst_qquickborderimage::borderImageMesh()
+{
+ QQuickView *window = new QQuickView;
+
+ window->setSource(testFileUrl("nonmesh.qml"));
+ window->show();
+ QTest::qWaitForWindowExposed(window);
+ QImage nonmesh = window->grabWindow();
+
+ window->setSource(testFileUrl("mesh.qml"));
+ QImage mesh = window->grabWindow();
+
+ QVERIFY(QQuickVisualTestUtil::compareImages(mesh, nonmesh));
+}
+
QTEST_MAIN(tst_qquickborderimage)
#include "tst_qquickborderimage.moc"