From 439f31f128e70ecae16544ee7041695c60e0b2d6 Mon Sep 17 00:00:00 2001 From: Fabian Bumberger Date: Thu, 12 Dec 2013 14:12:25 +0100 Subject: Dont call updatePolish if an item is not visible [ChangeLog][QtQuick][QQuickItem] "updatePolish" is not called for invisible items any more. Task-number: QTBUG-31830 Change-Id: Idad6107afaf0c6e6c96d9404ac286695c21883c7 Reviewed-by: Robin Burchell Reviewed-by: Gunnar Sletta --- tests/auto/quick/qquickcanvasitem/data/CanvasTestCase.qml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/auto/quick/qquickcanvasitem/data/CanvasTestCase.qml') diff --git a/tests/auto/quick/qquickcanvasitem/data/CanvasTestCase.qml b/tests/auto/quick/qquickcanvasitem/data/CanvasTestCase.qml index bc11d349fa..c658f35d1f 100644 --- a/tests/auto/quick/qquickcanvasitem/data/CanvasTestCase.qml +++ b/tests/auto/quick/qquickcanvasitem/data/CanvasTestCase.qml @@ -1,5 +1,6 @@ import QtQuick 2.0 import QtTest 1.0 +import QtQuick.Window 2.1 TestCase { id:testCase @@ -10,10 +11,16 @@ TestCase { function cleanupTestCase() { wait(100) //wait for a short while to make sure no leaked textures } + Window { + id: win + visible: true + } + function testData(type) { if (type === "2d") return [ { tag:"image threaded", properties:{width:100, height:100, renderTarget:Canvas.Image, renderStrategy:Canvas.Threaded}}, + { tag:"image canvas invisible", properties:{visible: false, 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}}, @@ -24,7 +31,7 @@ TestCase { } function createCanvasObject(data) { - return component.createObject(testCase, data.properties); + return component.createObject(win, data.properties); } function comparePixel(ctx,x,y,r,g,b,a, d) -- cgit v1.2.3