From: Gunnar Sletta Date: Tue, 26 Feb 2013 12:35:46 +0000 (+0100) Subject: Change Canvas to use Image and antialiasing by default. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=98e00abc19ad46072f7c8303e50f9748d36a925e;p=konrad%2Fqtdeclarative.git Change Canvas to use Image and antialiasing by default. Change-Id: I3033cba7c2f9e1dd9886e8f92ece1a2f43f60c01 Reviewed-by: Jens Bache-Wiig --- diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 7c91193..ea49d58 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -190,9 +190,10 @@ QQuickCanvasItemPrivate::QQuickCanvasItemPrivate() , hasCanvasWindow(false) , available(false) , contextInitialized(false) - , renderTarget(QQuickCanvasItem::FramebufferObject) + , renderTarget(QQuickCanvasItem::Image) , renderStrategy(QQuickCanvasItem::Cooperative) { + antialiasing = true; } QQuickCanvasItemPrivate::~QQuickCanvasItemPrivate() diff --git a/tests/auto/quick/qquickcanvasitem/data/CanvasComponent.qml b/tests/auto/quick/qquickcanvasitem/data/CanvasComponent.qml index b9e8d75..000888a 100644 --- a/tests/auto/quick/qquickcanvasitem/data/CanvasComponent.qml +++ b/tests/auto/quick/qquickcanvasitem/data/CanvasComponent.qml @@ -5,6 +5,7 @@ Component { id:canvas Canvas { id:c + antialiasing: false; width:100;height:100 onPaint :{} //this line is needed for some tests (make sure onPaint handler always called property alias paintCount:spyPaint.count @@ -27,4 +28,4 @@ Component { SignalSpy {id: spyImageLoaded;target:c;signalName: "imageLoaded"} SignalSpy {id: spyAvailableChanged;target:c;signalName: "availableChanged"} } -} \ No newline at end of file +}