summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Niemelä <marko.a.niemela@nokia.com>2012-04-25 16:11:36 +0300
committerQt by Nokia <qt-info@nokia.com>2012-04-27 12:51:42 +0200
commit3a4730282c959afff82dc63e2173831d7f21b5d7 (patch)
tree617ee98a72ff49902b81efe7de06f21f7b9db5cd
parenteb9ab0a7617dd5fb5d8feb236307cb8e3efd5ec3 (diff)
downloadqtgraphicaleffects-3a4730282c959afff82dc63e2173831d7f21b5d7.tar.gz
Removed unnecessary internal ShaderEffectSources.
GaussianDirectionalBlur does not require source to be ShaderEffectSource, it uses internal SourceProxy when needed. Change-Id: Ie6db1ddad5e245e7ae3a4563d07107b780eaa671 Reviewed-by: Kim Gronholm <kim.1.gronholm@nokia.com>
-rw-r--r--src/effects/internal/GaussianGlow.qml13
-rw-r--r--src/effects/internal/GaussianInnerShadow.qml15
-rw-r--r--src/effects/internal/GaussianMaskedBlur.qml11
3 files changed, 5 insertions, 34 deletions
diff --git a/src/effects/internal/GaussianGlow.qml b/src/effects/internal/GaussianGlow.qml
index 7564226..467c4f3 100644
--- a/src/effects/internal/GaussianGlow.qml
+++ b/src/effects/internal/GaussianGlow.qml
@@ -72,21 +72,12 @@ Item {
y: transparentBorder ? -maximumRadius - 1 : 0
width: horizontalBlur.width
height: horizontalBlur.height
-
horizontalStep: 0.0
verticalStep: 1.0 / parent.height
-
- source: ShaderEffectSource {
- sourceItem: horizontalBlur
- hideSource: true
- visible: false
- smooth: true
- }
-
+ source: horizontalBlur
radius: rootItem.radius
maximumRadius: rootItem.maximumRadius
transparentBorder: rootItem.transparentBorder
-
enableColor: true
color: rootItem.color
spread: rootItem.spread
@@ -96,10 +87,8 @@ Item {
id: horizontalBlur
width: transparentBorder ? parent.width + 2 * maximumRadius + 2 : parent.width
height: transparentBorder ? parent.height + 2 * maximumRadius + 2 : parent.height
-
horizontalStep: 1.0 / parent.width
verticalStep: 0.0
-
source: sourceProxy.output
radius: rootItem.radius
maximumRadius: rootItem.maximumRadius
diff --git a/src/effects/internal/GaussianInnerShadow.qml b/src/effects/internal/GaussianInnerShadow.qml
index b4b7190..0d185bd 100644
--- a/src/effects/internal/GaussianInnerShadow.qml
+++ b/src/effects/internal/GaussianInnerShadow.qml
@@ -75,6 +75,7 @@ Item {
property real horizontalOffset: rootItem.horizontalOffset / rootItem.width
property real verticalOffset: rootItem.verticalOffset / rootItem.height
+ visible: false
fragmentShader: "
uniform highp sampler2D original;
uniform lowp float qt_Opacity;
@@ -97,14 +98,7 @@ Item {
anchors.fill: parent
horizontalStep: 0.0
verticalStep: 1.0 / parent.height
-
- source: ShaderEffectSource {
- sourceItem: horizontalBlur
- hideSource: true
- visible: false
- smooth: true
- }
-
+ source: horizontalBlur
radius: rootItem.radius
maximumRadius: rootItem.maximumRadius
visible: false
@@ -114,11 +108,9 @@ Item {
id: horizontalBlur
width: transparentBorder ? parent.width + 2 * maximumRadius : parent.width
height: parent.height
-
horizontalStep: 1.0 / parent.width
verticalStep: 0.0
-
- source: ShaderEffectSource { sourceItem: shadowItem; hideSource: true; smooth: true }
+ source: shadowItem
radius: rootItem.radius
maximumRadius: rootItem.maximumRadius
visible: false
@@ -128,7 +120,6 @@ Item {
id: blurredSource
sourceItem: blurItem
live: true
- hideSource: true
smooth: true
}
diff --git a/src/effects/internal/GaussianMaskedBlur.qml b/src/effects/internal/GaussianMaskedBlur.qml
index 542c85e..a761668 100644
--- a/src/effects/internal/GaussianMaskedBlur.qml
+++ b/src/effects/internal/GaussianMaskedBlur.qml
@@ -77,16 +77,9 @@ Item {
y: transparentBorder ? -maximumRadius - 1: 0
width: horizontalBlur.width
height: horizontalBlur.height
-
horizontalStep: 0.0
verticalStep: 1.0 / parent.height
-
- source: ShaderEffectSource {
- sourceItem: horizontalBlur
- hideSource: true
- visible: false
- smooth: true
- }
+ source: horizontalBlur
enableMask: true
maskSource: maskSourceProxy.output
radius: rootItem.radius
@@ -98,10 +91,8 @@ Item {
id: horizontalBlur
width: transparentBorder ? parent.width + 2 * maximumRadius + 2 : parent.width
height: transparentBorder ? parent.height + 2 * maximumRadius + 2 : parent.height
-
horizontalStep: 1.0 / parent.width
verticalStep: 0.0
-
source: sourceProxy.output
enableMask: true
maskSource: maskSourceProxy.output