diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2012-07-18 13:53:40 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-28 01:51:19 +0200 |
commit | 3912bbaceab166eb116447311eb16453e4f26edf (patch) | |
tree | b44561b4fbded41d7011e79c3d9a5411a1de438c /src/quick/items | |
parent | c2f2ae8ce90e621cc3835428c40c116fbdc593e6 (diff) |
Update usage of smooth and antialiasing.
Change-Id: Icc8b28bdd466389ed3f269f076f1bdb6e9abe3f2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'src/quick/items')
-rw-r--r-- | src/quick/items/qquickborderimage.cpp | 20 | ||||
-rw-r--r-- | src/quick/items/qquickimage.cpp | 17 | ||||
-rw-r--r-- | src/quick/items/qquickshadereffectmesh.cpp | 1 | ||||
-rw-r--r-- | src/quick/items/qquickshadereffectsource.cpp | 5 |
4 files changed, 14 insertions, 29 deletions
diff --git a/src/quick/items/qquickborderimage.cpp b/src/quick/items/qquickborderimage.cpp index bb15f3623b..8258dbadb8 100644 --- a/src/quick/items/qquickborderimage.cpp +++ b/src/quick/items/qquickborderimage.cpp @@ -140,11 +140,7 @@ QT_BEGIN_NAMESPACE The \l{declarative/imageelements/borderimage}{BorderImage example} shows how a BorderImage can be used to simulate a shadow effect on a rectangular item. - \section1 Quality and Performance - - By default, any scaled regions of the image are rendered without smoothing to improve - rendering speed. Setting the \l smooth property improves rendering quality of scaled - regions, but may slow down rendering. + \section1 Image Loading The source image may not be loaded instantaneously, depending on its original location. Loading progress can be monitored with the \l progress property. @@ -205,16 +201,12 @@ QQuickBorderImage::~QQuickBorderImage() /*! \qmlproperty bool QtQuick2::BorderImage::smooth - Set this property if you want the image to be smoothly filtered when scaled or - transformed. Smooth filtering gives better visual quality, but is slower. If - the image is displayed at its natural size, this property has no visual or - performance effect. - - By default, this property is set to false. + This property holds whether the image is smoothly filtered when scaled or + transformed. Smooth filtering gives better visual quality, but it may be slower + on some hardware. If the image is displayed at its natural size, this property + has no visual or performance effect. - \note Generally scaling artifacts are only visible if the image is stationary on - the screen. A common pattern when animating an image is to disable smooth - filtering at the beginning of the animation and enable it at the conclusion. + By default, this property is set to true. */ /*! diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp index 8b0392f403..44aa9734b2 100644 --- a/src/quick/items/qquickimage.cpp +++ b/src/quick/items/qquickimage.cpp @@ -199,7 +199,6 @@ void QQuickImagePrivate::setImage(const QImage &image) \qml Image { width: 130; height: 100 - smooth: true source: "qtlogo.png" } \endqml @@ -211,7 +210,6 @@ void QQuickImagePrivate::setImage(const QImage &image) Image { width: 130; height: 100 fillMode: Image.PreserveAspectFit - smooth: true source: "qtlogo.png" } \endqml @@ -223,7 +221,6 @@ void QQuickImagePrivate::setImage(const QImage &image) Image { width: 130; height: 100 fillMode: Image.PreserveAspectCrop - smooth: true source: "qtlogo.png" clip: true } @@ -247,7 +244,6 @@ void QQuickImagePrivate::setImage(const QImage &image) Image { width: 120; height: 120 fillMode: Image.TileVertically - smooth: true source: "qtlogo.png" } \endqml @@ -259,7 +255,6 @@ void QQuickImagePrivate::setImage(const QImage &image) Image { width: 120; height: 120 fillMode: Image.TileHorizontally - smooth: true source: "qtlogo.png" } \endqml @@ -360,14 +355,12 @@ qreal QQuickImage::paintedHeight() const /*! \qmlproperty bool QtQuick2::Image::smooth - Set this property if you want the image to be smoothly filtered when scaled or - transformed. Smooth filtering gives better visual quality, but is slower. If - the image is displayed at its natural size, this property has no visual or - performance effect. + This property holds whether the image is smoothly filtered when scaled or + transformed. Smooth filtering gives better visual quality, but it may be slower + on some hardware. If the image is displayed at its natural size, this property has + no visual or performance effect. - \note Generally scaling artifacts are only visible if the image is stationary on - the screen. A common pattern when animating an image is to disable smooth - filtering at the beginning of the animation and reenable it at the conclusion. + By default, this property is set to true. */ /*! diff --git a/src/quick/items/qquickshadereffectmesh.cpp b/src/quick/items/qquickshadereffectmesh.cpp index c2c76439b2..113332f162 100644 --- a/src/quick/items/qquickshadereffectmesh.cpp +++ b/src/quick/items/qquickshadereffectmesh.cpp @@ -185,7 +185,6 @@ QSGGeometry *QQuickGridMesh::updateGeometry(QSGGeometry *geometry, const QVector property variant source: Image { source: "qt-logo.png" sourceSize { width: 200; height: 200 } - smooth: true } vertexShader: " uniform highp mat4 qt_Matrix; diff --git a/src/quick/items/qquickshadereffectsource.cpp b/src/quick/items/qquickshadereffectsource.cpp index d2a1ad2590..65a6cdc3fe 100644 --- a/src/quick/items/qquickshadereffectsource.cpp +++ b/src/quick/items/qquickshadereffectsource.cpp @@ -531,8 +531,9 @@ QImage QQuickShaderEffectTexture::toImage() const which is the case for most embedded graphics chips, edges rendered inside a ShaderEffectSource will not be antialiased. One way to remedy this is to double the size of the effect source and render it with - \c {smooth: true}. This will be equivalent to 4x multisampling, at - the cost of lower performance and higher memory use. + \c {smooth: true} (this is the default value of smooth). + This will be equivalent to 4x multisampling, at the cost of lower performance + and higher memory use. \warning In most cases, using a ShaderEffectSource will decrease performance, and in all cases, it will increase video memory usage. |