aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickcanvasitem
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickcanvasitem')
-rw-r--r--tests/auto/quick/qquickcanvasitem/data/CanvasTestCase.qml15
-rw-r--r--tests/auto/quick/qquickcanvasitem/data/tst_image.qml4
-rw-r--r--tests/auto/quick/qquickcanvasitem/data/tst_svgpath.qml9
3 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/quick/qquickcanvasitem/data/CanvasTestCase.qml b/tests/auto/quick/qquickcanvasitem/data/CanvasTestCase.qml
index 4aae317a7a..bc11d349fa 100644
--- a/tests/auto/quick/qquickcanvasitem/data/CanvasTestCase.qml
+++ b/tests/auto/quick/qquickcanvasitem/data/CanvasTestCase.qml
@@ -13,13 +13,12 @@ TestCase {
function testData(type) {
if (type === "2d")
return [
- { tag:"image threaded", properties:{width:100, height:100, renderTarget:Canvas.Image, renderStrategy:Canvas.Threaded}}
- //TODO: Enable the followings later
- //{ tag:"image cooperative", properties:{width:100, height:100, renderTarget:Canvas.Image, renderStrategy:Canvas.Cooperative}},
- //{ tag:"image immediate", properties:{width:100, height:100, renderTarget:Canvas.Image, renderStrategy:Canvas.Immediate}},
- //{ tag:"fbo cooperative", properties:{width:100, height:100, renderTarget:Canvas.FramebufferObject, renderStrategy:Canvas.Cooperative}},
- //{ tag:"fbo immediate", properties:{width:100, height:100, renderTarget:Canvas.FramebufferObject, renderStrategy:Canvas.Immediate}},
- //{ tag:"fbo threaded", properties:{width:100, height:100, renderTarget:Canvas.FramebufferObject, renderStrategy:Canvas.Threaded}}
+ { tag:"image threaded", properties:{width:100, height:100, renderTarget:Canvas.Image, renderStrategy:Canvas.Threaded}},
+// { tag:"image cooperative", properties:{width:100, height:100, renderTarget:Canvas.Image, renderStrategy:Canvas.Cooperative}},
+ { tag:"image immediate", properties:{width:100, height:100, renderTarget:Canvas.Image, renderStrategy:Canvas.Immediate}},
+// { tag:"fbo cooperative", properties:{width:100, height:100, renderTarget:Canvas.FramebufferObject, renderStrategy:Canvas.Cooperative}},
+// { tag:"fbo immediate", properties:{width:100, height:100, renderTarget:Canvas.FramebufferObject, renderStrategy:Canvas.Immediate}},
+// { tag:"fbo threaded", properties:{width:100, height:100, renderTarget:Canvas.FramebufferObject, renderStrategy:Canvas.Threaded}}
];
return [];
}
@@ -43,4 +42,4 @@ TestCase {
qtest_fail('Pixel compare fail:\nactual :[' + c[0]+','+c[1]+','+c[2]+','+c[3] + ']\nexpected:['+r+','+g+','+b+','+a+'] +/- '+d, 1);
}
-} \ No newline at end of file
+}
diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_image.qml b/tests/auto/quick/qquickcanvasitem/data/tst_image.qml
index 71931acae8..72b6dcdb00 100644
--- a/tests/auto/quick/qquickcanvasitem/data/tst_image.qml
+++ b/tests/auto/quick/qquickcanvasitem/data/tst_image.qml
@@ -653,7 +653,7 @@ CanvasTestCase {
var ctx = canvas.getContext('2d');
loadImages(canvas);
- var canvas2 = Qt.createQmlObject("import QtQuick 2.0; Canvas{renderTarget:Canvas.Image}", canvas);
+ var canvas2 = Qt.createQmlObject("import QtQuick 2.0; Canvas{renderTarget:Canvas.Image; renderStrategy:Canvas.Immediate}", canvas);
canvas2.width = 100;
canvas2.height = 50;
var ctx2 = canvas2.getContext('2d');
@@ -704,4 +704,4 @@ CanvasTestCase {
comparePixel(ctx, 25,25, 255,0,0,255, 2);
comparePixel(ctx, 75,25, 255,0,0,255, 2);
}
-} \ No newline at end of file
+}
diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_svgpath.qml b/tests/auto/quick/qquickcanvasitem/data/tst_svgpath.qml
index 2966811021..2b39357bed 100644
--- a/tests/auto/quick/qquickcanvasitem/data/tst_svgpath.qml
+++ b/tests/auto/quick/qquickcanvasitem/data/tst_svgpath.qml
@@ -23,16 +23,16 @@ CanvasTestCase {
];
var blues = [
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 0, 0, 0, 0, 0, 1,
+ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 0, 0, 0, 0, 0, 0,-1, 1,
1, 1, 1, 0, 0, 0, 0, 0, 1, 1,
1, 1, 1, 0, 0, 0, 0, 0, 1, 1,
1, 1, 1, 0, 0, 0, 0, 0, 1, 0,
- 1, 1, 1, 0, 0, 1, 1, 1, 0, 0,
+ 1, 1, 1, 0,-1, 1, 1, 1, 0, 0,
1, 1, 0, 1, 1, 1, 1, 1, 0, 0,
1, 0, 0, 1, 1, 1, 1, 1, 0, 0,
1, 0, 0, 1, 1, 1, 1, 1, 0, 0,
- 1, 0, 0, 0, 1, 1, 1, 0, 0, 0
+ -1, 0, 0, 0, 1, 1, 1, 0, 0, 0
];
ctx.fillRule = Qt.OddEvenFill;
@@ -45,6 +45,7 @@ CanvasTestCase {
var x, y;
for (x=0; x < 10; x++) {
for (y=0; y < 10; y++) {
+ if (blues[y*10 +x] == -1) continue; //edge point, different render target may have different value
if (blues[y * 10 + x]) {
comparePixel(ctx, x * 5, y * 5, 0, 0, 255, 255);
} else {