@@ -20,54 +20,20 @@ import QtGraphicalEffects 1.0
23− property alias source: shaderEffectSource.sourceItem
23+ property alias source: fastBlur.source
24− property real saturation: 1
25 property real brightness: 1
24 property real brightness: 1
26 property real blurRadius: 0
25 property real blurRadius: 0
28− readonly property alias ready: shaderEffectSource.ready
34− property real saturationValue: Math.min(Math.max(root.saturation, 0), 1)
35− property real brightnessValue: Math.min(Math.max(root.brightness, 0), 1)
37− property variant source: ShaderEffectSource {
38− id: shaderEffectSource
39− hideSource: root.visible
41− property bool ready: false;
48− onScheduledUpdateCompleted: ready = true;
52− varying highp vec2 qt_TexCoord0;
53− uniform sampler2D source;
54− uniform lowp float saturationValue;
55− uniform lowp float brightnessValue;
58− highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
59− highp vec4 scaledColor = sourceColor * vec4(0.3, 0.59, 0.11, 1.0);
60− lowp float luminance = scaledColor.r + scaledColor.g + scaledColor.b ;
61− highp vec4 tmp = mix(vec4(luminance, luminance, luminance, sourceColor.a), sourceColor, saturationValue);
62− gl_FragColor = mix(vec4(0, 0, 0, 1), tmp, brightnessValue);
66 FastBlur {
27 FastBlur {
67 id: fastBlur
28 id: fastBlur
68 anchors.fill: parent
29 anchors.fill: parent
69− source: desaturateEffect
70 visible: radius > 0
30 visible: radius > 0
71 radius: Math.max(root.blurRadius, 0)
31 radius: Math.max(root.blurRadius, 0)
37+ opacity: 1 - root.brightness